Vijay Pagare

DSA - 1 new - climbing stairs (DP)


70. Climbing Stairs — DP (Fibonacci pattern)

Insight — Problem follows Fibonacci recurrence; solve via recursion + memoization (store intermediate states in hashmap)

Comment — Recognized pattern only after manually enumerating paths; without that, the recurrence wasn’t obvious

Note

Whenever you see a problem where:

→ It almost always reduces to a linear recurrence relation (Fibonacci-like DP)

#Leetcode #Dsa