aspose file tools*
The moose likes Beginning Java and the fly likes Linked List Sorting Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Reply locked New topic
Author

Linked List Sorting Problem

Joel Cochran
Greenhorn

Joined: Sep 28, 2007
Posts: 6
I'm trying to sort a list of integers using bubble sort, insertion sort and selection sort and so far it isn't going so hot. I've created my own LinkedList class (singly linked list) and am a little stuck. Here's everything I have so far...








Ignore the insertionSort method. The bubbleSort methods ALMOST works. For some reason it ignores about half the list and sorts the other half correctly. Any tips/advice on improving my existing code and help on the other sorting methods will be VERY much appreciated. Thanks!!
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29241
    
139

Please don't post the same question in multiple forums. This makes replies harder to follow.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Linked List Sorting Problem
 
Similar Threads
Generics: cannot make a static reference to the non-static type
compiler will not accept setprev or getprev to make doubly linked listin
Sorting Methods with Linked Lists
Linked List Sorting Problems
null pointerException handling