push_swap

This project will make you sort data on a stack, with a limited set of instructions, using the lowest possible number of actions.

Screenshot 2022-03-27 at 20 18 28

ezgif-1-c4f3170bb7

Usage

make to compile source files

./push_swap <insert numbers> for sorting
ARG="<numbers>"; ./push_swap $ARG | checker_mac $ARG to verify the result
python3 pyviz.py `ruby -e "puts (-200..200).to_a.shuffle.join(' ')"` to visualize the sorting