solulubeta
Sign in
NeetCode 150 / Arrays & Hashing
01.09 · Problem

Longest Consecutive Sequence

Medium Hash set, start only at sequence beginnings 1 video LC 128 Pro

This problem is part of solulu Pro

Given an unsorted array of integers nums, return the length of the longest run of consecutive integers (like 4, 5, 6, 7) that can be formed from its values. Order in the array doesn't matter. Your algorithm should run in…

Lifetime ₹2,000 ₹1,000 · Beta offer
Mark this problem as solved when you are finished.

Item 9 of 9 · updated 2026-10-12