Climbing Stairs
You are climbing a staircase with n steps to reach the top Each time you can climb either 1 or 2 steps Return the number of distinct ways to climb to the top Example: n = 2 => 2 (1+1 or 2) Example: n = 3 => 3 (1+1+1, 1+2, 2+1)
Count the ways to reach the top when you can take 1 or 2 steps at a time. It looks like a brute-force recursion problem, but it's actually your first real dynamic programming question. Once you see the Fibonacci pattern hiding inside, a whole category of DP problems clicks into place.

Meet Coco
Coco is an AI study partner, not a person. She listens while you explain your code, asks what a line does and never hands you the fix. Typing with Coco is free when you sign in, up to a daily limit. Talking with her out loud comes with the $79 pack. Anyone can open the editor and run their code.
Each locked part opens in the editor once the part before it passes.