โ† Amazon questions

Longest consecutive number sequence

Filed under Amazon

Given an unsorted array of integers, find the length of the longest consecutive elements sequence. The sequence must consist of integers that can be arranged as [n, n+1, n+2...].

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Amazon questions

Collected from public candidate posts and coding forums. Updated Nov 2026.