/push_swap

Sorting a stack like a boss :)

Primary LanguageCMIT LicenseMIT

Welcome to push_swap 👋

The objective of this project is quite simple, sort data. You have at your disposal a set of integer values, 2 stacks, and a set of instructions to manipulate both stacks.


  • Status: Finished
  • Grade: 90%

Install

# On your terminal enter the following:
git clone https://github.com/LohanGuedes/push_swap push_swap
cd push_swap
make

Usage

  • Run the program passing the numbers to sort.
./push_swap 89 34 67 23 8 3 678 9

The program will output the movements needed to sort the numbers passed as parameter.

You can check it using the checker

Checking the output:

  • Linux
chmod +x checker_linux
./push_swap 89 34 67 23 8 3 678 9 | ./checker_linux 89 34 67 23 8 3 678 9
  • MacOS
chmod +x checker_Mac
./push_swap 89 34 67 23 8 3 678 9 | ./checker_Mac 89 34 67 23 8 3 678 9

Author

👤 Lohan Guedes

Show your support

Feel free to fork this project and send a pull request to it! I would love to see possible improvements ❤️‍🩹. Give a ⭐️ if this project helped you!