Google Interview Question: Find the Longest Sequence in an Unordered Set