dunnhumby Interview Question

Basic sorting algorithm and linked list.