Skip to content

Stemmzi/42_push_swap

Repository files navigation

42_push_swap

This is my solution for the push_swap project from 42 school. I follow an approach where I calculate a price for every number and then always move the cheapest element. Price means the amount of operations you have to do to sort the number correctly back into stack a.

Details

  • It is only the mandatory part with 100/100 points.
  • I solve 500 numbers with < 5000 operations and 100 numbers with < 600 operations.

Makefile infos

Inside of the makefile you have following command:

  • The classics: all, clean, fclean and re.
  • Test: Compiles everything and executes the program with the arguments set in ARG = .
  • Debug: Compiles everything with the -g flag so you can use a debugger.

Helpful resources

  • Amazing visualizer: here.
  • Nice tester: here.
  • And this one: here.

About

This is my most recently finished project.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published