Solve "Longest Consecutive Sequence"
time complexity: O(n)