Arrays

Longest Consecutive Sequence

medium
Given an unsorted array of integers `nums`, return the length of the longest consecutive elements sequence. Aim for O(n).
Hint steps(0/2 revealed)
  1. 1

    Complete previous step or reveal to unlock this hint.

  2. 2

    Complete previous step or reveal to unlock this hint.