← Back to catalog

push_swap

This project was made as a tool to visualize push_swap project from école 42. The goal is to sort random numbers in ascending order into stack_a with the minimum possible number of operations. To do this you have the following operations at your disposal: sa : swap a - swap the first 2 elements at the top of stack_a.sb : swap b - swap the first 2 elements at the top of stack_b.ss : sa and sb at the same time. pa : push a - take the first element at the top of b and put it at the top of a. Do nothing if b is empty.pb : push b - take the first element at the top of a and put it at the top of b. Do nothing if a is empty. ra : rotate a - shift up all elements of stack_a by 1. The first element becomes the last one. rb : rotate b - shift up all elements of stack_b by 1. The first element becomes the last one. rr : ra and rb at the same time. rra : reverse rotate a - shift down all elements of stack_a by 1. The last element becomes the first one. rrb : reverse rotate b - shift down all elements of stack_b by 1. The last element becomes the first one. rrr : rra and rrb at the same time. made with love in a cold pandemic weekend by paula, 42SP student, and vinicius. Any issues please let us know ;)

phemsi-a 1 games· 4 followers· 3 ratings· portfolio 28 View creator →
PLAY IN BROWSER
ItchDB signals
★ 5 avg rating
3 ratings +0 / 7d
0 comments +0 / 7d
Catalog standing Top 28%
#112,574 of 399,796most rated

Ratings over time

Cumulative · 30d
3 30d ago today
Cumulative ratings