Skip to content

A 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.

Notifications You must be signed in to change notification settings

merituulie/push_swap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

About

A 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.

Topics

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published