Leggett & Platt Interview Question

Number sorting algorithm