Skip to content

An efficient sorting algorithm project for organizing integer stacks.

Notifications You must be signed in to change notification settings

mdesmartin/push_swap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

push_swap

push_swap is a sorting algorithm visualization program developed as part of the 42 school curriculum. It aims to sort a stack of integers using a limited set of operations, with the objective of achieving the smallest number of operations possible. The program showcases algorithmic thinking, problem-solving skills, and optimization techniques.

The primary goal of push_swap is to implement an efficient sorting algorithm for a stack of integers, utilizing two stacks and a limited set of operations. The challenge lies in finding the optimal sequence of operations to rearrange the stack in ascending order while minimizing the number of moves.

Key Features:

  • Sorting algorithm: push_swap employs a combination of sorting algorithms and heuristics to efficiently sort the stack of integers.
  • Stack manipulation: The program provides operations such as swapping the top elements of the stacks, rotating the stack, and pushing elements between stacks.
  • Visualization: push_swap offers a visual representation of the sorting process, allowing users to observe the stack transformations and the operations performed.
  • Optimization strategies: The program incorporates various optimization techniques, such as sorting subsets of the stack separately and choosing the most efficient operation sequence based on predefined rules.

By working on push_swap, you will gain valuable experience in algorithm design, optimization strategies, and problem-solving techniques. It challenges your ability to analyze and manipulate data structures efficiently, providing a practical application of sorting algorithms in a constrained environment.

Note: This project was developed as part of the 42 school curriculum and should be considered a learning exercise rather than a comprehensive sorting algorithm for general use.

About

An efficient sorting algorithm project for organizing integer stacks.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages