Longest Consecutive Sequence at Google

Medium47.0% acceptance

This problem has 75.0% frequency at Google.

Problem Description

Given an unsorted array of integers `nums`, return _the length of the longest consecutive elements sequence._ You must write an algorithm that runs in `O(n)` time.

Read full problem and hints

Topics

Also asked at 38 companies


More Google Questions

View all Google questions