🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Recurrence Relations: all 10 questions

Quiz: Recurrence Relations · Question 1 of 10

What is the recurrence for the minimum number of Tower of Hanoi moves?

What is the recurrence for the minimum number of Tower of Hanoi moves?

  1. A.H(n) = H(n−1) + 1
  2. B.H(n) = 2H(n−1) + 1
  3. C.H(n) = 2H(n−1)
  4. D.H(n) = H(n−1) + H(n−2)
Answer & explanation

Correct answer: H(n) = 2H(n−1) + 1

Move n−1 disks away, the largest disk once, then n−1 disks back: 2H(n−1) + 1.

Can you get the rest right without peeking?

Take the timed Quiz: Recurrence Relations quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →