A row of 2n disks of two colours, n dark and n light, alternate in the given sequence: dark, light, dark, light, and so on. Arrange all the dark disks to the right-hand end, and all the light disks to the left-hand end. The only moves allowed are to interchange the positions of two neighbouring disks.
Question a) Design an algorithm to solve the puzzle
b) Illustration of number of moves
c) C Program