more optimized insertion sort algorithm

This commit is contained in:
David Gailleton
2025-12-14 17:31:36 +01:00
parent 0d01b58ff1
commit e9c90e447c
3 changed files with 49 additions and 110 deletions

4
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/12 14:06:41 by dgaillet ### ########lyon.fr */
/* Updated: 2025/12/14 16:55:43 by dgaillet ### ########lyon.fr */
/* */
/* ************************************************************************** */
@@ -67,7 +67,7 @@ int main(int argc, char **argv)
print_all_stack(stacks->b, stacks->b, 'B');
*/
//print_stacks(stacks, highest_stack_len(stacks), stacks->a, stacks->b);
insertion(stacks, 0, stack_a_len(stacks));
insertion(stacks, stack_a_len(stacks));
//print_stacks(stacks, highest_stack_len(stacks), stacks->a, stacks->b);
}
stack_clear_all(stacks->a, stacks->a);