Skip to content

Files

Latest commit

caa2ca1 · Mar 29, 2020

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Jun 20, 2019
Mar 29, 2020

Given an unsorted array of integers, find the length of the longest consecutive elements sequence.

For example, given [100, 4, 200, 1, 3, 2], the longest consecutive element sequence is [1, 2, 3, 4]. Return its length: 4.

Your algorithm should run in O(n) complexity.