AppFolio interview question

String manipulation, sorting key values