TBO.com Interview Question

String comparison and then sort