You are given an integer array nums.
In one operation, you can remove the first nums. If nums contains fewer than
You repeat this operation until all elements in nums are distinct.
Return the minimum number of operations needed to make all elements in nums distinct.
Constraints:
nums.length
nums[i]
You are given an integer array nums.
In one operation, you can remove the first nums. If nums contains fewer than
You repeat this operation until all elements in nums are distinct.
Return the minimum number of operations needed to make all elements in nums distinct.
Constraints:
nums.length
nums[i]