Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 3396. Minimum Number of Operations to Make Elements in Array Distinct
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.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.