diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2020-10-11 14:05:28 +0200 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2020-10-11 14:05:28 +0200 |
| commit | 783260a4c01ebfe4b4bcfc56d57a4d99603f904f (patch) | |
| tree | 6ba1739662577db701969e33a79676c8f0460413 /src/algo/ft_heapsort.c | |
| parent | c33343322ef66d96337533082313b1256862023a (diff) | |
| download | libft-783260a4c01ebfe4b4bcfc56d57a4d99603f904f.tar.gz libft-783260a4c01ebfe4b4bcfc56d57a4d99603f904f.tar.bz2 libft-783260a4c01ebfe4b4bcfc56d57a4d99603f904f.zip | |
Norming and removing ft_printf,heapsort
Diffstat (limited to 'src/algo/ft_heapsort.c')
| -rw-r--r-- | src/algo/ft_heapsort.c | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/src/algo/ft_heapsort.c b/src/algo/ft_heapsort.c deleted file mode 100644 index d309624..0000000 --- a/src/algo/ft_heapsort.c +++ /dev/null @@ -1,54 +0,0 @@ -/* ************************************************************************** */ -/* */ -/* ::: :::::::: */ -/* ft_heapsort.c :+: :+: :+: */ -/* +:+ +:+ +:+ */ -/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */ -/* +#+#+#+#+#+ +#+ */ -/* Created: 2020/02/10 02:59:22 by cacharle #+# #+# */ -/* Updated: 2020/02/10 04:22:19 by cacharle ### ########.fr */ -/* */ -/* ************************************************************************** */ - -#include "libft_algo.h" - -/* static void st_build_max_heap(void *base, size_t nel, size_t width, */ -/* int (*compar)(const void *, const void *)) */ -/* { */ -/* int i; */ -/* */ -/* i = 1; */ -/* while (i < nel) */ -/* { */ -/* compar(base + i * width, base + 2 * i * width) */ -/* */ -/* i++; */ -/* } */ -/* } */ -/* */ -/* static void st_heapify(void *base, size_t nel, size_t width, */ -/* int (*compar)(const void *, const void *)) */ -/* { */ -/* */ -/* } */ - -int ft_heapsort(void *base, size_t nel, size_t width, - int (*compar)(const void *, const void *)) -{ - (void)base; - (void)nel; - (void)width; - (void)compar; - /* size_t i; */ - /* */ - /* if (nel < 2) */ - /* return (0); */ - /* st_build_max_heap(base, nel, width, compar); */ - /* i = -1; */ - /* while (++i < nel) */ - /* { */ - /* ft_memswap(base, base + (nel - i - 1) * width); */ - /* st_heapify(base, nel - i - 1, width, compar); */ - /* } */ - return (0); -} |
