Given an unsorted array of integers, find the length of the longest consecutive elements sequence.
Example: Output: (the sequence is ) The constraint: you must solve this in time. Sorting would be .
The trick here is subtle. Hash sets give lookup, but how do you efficiently find consecutive sequences?