Giter Club home page Giter Club logo

sorting-algorithm's Introduction

Sorting Algorithm Visualizer

View sorting algorithms here.

How to View

Simply prepare your favorite modern browser.

  1. Navigate to https://sorting-algorithm-jet.vercel.app/.

  2. To select a specific sorting algorithm:

    a. Press the button on the top of the page after the "Sorting with" text.

    b. Press on any of the buttons displayed.

  3. To customize graph, sound, samples, or sorting:

    a. Look either below the graph or to the right. Click on the menu, for example: Sound Settings.

    b. Look over the slider menu that appeared below the menu containing button you clicked.

    c. To change an option, slide the square along the slider.

Contributing

If you wanted to add additional algorithms, such as sorting algorithms. Navigate to src/settings/{Setting Name} and create a .ts file. To help with when creating algorithms, please take these advice.

Settings Name Advice
Sorting Algorithm
  • Variables that persist after every iteration is stored in the data parameter as any.
  • Sorting algorithms are supposed to only perform a few actions to the array everytime it's called.
  • With recusive algorithms (like Stooge Sort) you could unravel algorithms into a "nests" array. Replace each recursive call by pushing to the "nests" array instead. Refer to StoogeSort.ts for better understanding.
  • With Iterative algorithms (like Gnome Sort) replace all for(a; b; c) {d} with: a; if (b) { d }; c. Refer to GnomeSort.ts for better understanding.
  • Push indexes of coordinates changing or comparing to data.highlight. Define the most important coordinate to data.actionPoint
  • Graph Color
  • Highlight color is the color of the "sweeper".
  • Graph Type
  • Variables that persist after every iteration is stored in the graphData parameter as any.
  • This is the slowest operation due to canvas. Minimize the number of times stroke or filled.
  • Sample Type
  • The order of the output does not matter.
  • .
    Sample Order
  • The coordinates will be sorted when received.
  • .
    Sound Type
  • Stopping the oscillator results in a clicking sounds that does not sound good every 4 millisecond. Instead, modify the oscillator in the parameter.
  • It's better to contribute something small/broken than to contribute nothing.

    sorting-algorithm's People

    Contributors

    kylesmith0905 avatar

    Stargazers

     avatar  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.