Push_swap
Project spotlight

Push_swap

C project focused on solving a data sorting problem using two stacks (Stack A and Stack B) and a limited set of operations. The main objective was to find the shortest and most efficient sequence of moves.
Technical Solution
· Optimized Algorithm: I implemented sorting logic based on calculating the move cost per element, adapting the strategy according to the data volume (especially for 100 and 500 numbers).
· Low-Level Programming: I developed the C code with strict memory management, ensuring a leak-free program and robust error handling for data input.
· Efficiency: I programmed and combined the allowed instructions (sa, pb, ra, rrb, etc.) minimizing the total cost of operations.
Result
A fast and optimized algorithm that successfully exceeds the required efficiency and performance limits, demonstrating a solid grasp of data structures and algorithmic logic under strict constraints.

Published 01.12.2025 Pure C
Open project