Back to QuestionsPractice with This Question
Longest Consecutive Sequence
52.5K views•Asked at Tesla•
Medium
Question Explain
Given an unsorted array of integers `nums`, return the length of the longest consecutive elements sequence. The algorithm should run in $O(n)$ time.
Start Trying This Question Simulation
Practice answering orally or with text to get instant AI feedback.