Skip to content

A project to sort data using a limited set of instructions, aiming for minimal operations. Implement algorithms efficiently in C to achieve optimized sorting

Notifications You must be signed in to change notification settings

sdummett-at-42/push_swap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to push_swap!

This project involves sorting data on a stack, with a limited set of instructions, and the smallest number of moves. To make this happen, we will have to manipulate various sorting algorithms and choose the most appropriate solution(s) for optimized data sorting.

Installation

Clone the repository:

git clone [email protected]:sdummett/push_swap.git

Make to install the push_swap and checker program:

make

If you want to install only push_swap:

make push_swap

If you want to install only the checker:

make checker

Usage

push_swap

You can run the push_swap program with a number per argument:

./push_swap 2 1 3

If you want to use an environment variable on zsh:

ARG="2 1 3"; ./push_swap ${=ARG}

On bash:

ARG="2 1 3"; ./push_swap $ARG

checker

The checker program will take a list of instructions on his stdin and the list of number to be sorted as parameters. Example:

./push_swap 2 1 3 | ./checker 2 1 3

Or with environment variable on zsh:

ARG="1 2 3"; ./push_swap ${=ARG} | ./checker ${=ARG}

On bash:

ARG="1 2 3"; ./push_swap $ARG | ./checker $ARG

Author

👤 Stone

About

A project to sort data using a limited set of instructions, aiming for minimal operations. Implement algorithms efficiently in C to achieve optimized sorting

Topics

Resources

Stars

Watchers

Forks