This project involves sorting data on a stack, with a limited set of instructions, and the smallest number of moves. To make this happen, you will have to manipulate various sorting algorithms and choose the most appropriate solution(s) for optimized data sorting.
To install and build
git clone https://github.com/WOLFIE-OG/push_swap
cd push_swap
git submodule update --init --recursive
make
./push_swap 7 4 8 5 2 10 3 9 6 1
To run the tests
bash tests/test_10.sh
bash tests/test_10_1_arg.sh
bash tests/test_50.sh
bash tests/test_50_1_arg.sh
bash tests/test_100.sh
bash tests/test_100_1_arg.sh
To run the tests with additional debug information
make re CFLAGS+=-DDEBUG_PRINT=1
bash tests/test_10.sh
bash tests/test_10_1_arg.sh
bash tests/test_50.sh
bash tests/test_50_1_arg.sh
bash tests/test_100.sh
bash tests/test_100_1_arg.sh