MathCo interview question

They asked to sort map using lamda functions.