Quiz: Staircase Recurrence

Test your understanding

Check Your Understanding

To reach step n, you can come from step n-1 (1 step) or step n-2 (2 steps). What is ways(n)?

  1. A.ways(n-1) × ways(n-2)
  2. B.2 × ways(n-1)
  3. C.max(ways(n-1), ways(n-2))
  4. D.ways(n-1) + ways(n-2)
Start the roadmap to answer the quizzes and solve the challenges