Skip to content

Prodaturu/Pushswap_MechanicalTurk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pushswap Mechanical Turk

This repository contains the implementation of the Pushswap algorithm using the Mechanical Turk approach. Pushswap is a sorting algorithm specifically designed for integer arrays. The Mechanical Turk variant leverages the concept of outsourcing computational tasks to humans, mimicking the historical practice where a human chess player would make moves dictated by a "Turk" automaton.

Introduction

Pushswap is a sorting algorithm that operates on two stacks, named A and B. The algorithm sorts the A stack in ascending order using a set of operations defined for stack manipulation. The Mechanical Turk version of Pushswap involves outsourcing the decision-making process of selecting optimal moves to human participants, who provide instructions based on the current state of the stacks.

Usage

To utilize Pushswap Mechanical Turk, follow these steps:

  1. Clone the repository to your local machine: git clone https://github.com/Prodaturu/Pushswap_MechanicalTurk.git
  2. Navigate to the cloned directory: cd Pushswap_MechanicalTurk
  3. Run the Pushswap algorithm that uses Mechanical Turk algo to sort the stack: ./pushswap_mechanical_turk <integer_array> 4.Replace <integer_array> with the array you want to sort.

Contributing

Contributions to enhance the functionality, efficiency, or documentation of Pushswap Mechanical Turk are welcome. If you have ideas for improvements or bug fixes, feel free to open an issue or submit a pull request.

License

This project is licensed under the MIT License.

Acknowledgments

The Pushswap algorithm and its variants are inspired by the work of other 42 programmers in the field of computational algorithms and sorting techniques. Special thanks to Yigit Ogun whose medium article has inspired me to optimise the algorithm a little more.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published