Describe the algorithm
It is basically a puzzle algorithm in which we have 3 rods(A, B, C) and n no of disk . We have to move the whole stack from one rod to different rod. It has few rules-:
1) Only one disk can be moved at a time.
2) Only topmost disk can be shifted to another rod.
3) Bigger disk cannot be placed on smaller disk .
It is a recursion problem and has Time complexity of O(2^n -1) where n=No of disk
(How this time complexity came will be explained through mathematical analysis.)
Title or Name of the Algorithm
Describe the algorithm It is basically a puzzle algorithm in which we have 3 rods(A, B, C) and n no of disk . We have to move the whole stack from one rod to different rod. It has few rules-:
1) Only one disk can be moved at a time. 2) Only topmost disk can be shifted to another rod. 3) Bigger disk cannot be placed on smaller disk .
It is a recursion problem and has Time complexity of O(2^n -1) where n=No of disk (How this time complexity came will be explained through mathematical analysis.)