Search⌘ K
AI Features

DIY: Longest Consecutive Sequence

Explore solving the longest consecutive sequence problem by implementing a function to find the largest consecutive run in an unsorted integer array. This lesson helps you understand array traversal and data structure use to optimize coding interview solutions.

Problem statement

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

Input

The input will be an array of ...