MongoDB Interview Question

Simple sorting algorithm on a list.