Showing posts with label mergesort. Show all posts
Showing posts with label mergesort. Show all posts

Wednesday, May 16, 2012

Sorting a linked list in Java


I have written a bubble sort algorithm to sort a linked list. I am a Java beginner and trying to learn data structures. I am confused why my second element is not sorted properly.