Problems / Arrays & Hashing / Longest Consecutive Sequence
#9 Medium Time O(n) Space O(n) Animated

Longest Consecutive Sequence

Find the length of the longest consecutive sequence in an unsorted array.

LeetCode ↗
Approach: Hash Set
Click play to start
Step 0 / 0
Press play to start the visualization.

Steps