목록2025/04/08 (1)
mjk study log
[Leetcode] 3396. Minimum Number of Operations to Make Elements in Array Distinct
문제You are given an integer array nums. You need to ensure that the elements in the array are distinct. To achieve this, you can perform the following operation any number of times:Remove 3 elements from the beginning of the array. If the array has fewer than 3 elements, remove all remaining elements.Note that an empty array is considered to have distinct elements. Return the minimum number of op..
Leetcode
2025. 4. 8. 20:31