Available question text
Find the minimum number of distinct values to remove (deleting all their occurrences) so that at least half the array's elements are gone — equivalently, count element frequencies and greedily pick the largest frequencies until their sum is ≥ n/2.
Related questions
Continue with questions that share topics or the same question type.
- Array Reduce Transformation
Coding
- Given an array nums and a sliding window of size k moving from the very left to the very right, return the maximum value in the window for each position. Solve in O(n) time using a deque.
Coding
- Minimum Size Subarray in Infinite Array
Coding
- N-Repeated Element in Size 2N Array
Coding
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 1338. Reduce Array Size to The Half
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source