java - Datastructures for storing sorted values -
my data in form of key value.i want sort values.i have stored them in hashmap.
map.put(1,.8678)
map.put(2,.9578) map.put(6,.0453)
i want output:
(6,.0453), (1,.8678), (2,.9578)
i want sort values, retrive sorted values , keys efficient(with least complexity).what best data structure problem? thanks.
the treemap data sorted keys if want sorted values, check might answer question: how sort hashmap in java
Comments
Post a Comment