New insertion algorithm WIP

This commit is contained in:
David Gailleton
2025-12-11 18:42:33 +01:00
committed by David Gailleton
parent 1463f3e14a
commit f5da9fac1f
7 changed files with 197 additions and 8 deletions

7
main.c
View File

@@ -6,7 +6,7 @@
/* By: mteriier <mteriier@student.42lyon.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/12/08 18:32:35 by mteriier #+# #+# */
/* Updated: 2025/12/09 13:52:43 by dgaillet ### ########lyon.fr */
/* Updated: 2025/12/11 18:32:06 by dgaillet ### ########lyon.fr */
/* */
/* ************************************************************************** */
@@ -66,8 +66,9 @@ int main(int argc, char **argv)
print_all_stack(stacks->a, stacks->a, 'A');
print_all_stack(stacks->b, stacks->b, 'B');
*/
bubble_alg(stacks);
//print_stacks(stacks, highest_stack_len(stacks), stacks->a, stacks->b);
print_stacks(stacks, highest_stack_len(stacks), stacks->a, stacks->b);
insertion(stacks, stack_a_len(stacks), 0);
print_stacks(stacks, highest_stack_len(stacks), stacks->a, stacks->b);
}
stack_clear_all(stacks->a, stacks->a);
stack_clear_all(stacks->b, stacks->b);