Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/daviamsilva/sorts
Coleção de algoritmos de ordenação
https://github.com/daviamsilva/sorts
faculdade sorting-algorithms
Last synced: about 2 months ago
JSON representation
Coleção de algoritmos de ordenação
- Host: GitHub
- URL: https://github.com/daviamsilva/sorts
- Owner: DaviAMSilva
- License: gpl-3.0
- Created: 2021-03-09T00:45:08.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-06-22T00:25:18.000Z (over 3 years ago)
- Last Synced: 2023-03-06T04:18:36.967Z (almost 2 years ago)
- Topics: faculdade, sorting-algorithms
- Language: C
- Homepage:
- Size: 26.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Sorts
**Coleção de algoritmos de ordenação.**
Para as funções de comparação pense que o item de mais *importância* fica no final da lista, e a função deve retornar um número positivo se o primeiro parâmetro é mais *importante* do que o segundo, 0 se forem iguais e um número negativo nos outros casos.
## Ordenações suportadas
- [x] `libbinary_insertion_sort`
- [x] `libbogo_sort`
- [x] `libbubble_sort`
- [x] `libheap_sort`
- [x] `libinsertion_sort`
- [x] `libmerge_sort`
- [x] `libquick_sort`
- [x] `libradix_sort`
- [x] `libselection_sort`
- [x] `libshell_sort`## Cabeçalhos
```c
bool binary_insertion_sort(void *ptr, size_t num, size_t size, int (*compare)(const void *, const void *));
bool bogo_sort (void *ptr, size_t num, size_t size, int (*compare)(const void *, const void *));
bool bubble_sort (void *ptr, size_t num, size_t size, int (*compare)(const void *, const void *));
bool heap_sort (void *ptr, size_t num, size_t size, int (*compare)(const void *, const void *));
bool insertion_sort (void *ptr, size_t num, size_t size, int (*compare)(const void *, const void *));
bool merge_sort (void *ptr, size_t num, size_t size, int (*compare)(const void *, const void *));
bool quick_sort (void *ptr, size_t num, size_t size, int (*compare)(const void *, const void *));
bool radix_sort (void *ptr, size_t num, size_t size, size_t buckets, size_t iterations, int (*categorize)(const void *, size_t));
bool selection_sort (void *ptr, size_t num, size_t size, int (*compare)(const void *, const void *));
bool shell_sort (void *ptr, size_t num, size_t size, int (*compare)(const void *, const void *));
```