MathCo Interview Question

They asked to sort map using lamda functions.