Anoop Kumar
Branch Unspecified
20 Jan 2012

arrange the numbers 1 to 8 in the grid below such that adjacent numbers are not in adjacent boxes (horizontally, vertically, or diagonally).

the arrangement above, for example, is wrong because 3 and 4, 4 and 5, 6 and 7, and 7 and 8 are adjacent.

K Vikrant

Branch Unspecified
7 years ago

(Sorry for the numbers not being aligned properly.)
Logic is simple. The numbers in center are ones which will have max numbers touching them. So to ensure that the ones touching them aren't the ones adjacent to them in number line , we must select the two extreme numbers from the sequence, namely 1 and 8.
Now we have to keep 2 and 7 as far as possible from 1 and 8 hence 2 and 7 go to the bottom and top positions. Filling the rest of the spaces is easy after that.

Anoop Kumar

Branch Unspecified
7 years ago
yup, you are right.
every number has two adjacent number except 1 & 8. and middle brackets have at lease two adjacent hence only 1 & 8 fits here. rest are easy