java - HashMap and sorting -


i building trie, each node has hashmap sons' value stored, , keys name.

i'm using hashmap because, mainly, need performances instead of sorting, instead have used treemap, of course.

now, need, in function, sort hash map values key values (that strings). i'm using iterator iterate values.

any suggest?

thank you

you should put map.keyset in list sort , iterate on list of sorted keys.


Comments

Popular posts from this blog

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -