How does this work? Weird Towers of Hanoi Solution
the recursive solution to towers of Hanoi works so that if you want to move N disks from peg A to C, you first move N-1 from A to B, then you move the bottom one to C, and then you move again N-1 disks from B to C. In essence, hanoi(from, to, spare, N): … Read more