You are climbing a stair case. It takes n steps to reach to the top.
Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?
Accept: 1ms
int dp[10000] = {0, 1, 2};
int climbStairs(int n) {
if (dp[n] == 0) {
dp[n] = climbStairs(n - 1) + climbStairs(n - 2);
}
return dp[n];
}