Sorting homework and interview problems