Find the length of the longest run of consecutive integers in an unsorted list.
Constraints
Example
>>> longest_consecutive([100, 4, 200, 1, 3, 2]) 4 >>> longest_consecutive([1, 2, 0, 1]) 3 >>> longest_consecutive([]) 0 >>> longest_consecutive([9]) 1
Recent Submissions
No submissions yet — hit Run Tests to try!
Hints