Available question text
Given a lowercase string s and integer k, delete the fewest characters so the resulting string contains at most k distinct letters. The optimal approach is to keep the k most frequent characters and remove all occurrences of the rest, minimizing total deletions.
Related questions
Continue with questions that share topics or the same question type.
- Longest Substring with At Most K Distinct Characters
Coding · Hash Table · Sliding Window · String
- Longest Substring with At Most Two Distinct Characters
Coding
- Change Minimum Characters to Satisfy One of Three Conditions
Coding
- Longest Subarray With at Most K Distinct Prime Factors
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 3545. Minimum Deletions for At Most K Distinct Characters
Interview date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source