Skip to main content
Loading page content
Explore
Learnings
Mental Math
Dashboard
More
Algo
Flow
Visualizers
Learnings
Quizzes
Mental Math
Dashboard
Log in
Sign up
Loading quiz challenge
Back to Visualizer
Question 1 of 5
Classic Problems
• Climbing Stairs
In the Climbing Stairs problem (taking 1 or 2 steps at a time to reach step N), what is the state transition recurrence relation?
A
dp[i] = dp[i-1] * dp[i-2]
B
dp[i] = dp[i-1] + dp[i-2]
C
dp[i] = max(dp[i-1], dp[i-2])
D
dp[i] = dp[i-1] + 1