← ALL NOTES
Hash Table

3016. Minimum Number of Pushes to Type Word II

Only the frequency of each letter matters here; which specific letters they are never enters the answer. I count how often every letter appears, then hand the busiest letters the cheapest keys.

Loading…