Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 1481. Least Number of Unique Integers after K Removals
Remove exactly k elements from an integer array to minimize the number of distinct values remaining. This reduces to counting element frequencies and greedily eliminating values with the smallest counts until k is used.
Asked at:
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Early January, 2025
Mid-level
Given a fixed size array of integers and a storage limit S, find a number x to truncate each array integer to the largest optimal number such that the sum of the array after truncations is S
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.