Available question text
Given an array where each element can be increased by at most 1, find the largest subset of elements that can be (after optional increments) sorted into a sequence of consecutive integers. The core challenge is picking which elements to increment and which integer interval to target to cover as many elements as possible, with up to 1e5 elements and values up to 1e6.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 3041. Maximize Consecutive Elements in an Array After Modification
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source