Move all disks from the first peg to the third peg.
Plan a strategy to move the largest disk to the target peg first. Thinking recursively will help you find the optimal solution.
The Tower of Hanoi, invented by French mathematician Édouard Lucas in 1883, is used as a standard tool in neuropsychology for assessing planning ability and executive function.