Skip to content

vicrazumov/sort-viz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sorting visualizer

Takes your javascript code, applies it to a random array of numbers and visualises the changes step by step.

Quick sort

What's interesting?

  1. it uses JS Proxies to register each transformation of an array, that will become a frame in animation
  2. it moves the execution of a customer script to a separate thread in order to keep the main thread unlocked (e.g., if you need to sort 10M items) Pay attention: running 3rd party code this way is insecure.
  3. it creates a web worker with a custom code on the fly by using a Blob API.

Usage

  1. clone the repo and run a static http-server from this folder
  2. by default, it uses a quick sort algorithm. You can update this in index.html.
  3. by default, it uses an array of 1000 random numbers. Adjust that in index.js

About

Visualise your sorting (or any other array transforming) algorithm in javascript

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy