J.P. Morgan interview question

Order an array of strings