mergesort.c: Merge Sort algorithm library in C
In computer science, merge sort is an efficient, general-purpose, comparison-based sorting algorithm. Most implementations produce a stable sort, which means that the implementation preserves the input order of equal elements in the sorted output.Installing using Clib
$ clib install abranhe/mergesort.c
#include "mergesort.h" int main() { int arr[] = {10, 7, 12, 27, 30}; mergeSort(arr, 0, 5); // 7 10 12 27 30 }
See a real example.
void mergeSort(arr, first, last);
Implement merge sort.
array
: unsorted Arrayfirst
: first element of the array to start sortinglast
: last element of the array to finish sortingMIT License © Carlos Abraham
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4