You climb a staircase with n steps. Each time you can climb 1 or 2 steps. How many distinct ways to reach the top?
To reach step i you must have come from step i−1 (took 1 step) or step i−2 (took 2 steps). So total ways = ways(i−1) + ways(i−2). Same as Fibonacci. dp[1]=1 (one way: {1}), dp[2]=2 ({1,1} or {2}).