push_swap

Description

This task requires arranging information on a stack using a restricted set of commands while minimizing the number of actions needed. To achieve this goal, you'll need to handle different sorting methods and select the most suitable approach for efficiently organizing the data.

Usage

Compiling

Run the following commands:

  • To compile
    $ make
  • To remove objects:
    $ make clean
  • To remove objects and binary file (program):
    $ make fclean
  • To re-compile:
    $ make re

execute

$ ./push_swap 4 5 1 2 0
rra
pb
rra
rra
pb
pa
pa

Testing

Third-party tester

I tested the library with this third-party tester:

Visualizer


Before sorting

screenshot_before

sorting

screenshot_sorting

Sorted

screenshot_sorted