Resolution - pin3dev/42_PushSwap GitHub Wiki
💭 The Logic
Although there are several classic sorting algorithms, such as Bubble Sort, Insertion Sort, Merge Sort and Quick Sort, they are not suitable for this project due to their inefficiency in minimizing the number of moves required to sort a list.
These algorithms can require a significant number of moves, which does not meet the constraints of the project.
In search of a solution, I came across A. Yigit Ogun article, where he explains the algorithm he created that solves the problem in a simple and exceptional way.
Based on the explanation in this article I was able to build my project, and although I think the article explains the concept very well, I'd like to document my application of the concept, which differs in some points from the original.