Linked list sorting with integers