Sorting Algorithms applied to LinkedLists