Skip to content

Script to visualize different sorting algorithms

Notifications You must be signed in to change notification settings

nikitarizh/sortVisualization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sortVisualization

What is it?

It's a script which shows you how different algorithms sort arrays, so you can understand how these algorithms work

How to use

  1. Open https://nikitarizh.github.io/sortVisualization/
  2. Click on a button titled with the type of sorting you want to be visualized
  3. Enjoy!

Advanced use

You can also set length of array, frame time, shapes and enable audio output

  1. Set length of array using the first input field (100 by default)
  2. Set frame time using the second input field (1ms for quick demo, 10-20ms for medium speed, 50-100ms is for slow) (20ms by default)
  3. Enable audio by pressing the button (mid freq is comparing, low freq is swapping) (Optional, Chrome only)
  4. Set shapes by clicking a thumbnail (circles by default)

TODO list:

  • Bubble sort
  • Shaker sort
  • Comb sort
  • Insertion sort
  • Shell sort
  • Gnome sort
  • Selection sort
  • Merge sort
  • Counting sort
  • ...and more