Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 2268. Minimum Number of Keypresses
Given frequencies for characters and a fixed number of keys each supporting a limited number of press levels, assign characters to key-press positions to minimize the total number of presses (sum of frequency × presses) or return -1 if capacity is insufficient; this is a greedy assignment problem of mapping highest-frequency characters to the lowest-press slots.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.