Question d’entretien chez J.P. Morgan

Given a string, sort its words