J.P. Morgan Interview Question

Simple sorting algorithm.