Frequency of the Most Frequent Element
Medium · Arrays & Strings · about 20 minutes
Asked at Google, Amazon, Microsoft, Bloomberg, Meta.
You may perform at most k operations, each incrementing one element of nums by 1. Return the largest possible frequency of any single value afterwards.