The Step Counter
A easy Python interview practice problem on DataDriven. Write and execute real python code with instant grading.
- Domain
- Python
- Difficulty
- easy
- Seniority
- L3
Problem
Given non-negative integer n, return the number of distinct ways to climb n stairs taking 1 or 2 steps at a time. (Fibonacci-like.)
Summary
You can hop one step or two - how many ways to reach the top?
Practice This Problem
Solve this Python problem with real code execution. DataDriven runs your Python code in a real environment and grades it automatically.