How to sort singly linked lists with merged sort?

Jul 11, 2012 at 2:43pm
Are there any header files, that just go like: merge_sort(list beginning, list end) or do I have to create my own code or are there any codes that I can implement to my own? (So far the ones that I've seen seem to be really different from each other, or I'm just sleepy...)
Jul 12, 2012 at 5:50am
...
Last edited on Jul 12, 2012 at 10:36am
Jul 12, 2012 at 7:02am
I do want the code. Thank you! :)
You mean this code, right? http://www.geeksforgeeks.org/archives/7740
The only command in C is printf in the code, right?

To googlers: I replaced every struct node with my own struct name. E.g. my struct name was bunny
struct node --> struct bunny . And you'll have to edit it as you need in some places.


Edit: Got it to work as I wanted, thank you. ^^
(Do most of the programmers take a code like that and implement it to theirs, or do they write their own algorithms?)
Last edited on Jul 12, 2012 at 8:00am
Topic archived. No new replies allowed.