Skip to content

This project involves sorting data on a stack, with a limited set of instructions, and the smallest number of moves

Notifications You must be signed in to change notification settings

Abdellahmaarifa-1337/push_swap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Push_swap

Introduction

The Push_swap project challenges you to sort data on a stack using a limited set of instructions, aiming for the lowest possible number of actions. It requires the manipulation of various algorithms to find the most efficient solution for optimized data sorting.

Objectives

  • Develop a sorting algorithm in C that sorts a set of integers using stacks.
  • Learn and apply basic algorithms and focus on understanding their complexity.
  • Emphasize rigor, use of C, and adherence to project specifications.

Mandatory Part

Rules

  • Two stacks named 'a' and 'b'.
  • Stack 'a' contains a random amount of negative and/or positive numbers.
  • Stack 'b' is initially empty.
  • Goal: Sort stack 'a' in ascending order using specified operations.

Example

Example illustrates sorting a random list of integers:

$>./push_swap 2 1 3 6 5 8
sa
pb
pb
pb
sa
pa
pa
pa

About

This project involves sorting data on a stack, with a limited set of instructions, and the smallest number of moves

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published