bubble algorithm WIP

This commit is contained in:
Maoake Teriierooiterai
2025-12-09 12:43:28 +01:00
parent c9066f4a9b
commit ad4275c206
3 changed files with 39 additions and 3 deletions

10
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 11:39:55 by mteriier ### ########lyon.fr */
/* Updated: 2025/12/09 12:39:19 by mteriier ### ########lyon.fr */
/* */
/* ************************************************************************** */
@@ -41,7 +41,7 @@ int main(int argc, char **argv)
if (argc > 1)
{
stacks = init_big_stacks(argc, argv);
print_all_stack(stacks->a, stacks->a, 'A');
/* print_all_stack(stacks->a, stacks->a, 'A');
print_all_stack(stacks->b, stacks->b, 'B');
sa(stacks);
print_all_stack(stacks->a, stacks->a, 'A');
@@ -65,6 +65,12 @@ int main(int argc, char **argv)
rrr(stacks);
print_all_stack(stacks->a, stacks->a, 'A');
print_all_stack(stacks->b, stacks->b, 'B');
*/
print_all_stack(stacks->a, stacks->a, 'A');
print_all_stack(stacks->b, stacks->b, 'B');
bubble_alg(stacks);
print_all_stack(stacks->a, stacks->a, 'A');
print_all_stack(stacks->b, stacks->b, 'B');
}
stack_clear_all(stacks->a, stacks->a);
}