private Map<Character, Integer> frequencies;
I have a Map
with Character
being Key and its associated Integer
being Value.
Whats the best/fastest/efficeint way to sort by Value?
i.e Map may have
a,1
c,10
p,5
s,7
and after sorted,
it would be
a,1
p,5
s,7
c,10
I was thinking about doing it with Priority Queue and with integer but i would lose the Character value if the integer vals are duplicates