Available question text
Given an array where you can replace any element with any integer, compute the minimum replacements to make all elements unique and form a consecutive sequence of length n (max-min = n-1). Equivalently, deduplicate and use a sliding-window on the sorted unique values to maximize how many original values fit inside an interval of length n-1, then return n minus that count.
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 2009. Minimum Number of Operations to Make Array Continuous
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source