Create the shortest possible sequence (using numbers from 1,2,...n) such that no number is next to its first-hand neighbors (e.g. the number 2 cannot be next to numbers 1 and 3, which are its first-hand neighbors).
e.g.
1,6,3,5,2,4,7 Here is a sequence using 7 numbers that meets the requirement.
Question
BMAD
Create the shortest possible sequence (using numbers from 1,2,...n) such that no number is next to its first-hand neighbors (e.g. the number 2 cannot be next to numbers 1 and 3, which are its first-hand neighbors).
e.g.
1,6,3,5,2,4,7 Here is a sequence using 7 numbers that meets the requirement.
Link to comment
Share on other sites
10 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.