Longest Consecutive Sequence
MediumGiven an unsorted array, print the length of the longest run of consecutive integer values.
Input format:
- First line: n
- Second line: n integers
Constraints
0 <= n <= 10^5 -10^9 <= nums[i] <= 10^9
0 <= n <= 10^5 -10^9 <= nums[i] <= 10^9