DataStructures-and-Algorithms
DataStructures-and-Algorithms copied to clipboard
Tower of Hanoi
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)