Skip to content

AmineAbeidDev/push_swap--Stacks-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

push_swap

ezgif com-crop

This project requires to make an algorithm to sort a stack of numbers with minimum operation in addition of a program (Checker) to check whether the operation which the algorithm follows actually sorts the program

We are allowd to manipulate the stack using another stack and six operation:

ra: to rotate the stack A (sends the first number to the end of stack A)
rb: to rotate the stack B

rra: to reverse rotate the stack A (sends the last number to the start of stack A)
rrb: to reverse rotate the stack B

pa: to send the first element of stack A to the start of stack B
pb: to send the first element of stack B to the start of stack A

after making:
    Execute: ./push_swap (set of non-duplicated numbers)
    Execute: ./checker (set of operation)

(Optmized for macOS)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published