Update the HashMap according to the values in a stream of inputs in descending order.
HashMap<String, Integer> map = new HashMap<String, Integer>();
map.put("a", 1);
map.put("b", 2);
map.put("c", 3);
When I print it in descending order, it will give output as :
{c=3, b=2, a=1}
And When I add this
map.put("a", map.get("a") + 10);
it should print as :
{a=11, c=3, b=2}