WIP - push swap, a 42 school project about ordination algorithm.
- What's the difference between them?
- Which one is required for the
push_swap
project?
Let's suppose that you need to commute from your house to your work by car, but here is a traffic jam ahead, like Mr. Goofy from Disney: https://www.youtube.com/watch?v=_Tlk6e61E6w
You can drive like Mr. Goofy but at crazy mode accelerating a lot, changing lanes every second, hitting brakes... and eventually arriving at work.
But probably, you burned some really important resources from your car (gas, oil, brakes, engine), and from yourself (mental health, stress, anxiety, etc...)
However, you can also goes like the initial state from Mr. Goofy: a pleasant guy which could find another path or even just wait with pacience and love the innevitable truth: there will be a traffic jam ahead.
Without burning your brain, tires and fuel unnecessarily.
Push Swap is about a program that sort numbers from user's input, but also:
- has 2 stacks to store the given numbers;
- has 11 basic functions to move the numbers between stacks;
- calculates the total moviments to sort them;
- .
- .
- .