Cheapest Way Up

Talk it through with a coach who asks guiding questions and gives hints until you reach the answer. Pass to mark the challenge as completed.

The problem

  • easy
  • Pro

Each step of a staircase has a cost you pay when you stand on it, and you may climb one or two steps at a time, starting from either the first or the second step. Find the minimum cost to reach the top, just past the last step, and explain your recurrence.

Talk this problem through with an AI coach

This is a Pro challenge. Sign in with Google, then upgrade to start a voice session.

Start free →