Two Sigma interview question

Design a more efficient way to sort a list using a hashmap