Push_swap is a program that sorts a stack of integers with the minimum instructions possible and an auxiliary stack. Instructions are defined within the subject of the project; They're the only way allowed to manipulate the data in the stacks.
checker is a utility program that, taking the same arguments as push_swap and its outputted instructions, checks if the stack ends up sorted, thus verifying if push_swap is correctly sorting the stack
1- Clone this repository
git clone https://github.com/Kuninoto/42_push_swap
2- Navigate to lvl_2_push_swap and run make
cd 42_push_swap/lvl_2_push_swap && make
3- make clean
so that you don't keep those object files that you won't need anymore
make clean
4- Run push_swap with a list of integers of your choice!
./push_swap <nbr> <nbr> <nbr> <nbr> ...
Subject (v6): push_swap en_subject
Although I was only able to do an algorithm that gives 90/100 in this project (i.e the bonus part cannot be accessed on the evaluation) I've still made the bonus part because I found it interesting and quite easy. I left it on bonus folder for the record.
make
or make all
- Makes push_swap
make clean
- Deletes all the resulting object files
make fclean
- Deletes push_swap and checker
make re
- fclean + all
make bonus
- Makes checker
- Medium article about the project
- Another medium Article about the project
- Insertion Sort
- Merge Sort
- Quick Sort
- Algorithm from another 42 student
- Handy random number generator to test the program
At 42School, almost every project must be written in accordance to the Norm, the schools' coding standard. As a result, the implementation of certain parts may appear strange and for sure had room for improvement.
Made by Nuno Carvalho (Kuninoto) | nnuno-ca@student.42porto.com