Skip to content

Latest commit

 

History

History
36 lines (26 loc) · 904 Bytes

README.md

File metadata and controls

36 lines (26 loc) · 904 Bytes

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