CodeOath
← All problems

Climbing Stairs

Easy
dynamic-programming

Count the distinct ways to climb n steps, taking 1 or 2 steps at a time.

Example:

Input: n = 4
Output: 5