Skip to content

TedTran2019-42/push_swap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

push_swap

A program that takes in a list of numbers onto a stack, then has to sort said stack using another stack. Essentially, you have 2 stacks to sort a list of numbers.

A limited number of operations are given

  • swap 2 elements on stack a

  • swap 2 elements on stack b

  • both the above at the same time

  • push element on top of stack a to top of stack b

  • push element on top of stack b to top of stack a

  • both the above at the same time

  • rotate stack a, first element becomes last

  • rotate stack b, first element becomes last

  • both the above at same time

  • reverse rotate stack a, last element becomes the first

  • reverse rotate stack b, last element becomes the first

  • both the above at the same time

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published