This repository contains a program written in C that implements a sorting algorithm to arrange a stack of integers in ascending order using a limited set of stack operations. The push-swap algorithm aims to efficiently sort the elements in Stack A while adhering to specific constraints on memory usage and operation counts.
Implementation of a sorting algorithm using a limited set of stack operations (sa, sb, ss, pa, pb, ra, rb, rr, rra, rrb, rrr). Two stacks are utilized: Stack A (the initial unsorted stack) and Stack B (an auxiliary stack used for sorting). Focuses on minimizing the number of operations required to sort Stack A in ascending order. Emphasizes optimization and efficiency in sorting algorithms, considering memory usage and operation counts. Interactive and configurable, allowing users to input integers and observe the sorting process.
Developed as an algorithmic challenge/project to explore sorting techniques and algorithm design using limited operations. Encourages understanding of various sorting algorithms and their implementation in a constrained environment. Aims to enhance problem-solving skills, algorithm optimization, and efficient use of available resources.
Quick Sort => https://www.javatpoint.com/quick-sort
Clone the repository and compile the C source code using a compatible C compiler. Execute the compiled program, providing a set of integers or generating random integers to observe the sorting process. Observe the output to analyze the efficiency and number of operations used for sorting.
This repository contains a solution specific to the push-swap project requirements and may be part of an educational course or coding challenge. Contributions, enhancements, or alternative sorting algorithms using the limited set of operations are welcomed.