Tower of Hanoi (recursion)

Asked at Apple · Coding Questions · Difficulty: Medium

Given an integer `n` (`1 ≤ n ≤ 20`), representing the number of disks. All disks are stacked on peg `A` from smallest to largest.

Loading the problem…