Skip to content

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

Notifications You must be signed in to change notification settings

lightiverson/push_swap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Push_swap

Sort data in a stack using a limited set of instructions. Aim to achieve the lowest possible number of actions.

The goal is to explore various algorithms and their complexities. This exercise requires rigor and a proficiency in C.

Grade: 109/100 (includes bonus)

Features

  • Uses a variation on Radix sort for larger stacks (also uses Bubble sort as a helper function)
  • Uses a custom algorithm (somewhat mix of Insertion sort and Merge sort)
  • Includes a self made checker for bonus

Usage/Examples

Execute push swap

    ./push_swap 0 2 1

Execute checker

    cd checker
    make
    ../push_swap 0 2 1 | ./checker 0 2 1

About

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

Topics

Resources

Stars

Watchers

Forks