Skip to content

Sorting algorithm using two stacks with a limited set of instructions.

Notifications You must be signed in to change notification settings

f0lio/push_swap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

push_swap

Sorting data on a stack, with a limited set of instructions, using the lowest possible number of actions.

Subject's Summary:

This project will make you sort data on a stack, with a limited set of instructions, using the lowest possible number of actions. To succeed you’ll have to manipulate various types of algorithms and choose the one (of many) most appropriate solution for an optimized data sorting

Usage:

Just run make a the root folder

Push_swap

Example:

./push_swap 2 4 3
sa
ra

Checker

A program that checks (from args) if an array of integers can be sorted with a given set of instructions (output from push_swap).
It outputs OK or KO

Example:

./checker 2 4 3
sa
ra
OK

P.S.

Project requires push_swap to sort arrays of 500 integers and less.

About

Sorting algorithm using two stacks with a limited set of instructions.

Resources

Stars

Watchers

Forks