DataStructures-and-Algorithms icon indicating copy to clipboard operation
DataStructures-and-Algorithms copied to clipboard

Tower of Hanoi

Open aryanayush012 opened this issue 2 years ago • 2 comments

Tower of Hanoi #98

in this approach we use recursion and take the help of the auxilary rod to move all the discs from one rod to another our refrenced auxilary rod changes everytime and we call the function recursively.

Time complexity: O(2^N) Auxiliary Space: O(N)

image

aryanayush012 avatar Oct 05 '22 06:10 aryanayush012