This project is about sorting stacks algoritmics, in this we need to use algoritmics to choose what is the best moves to do to sort a stack, this moves was:
- ra: move all the stack a forward making the last element be the first.
- rb: move all the stack b forward making the last element be the first.
- rr: move all the stack a and b forward making the last element be the first.
- rra: move all the stack a behind making the first element the last.
- rrb: move all the stack b behind making the first element the last.
- rrr: move all the stack a and b behind making the first element the last.
- sa: change the fisrt elemnt with the second in stack a.
- sb: change the fisrt elemnt with the second in stack b.
- ss: change the fisrt elemnt with the second in stack a and b.
- pa: move the first element of stack b to the first element of stack a.
- pb: move the first element of stack a to the first element of stack b.
I use a ideia of quick sort to choose the moves, I find a pivot and move all number of is smaller than to a stack b and then my code continue to do that until they have less then 25 in stack b they use a insertion sort to choose what number to send to a ordening.
So long, and thanks for all the fish!
Give ⭐️ if you like this project, this will help me!