← Quiz: Recursion and Stack Frames: all 10 questions
Quiz: Recursion and Stack Frames · Question 3 of 10
How many moves does Tower of Hanoi need for 5 discs?
How many moves does Tower of Hanoi need for 5 discs?
- A.25
- B.32
- C.31
- D.10
Answer & explanation
Correct answer: 31
The formula is 2ⁿ − 1 = 2⁵ − 1 = 31.
Can you get the rest right without peeking?
Take the timed Quiz: Recursion and Stack Frames quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →