Tap here to switch tabs
Problem
Submissions

Problem: Minimum Operations to Make Elements in Array Distinct

Try to solve the Minimum Number of Operations to Make Elements in Array Distinct problem.

Statement

You are given an integer array nums.

In one operation, you remove the first 33 elements from nums. If the array contains fewer than 33 elements, all remaining elements are removed.

Return the minimum number of operations required to make all elements in nums distinct.

Note: An empty array is considered to have distinct elements.

Constraints:

  • 1≤1 \leq nums.length ≤100\leq 100

  • 1≤1 \leq nums[i] ≤100\leq 100

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Minimum Operations to Make Elements in Array Distinct

Try to solve the Minimum Number of Operations to Make Elements in Array Distinct problem.

Statement

You are given an integer array nums.

In one operation, you remove the first 33 elements from nums. If the array contains fewer than 33 elements, all remaining elements are removed.

Return the minimum number of operations required to make all elements in nums distinct.

Note: An empty array is considered to have distinct elements.

Constraints:

  • 1≤1 \leq nums.length ≤100\leq 100

  • 1≤1 \leq nums[i] ≤100\leq 100