Approach hintTry it first, then revealHide
The last move was either one step or two, so the number of ways to reach step i is the sum of the ways to reach i - 1 and i - 2.
The last move was either one step or two, so the number of ways to reach step i is the sum of the ways to reach i - 1 and i - 2.