merituulie / push_swap Goto Github PK
View Code? Open in Web Editor NEWA sorting algorithm to sort an integer array with two stacks. In addition to basic stack behavior the stack have the ability to be rotated for- and backwards. The algorithm sorts a list of 2, 3, 5, 100 and 500 in less than 1, 2, 8, 700 and 7000 moves on average.