Ways to Climb Stairs

Talk it through out loud with your AI coach.

The problem

  • easy

You climb a staircase of n steps, taking either one or two steps at a time. How many different ways can you reach the top? Explain how you'd work it out, why the plain recursive solution is slow, and how to fix it.