Search
⌘K

Leetcode 1285. Find the Start and End Number of Continuous Ranges

Given an array of integers (possibly unsorted and with duplicates), identify all maximal sequences of consecutive numbers and return each range as its start and end (single numbers should be reported as start == end). The core challenge is to group numbers into contiguous runs of consecutive values and output their boundary pairs efficiently.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.