Solution to insertion sort linked list