Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/abranhe/mergesort.c
Merge Sort algorithm in C
https://github.com/abranhe/mergesort.c
abranhe algorithm allalgorithms c clib merge-sort mergesort sort sorting-algorithms
Last synced: 26 days ago
JSON representation
Merge Sort algorithm in C
- Host: GitHub
- URL: https://github.com/abranhe/mergesort.c
- Owner: abranhe
- License: mit
- Created: 2018-11-05T07:41:06.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-11-07T01:20:05.000Z (almost 6 years ago)
- Last Synced: 2024-05-21T00:39:44.477Z (6 months ago)
- Topics: abranhe, algorithm, allalgorithms, c, clib, merge-sort, mergesort, sort, sorting-algorithms
- Language: C
- Size: 9.77 KB
- Stars: 6
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
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.## Installation
*Installing using [Clib](https://github.com/clibs/clib)*
```sh
$ clib install abranhe/mergesort.c
```## Usage
```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][example].
## API
#### `void mergeSort(arr, first, last);`
*Implement merge sort.*
###### Params:
- `array`: unsorted Array
- `first`: first element of the array to start sorting
- `last`: last element of the array to finish sorting## Team
|[![Carlos Abraham Logo][abranhe-img]][abranhe]|
| :-: |
| [Carlos Abraham][abranhe] |## License
[MIT][license] License © [Carlos Abraham][abranhe]
[abranhe]: https://github.com/abranhe
[abranhe-img]: https://avatars3.githubusercontent.com/u/21347264?s=50
[license]: https://github.com/abranhe/mergesort.c/blob/master/license
[example]: https://github.com/abranhe/mergesort.c/blob/master/example.c
[travis-badge]: https://img.shields.io/travis/abranhe/mergesort.c.svg
[travis-status]: https://travis-ci.org/abranhe/mergesort.c
[coverage-badge]: https://img.shields.io/coveralls/abranhe/mergesort.c.svg
[coverage-status]: https://coveralls.io/r/abranhe/mergesort.c?branch=master