Professional Documents
Culture Documents
(B) A disk is slid off the top of one rod onto the next rod.
Write a program to move the disks from the first rod to the last using
Stacks.
Q. 11. You have a row of binary digits arranged randomly. Arrange them in
such an order that all 0’s precede all 1’s or vice versa. The only
constraint in arranging them is that you are allowed to interchange the
positions of binary digits if they are not similar. Write a program in C
using the pointer to solve the problem.
E.g.: 11010100 00001111 OR 11110000