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.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.