Merge branch 'master' of github.com:DavidGailleton/42-Push_Swap into playtest

This commit is contained in:
Maoake Teriierooiterai
2026-01-16 10:20:36 +01:00
2 changed files with 6 additions and 2 deletions

View File

@@ -63,9 +63,13 @@ https://en.wikipedia.org/wiki/Sorting_algorithm
- **For BUCKET SORT** - **For BUCKET SORT**
https://www.meilisearch.com/blog/bucket-sort-guide https://www.meilisearch.com/blog/bucket-sort-guide
- **For BUCKET SORT** - **For RADIX**
https://www.geeksforgeeks.org/dsa/radix-sort/ https://www.geeksforgeeks.org/dsa/radix-sort/
### AI
AI was utilized to provide a reminder on how to include obj files within a subfolder for the Makefile.
## Additional sections may be required depending on the project ## Additional sections may be required depending on the project
### Justification to why we chose this algorithms ### Justification to why we chose this algorithms

2
main.c
View File

@@ -24,9 +24,9 @@ static int push_swap(char **tab, int len, int mod)
if (mod == -1) if (mod == -1)
return (0); return (0);
stacks = init_stacks(len, tab, mod); stacks = init_stacks(len, tab, mod);
indexer(stacks);
if (!stacks) if (!stacks)
return (0); return (0);
indexer(stacks);
if (check_order(stacks->a)) if (check_order(stacks->a))
{ {
free_all(stacks); free_all(stacks);