AppFolio Interview Question

String manipulation, sorting key values