i wanted my map like this, when ever a value is changed for a particular key, that is here key is 'v3' and value is 'sum' variable, all the previous values for that key should be removed and it should be replaced by last inserted value for a particular key.
That means, the output should be like below,
80 : 8
100 : 20
Is there any way to do this.. Please give me any ideas.