Alternating disks you have a row of 2n disks of two colors


I can't seem to get this to work for some reason could somebody give the answer?

Question: Alternating disks you have a row of 2n disks of two colors, n dark and n light.

They alternate: dark, light, dark, light, and so on. You want to get all the dark disks to the right-hand end, and all the light disks to the left-hand end.

The only moves you are allowed to make are those that interchange the positions of two neighboring disks.

b w b w b w b w -->  w w w w b b b b

Algorithm: Design an algorithm for solving this puzzle and determine the number of moves it takes.

Prepare the algorithm to solve the puzzle and find the number

Request for Solution File

Ask an Expert for Answer!!
Data Structure & Algorithms: Alternating disks you have a row of 2n disks of two colors
Reference No:- TGS0952080

Expected delivery within 24 Hours