Answer the question
In order to leave comments, you need to log in
How to sort map by value?
You need to sort the map, tell me how to do it in the most convenient way. For Google suggests very abstruse things or very simple ones, the inhabitants of the toaster can share the golden mean (worked out hacks).
Answer the question
In order to leave comments, you need to log in
The question does not make sense, since map stores sorted by key (a custom comparator is possible) and does not allow changing this order. So in terms of value, no way. Take out pairs from there, and sort them. What problem is actually being solved?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question