diff --git a/Makefile b/Makefile index 455f8c4..216f92e 100644 --- a/Makefile +++ b/Makefile @@ -6,11 +6,11 @@ # By: cchauvet 2) + { + while (tab_a[0] > 1 && ft_tablen(tab_a) != 3) + ft_ra(tab_a); + ft_pb(tab_a, tab_b); + } + if (!ft_is_sorted(tab_a)) + ft_ra(tab_a); + ft_pa(tab_a, tab_b); + if (!ft_is_sorted(tab_a)) + ft_rra(tab_a); + if (ft_tablen(tab_b) > 1) + if (ft_is_sorted(tab_b)) + ft_rb(tab_b); + while (ft_tablen(tab_b) != 0) + ft_pa(tab_a, tab_b); +} diff --git a/ft_bozo_sort.o b/ft_bozo_sort.o new file mode 100644 index 0000000..5e30e59 Binary files /dev/null and b/ft_bozo_sort.o differ diff --git a/ft_r.c b/ft_r.c index 9d236fe..6dbb1c0 100644 --- a/ft_r.c +++ b/ft_r.c @@ -6,7 +6,7 @@ /* By: cchauvet 5) + ft_radix_sort(tab_a, tab_b); + else + ft_bozo_sort(tab_a, tab_b); free(tab_a); free(tab_b); } diff --git a/ft_sort.o b/ft_sort.o index d38c9ff..4d93f3e 100644 Binary files a/ft_sort.o and b/ft_sort.o differ diff --git a/main.c b/main.c index 793f5c0..0cb59e9 100644 --- a/main.c +++ b/main.c @@ -6,7 +6,7 @@ /* By: cchauvet