Selection, Insertion, Merge sorting using Linked List

I've been fussing around this particular problem for two days now and I can't seemm to get my head around it. Can someone enlighten me on this and if possible, give me a sample code? Help would be appreciated.
Algorithms are not easy to understand and implement. Don't take the whole problem at a time. Rather, break it in small parts.

so, first try to write selection sort. This would be easiest. Insertion sort would be easiest too. Implementing them for the first time using linked list would be tough.
I suggest, first implement selection sort using an array ( a small array) and see if its working. This will give you a good understanding of the sort and then see if you can implement them using linked list.

In case this is not a timely assignment, it would be good if you implement all these using an array and then go on to implement using linked list. Linked list is tough because the memory is not contagious and some of these algorithms expect a contagious memory.

For help, you many refer wikipedia.

Other good books can be - Introduction to Algorithms - Thomas H. Cormen. In this book you would get pseudo code and can implement them in your desired language.
Topic archived. No new replies allowed.