【发布时间】:2012-08-21 16:13:52
【问题描述】:
我有一个排序方案,我不知道如何实现它? 两个集合
List<<String>String> Key, List<<String>String> Value
我必须从 a-z 对值进行排序,这样对应值的键不应该改变。
>>eg: Key and Value
2=>two
100=>four
1=>five
0=>nine
3=>eight
8=>one
>>after Sorting:
3=>eight
1=>five
100=>four
0=>nine
8=>one
2=>two
有人请帮帮我吗?
【问题讨论】:
-
并且排序后不按字母顺序排序... 8=>one, 0=>nine ?
-
我的列表是分开的。不在一个集合中。即键和值或在与索引匹配的单独集合中。我必须对值进行排序,以便重新排序键。
标签: java sorting data-structures collections