Merge sort is the second guaranteed O(n log(n)) sort. Merge sort requires additional memory proportional to the size of the input for scratch space, but it is stable sorting algorithm. Merge sort is often preferred for sorting a linked list.
Click here for merge sort in C
Comments
Post a Comment