Longest Consecutive Sequence (variation)

Problem: Longest Consecutive Integer Sequence

Given an unsorted integer array nums, return the length of the longest sequence of consecutive integers.

A consecutive sequence is of the f...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: