https://github.com/vomnes/push_swap
This project will make you sort data on a stack, with a limited set of instructions, using the lowest possible number of actions. #sort_algorithm
https://github.com/vomnes/push_swap
Last synced: 3 months ago
JSON representation
This project will make you sort data on a stack, with a limited set of instructions, using the lowest possible number of actions. #sort_algorithm
- Host: GitHub
- URL: https://github.com/vomnes/push_swap
- Owner: vomnes
- Created: 2017-02-16T08:00:38.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-04-02T17:35:43.000Z (over 8 years ago)
- Last Synced: 2025-03-16T17:37:52.829Z (7 months ago)
- Language: C
- Homepage:
- Size: 250 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Push_Swap
This project will make you sort data on a stack, with a limited set of instructions, using the lowest possible number of actions.
Available : 2 stacks and a set of instructions to manipulate both stacks.Checker:
The program checker takes integer arguments and reads instructions on the standard output. Once read, checker executes them and displays OK if integers are sorted. Otherwise, it will display KO.
Operations list - See "Shell" picturePush_swap:
This program calculates and displays on the standard output the smallest progam using Push_swap instruction language that sorts integer arguments received.```
./push_swap [list_of_numbers] | ./checker [list_of_numbers]
```
## Generate random numbers
```
`ruby -e "puts (1..50).to_a.shuffle.join(' ')"`
```## Options
Visual with -visual
```
./push_swap -visual [list_of_numbers]
```
Print stack a and b with -print
```
./push_swap -print [list_of_numbers]
```
Try operations in a shell with -shell
```
./checker -shell [list_of_numbers]
```### Push_swap
### Shell
### Visual
