Given an unsorted array of integers, return the length of the longest consecutive elements sequence. The algorithm must run in O(n) time.
Click Run to execute sample tests.