Easy/medium level leetcode questions & question about linux&networking
Implement longest_consecutive(nums) to return the length of the longest consecutive-integer sequence in an unsorted list. Duplicate values count once, and an empty list returns 0.
Examples: [100, 4, 200, 1, 3, 2] returns 4; [1, 2, 0, 1] returns 3. Aim for O(n) time and O(n) extra space. nums contains integers and has at most 10^4 elements.
def longest_consecutive(nums):