Loading...
The Never-Ending Sequence
A easy Python interview practice problem on DataDriven. Write and execute real python code with instant grading.
- Domain
- Python
- Difficulty
- easy
- Seniority
- senior
Problem
Our load testing framework uses Fibonacci-spaced intervals for retry backoff. Write a function called fibonacci that takes an integer n and returns the first n Fibonacci numbers (starting with 0, 1). Use an iterative approach - no recursion, since this runs in a hot loop.
Practice This Problem
Solve this Python problem with real code execution. DataDriven runs your Python code in a sandboxed Docker environment and grades it instantly.