Sort Array by Increasing Frequency
Easy · Hashing · about 10 minutes
Asked at Amazon, Google, Meta, Microsoft.
Sort nums in increasing order of how often each value appears. Values with the same frequency are sorted in decreasing order. Return the sorted array.