TODO: O(n) implementation of Longest Consecutive Sequence