You could map each of the names to a rank as an int, then sort the map by value
import Java.util.HashMap;
HashMap<String, Integer> scoresMap = new HashMap<String, Integer>();
//add a value into a map like this
scoresMap.put("name 1", 3);
//then make a function to sort the map
HashMap<String, Integer> sortedScoresMap;
sortedScoresMap = sortMapByValue(scoresMap);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…