Search⌘ K

DIY: Longest Consecutive Sequence

Explore how to identify the longest consecutive sequence within an unsorted array of integers. This lesson guides you to implement a function that analyzes the array and returns the length of the largest consecutive integer sequence, helping you sharpen problem-solving skills relevant for coding interviews.

Problem statement

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

Input

The input will be an array ...