Available question text
You are given an array and can repeatedly remove the first three elements (or all remaining if fewer than three); return the minimum number of such prefix-removals needed so that the remaining array has all distinct elements (the empty array counts). Equivalently, find the smallest k such that the subarray nums[3k:] contains no duplicates.
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 3396. Minimum Number of Operations to Make Elements in Array Distinct
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source