Giter Club home page Giter Club logo

push_swap42tester's Introduction

push_swap42tester


Foreword

This repository contains my very own tester for push_swap, the 42 project in which you are given a list of unsorted numbers to sort in the least amount of push/swap/rotate/reverse-rotate operations using two stacks. It uses by default the provided checker_linux binary, but you can provide, for instance, your own checker (bonus part). Also included is a visualizer I found in another repo which is easy to use and a great help to find sorting inefficiencies.

Using the tester

  • Copy the tester and checker in the diretory containing your push_swap executable file.
  • With no argument, the tester performs tests on all permutations of 3 and 5 numbers, which respectively should yield less than 3 and 12 operations.
  • With arguments, the syntax is as follows: ./emistester.sh <a> <b> <c> (optional: custom checker) Where a-b is the range of numbers to shuffle and input in push_swap, and c is the number of tests to perform. Example : ./emistester.sh 1 100 100 ./checker

Using the visualizer

  • Copy the visualizer in the diretory containing your push_swap executable file.
  • To visualize your sorting for random numbers from 1 to 100, run python3 python_visualizer.py `ruby -e "puts (1..100).to_a.shuffle.join(' ')"` or python3 python_visualizer.py $(seq 1 100 | shuf | tr '\n' ' ')

push_swap42tester's People

Contributors

ethanolmethanol avatar

Stargazers

 avatar Pierre-Jean Duhamel avatar BASIL ALBADER 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.