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
- L5
Problem
Given a list of integers (possibly unordered with duplicates), return the length of the longest run of consecutive integers that can be formed (e.g., [100, 4, 200, 1, 3, 2] contains 1,2,3,4 -> 4).
Summary
Numbers that flow without interruption.
Practice This Problem
Solve this Python problem with real code execution. DataDriven runs your Python code in a real environment and grades it automatically.