Loading...
The Consecutive Sequence Finder
A medium Python interview practice problem on DataDriven. Write and execute real python code with instant grading.
- Domain
- Python
- Difficulty
- medium
- Seniority
- senior
Problem
The ETL pipeline assigns incrementing batch IDs to every load, but failed batches leave gaps. The ops dashboard needs to report the longest unbroken run of consecutive batch IDs from an unordered list of successful loads. Write a function that finds the length of the longest consecutive integer sequence without sorting the input.
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.