MindTheGap
02-18-2009, 06:05 AM
So my friend and I were trying to devise an algorithm to sort a TreeMap by value.
We only want to do this with:
TreeMaps
HashMaps
TreeSets
HashSets
Nothing else.
We spent a good 3 hours trying to figure it out but we came up empty handed. Does anyone know if
A. if its even possible.
and
B. If its possible, how would you accomplish it? (in pseudocode, but in real code if you are feeling generous).
Thanks.
We only want to do this with:
TreeMaps
HashMaps
TreeSets
HashSets
Nothing else.
We spent a good 3 hours trying to figure it out but we came up empty handed. Does anyone know if
A. if its even possible.
and
B. If its possible, how would you accomplish it? (in pseudocode, but in real code if you are feeling generous).
Thanks.