🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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?

  1. A.25
  2. B.32
  3. C.31
  4. 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 →