Solution to Longest Consecutive Sequence