42/push_swap.git
21 months agoWeaken the 3 or less sort and fix binary search
Lukas Jiriste [Fri, 23 Feb 2024 11:13:25 +0000 (12:13 +0100)]
Weaken the 3 or less sort and fix binary search

The a_sort_three_or_less function needs not to rotate,
as the a stack will be rotated many times during the insertion.

21 months agoFix is_sorted so it does not change its argument.
Lukas Jiriste [Fri, 23 Feb 2024 09:59:51 +0000 (10:59 +0100)]
Fix is_sorted so it does not change its argument.

21 months agoImplement a sorting algorithm
Lukas Jiriste [Fri, 23 Feb 2024 09:36:57 +0000 (10:36 +0100)]
Implement a sorting algorithm

The idea is to push everything except for 3 elements from a to b.
Stack a can then be trivially sorted after which we can insert
(the cheapest) elements from b to the correct place in a.

The implementation needs to be refined as it does not actually sort.

21 months agoUpdate Libft to gain access to ft_max and ft_min
Lukas Jiriste [Fri, 23 Feb 2024 09:36:20 +0000 (10:36 +0100)]
Update Libft to gain access to ft_max and ft_min

21 months agoRefactor stack functions from checker.c
Lukas Jiriste [Tue, 6 Feb 2024 13:55:32 +0000 (14:55 +0100)]
Refactor stack functions from checker.c

21 months agoRefactor dir structure and prog argument parsing
Lukas Jiriste [Tue, 6 Feb 2024 12:23:16 +0000 (13:23 +0100)]
Refactor dir structure and prog argument parsing

22 months agoStart the project, implement checker
Lukas Jiriste [Wed, 24 Jan 2024 13:44:15 +0000 (14:44 +0100)]
Start the project, implement checker