The Push_swap project challenges you to sort data on a stack using a limited set of instructions, aiming for the lowest possible number of actions. It requires the manipulation of various algorithms to find the most efficient solution for optimized data sorting.
- Develop a sorting algorithm in C that sorts a set of integers using stacks.
- Learn and apply basic algorithms and focus on understanding their complexity.
- Emphasize rigor, use of C, and adherence to project specifications.
- Two stacks named 'a' and 'b'.
- Stack 'a' contains a random amount of negative and/or positive numbers.
- Stack 'b' is initially empty.
- Goal: Sort stack 'a' in ascending order using specified operations.
Example illustrates sorting a random list of integers:
$>./push_swap 2 1 3 6 5 8
sa
pb
pb
pb
sa
pa
pa
pa