This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Java in General and the fly likes Sorting Methods with Linked Lists Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "Sorting Methods with Linked Lists" Watch "Sorting Methods with Linked Lists" New topic
Author

Sorting Methods with Linked Lists

Joel Cochran
Greenhorn

Joined: Sep 28, 2007
Posts: 6
I'm trying to create 3 different sorting methods (bubble, selection, insertion) that sorts the data in a linked list (custom made). I'm having big time problems with the selection and insertion. I've seen how to do this with arrays, but I just can't seem to make the swap to linked list. I've managed to get the bubble sort to work, but can't seem to get the other two (in fact, I haven't got anything for insertion yet). Here's what I have so far...


Any ideas on what's wrong with the selection sort, and any hints for the insertion? Thanks for all your help!
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Sorting Methods with Linked Lists
 
Similar Threads
null pointerException handling
compiler will not accept setprev or getprev to make doubly linked listin
Java Linked List
Linked List Sorting Problems
Linked List Sorting Problem