1.

What is the objective of tower of hanoi puzzle?(a) To move all disks to some other rod by following rules(b) To divide the disks equally among the three rods by following rules(c) To move all disks to some other rod in random order(d) To divide the disks equally among three rods in random orderThis question was posed to me during a job interview.Question is taken from Recursion topic in chapter Recursion of Data Structures & Algorithms II

Answer» CORRECT answer is (a) To move all disks to some other rod by following rules

Explanation: OBJECTIVE of tower of hanoi problem is to move all disks to some other rod by following the following rules-1) Only one disk can be MOVED at a TIME. 2) Disk can only be moved if it is the uppermost disk of the stack. 3) No disk should be placed over a smaller disk.


Discussion

No Comment Found

Related InterviewSolutions