Towers of Hanoi
Time Complexity: O(2n) - we need 2n-1 moves for n discs
Space Complexity: O(n) - for the recursive solution's call stack
Controls:
Puzzle solved in 0 moves!
Doubling Puzzle
Time Complexity: O(n log n) - we need O(log n) operations per iteration and O(n) iterations
Space Complexity: O(n) - for storing the solution steps
Setup:
Controls:
Puzzle solved in 0 moves!