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.
Posted
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.
Share this post
Link to post
Share on other sites