GithubHelp home page GithubHelp logo

push-swap's Introduction

abrabant's stats abrabant's push swap final grade

ft_push_swap

ft_push_swap is an algorithm project done at 42 school: the goal is to sort numbers on a stack using a temporary stack and a limited and specified set of instructions.

You can learn more about the project by reading the subject included in this repo.

Performance

The results presented below have been determined after 1000 tests. The greater the number of test is, the more accurate the results are going to be.

I decided to stay with 1000 tests as it is good enough to visualize the performance of the algorithm for a project such as push_swap.

Only meaningful tests are reported below. Tests involving different amounts of random numbers may give way worse results, as I optimized the project to work specifically great with specific integer quantities (2, 3, 4, 5, 100 and 500).

2-5 cases are optimized manually (hardcoded).

Bigger cases are handled using a kind of mix between quick sort and insertion sort. The amount of splitting done is increased for greater quantities, such as 500.

Amount of random numbers Min. nb. of instructions Max. nb. of instructions
3 0 2
5 0 12
100 588 725
500 6334 7045

push-swap's People

Contributors

aurelien-brabant avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.