The input I've tested is: Peterson 2 Smith 6 Baxter 1.35 Peterson 3.1 McDonald 5.4 Baxter 3.4 McDonald 0.6 Baxter 1.25 The output is: Baxter McDonald Smith I made sure to test with duplicate highest values. The TreeMap made sense to me as we can easily look at the last Key using the lastKey() method and work from there.