diff options
| author | Charles <sircharlesaze@gmail.com> | 2020-02-13 23:15:16 +0100 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2020-02-13 23:15:16 +0100 |
| commit | adbcf69ed50ea3896d4bbe863ea5d214ae5a0299 (patch) | |
| tree | 4865b665e44711b7675c78a4152985ea451eca79 /README.md | |
| parent | 7d626e7e9638d7e85c3dacce8a4aee009850a1a2 (diff) | |
| download | libft-adbcf69ed50ea3896d4bbe863ea5d214ae5a0299.tar.gz libft-adbcf69ed50ea3896d4bbe863ea5d214ae5a0299.tar.bz2 libft-adbcf69ed50ea3896d4bbe863ea5d214ae5a0299.zip | |
Added tests for algo*, fixing ft_bsearch and ft_mergesort
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 23 |
1 files changed, 12 insertions, 11 deletions
@@ -46,17 +46,18 @@ Much like the `.gitignore` file, you can put the files/directory to ignore when ### algo -| Name | Prototype | Description | Tested | -|---------------|-----------|-------------|--------| -| ft_bsearch | | | [ ] | -| ft_compar_int | | | [ ] | -| ft_heapsort | | | [ ] | -| ft_is_set | | | [ ] | -| ft_lfind | | | [ ] | -| ft_lsearch | | | [ ] | -| ft_mergesort | | | [ ] | -| ft_qsort | | | [ ] | -| ft_reverse | | | [ ] | + +| Name | Prototype | Description | Tested | +|---------------|-----------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------|--------| +| ft_bsearch | `void *ft_bsearch(const void *base, size_t nel, size_t width, t_ftsearch_const *consts)` | search `consts.key` in `base` using binary search (NULL if not found) | [x] | +| ft_compar_int | `int ft_compar_int(const void *a, const void *b)` | comparison function of `int` | [x] | +| ft_heapsort | `int ft_heapsort(void *base, size_t nel, size_t width, int (*compar)(const void *, const void *))` | sort `base` using heapsort | [?] | +| ft_is_set | `t_ftbool ft_is_set(void *base, size_t nel, size_t width, t_ftcompar_func compar)` | check is `base` has unique elements | [x] | +| ft_lfind | `void *ft_lfind(const void *base, size_t *nelp, size_t width, t_ftsearch_const *consts)` | search `consts.key` in `base` using linear search (NULL if not found) | [x] | +| ft_lsearch | `void *ft_lsearch(const void *base, size_t *nelp, size_t width, t_ftsearch_const *consts)` | search `consts.key` in `base` using linear search (insert at the end if not found) | [x] | +| ft_mergesort | `int ft_mergesort(void *base, size_t nel, size_t width, int (*compar)(const void *, const void *))` | sort `base` using mergesort | [x] | +| ft_qsort | `void ft_qsort(void *base, size_t nel, size_t width, t_ftcompar_func compar)` | sort `base` using quicksort | [x] | +| ft_reverse | `void ft_reverse(void *base, size_t nel, size_t width)` | reverse `base` | [x] | ### bt |
