Skip to content

Sort a queue using only a few allowed moves. You cannot cut the queue. Beware of the checker police program !

Notifications You must be signed in to change notification settings

snassour/42push_swap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

42push_swap

Sort a queue using only a few available moves. You cannot cut the queue.

Quick description

Gets different integer numbers from the standard input, here's your queue (queue a). You only have one auxiliary queue available (queue b)../push_swap uses queue a and queue b in order to sort automatically queue a
Available moves are listed in the PDF
A ./checker program is available in order to check if the moves sort the queue or not. It reads the list of integers as parameters, and the list of moves on the standard input. A verbose (option -v before the integer list) mode is available if you want to display the queues.

Run the code !

compile : make ; make clean
push_swap : ./push_swap [INT LIST]
checker : ./checker [OPTIONAL [-v]] [INT LIST]

PDF Link push_swap

About

Sort a queue using only a few allowed moves. You cannot cut the queue. Beware of the checker police program !

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published