Module 4 · Hashing · Hashing

Sort array by increasing frequency

Count how often each number appears in a HashMap, turn the counts into objects, sort them by frequency (ties: bigger number first), and write each number out as many times as it appeared.

frequencyMap counts how many times each number appears; frequencyDatas holds the FrequencyData objects.