• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Sorting Methods with Linked Lists

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
 
reply
    Bookmark Topic Watch Topic
  • New Topic