How to sort singly linked lists with merged sort?

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...)
...
Last edited on
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
Topic archived. No new replies allowed.