Skip to content

A JS library of multiple algorithms visualisations which can be added to your website with just a few lines of code.

Notifications You must be signed in to change notification settings

chinmaypant21/algorithm-visualization

 
 

Repository files navigation

Algorithm Visualizations

A JS library of multiple algorithms visualisations which can be added to your website with just a few lines of code.

Use link https://cdn.jsdelivr.net/gh/paprajapati9/algorithm-visualization@master/dist/PPviz.min.js to add the js library in your page.

Use link https://cdn.jsdelivr.net/gh/paprajapati9/algorithm-visualization@master/dist/PPviz.min.css to add the related css in your page.

List of Visualizations curretly included

  1. Recursion :
    • Hanoi Tower
  2. Graphs :
    • Breadth First Search
    • Depth First Search
  3. Backtracking
    • Sudoku
  4. Sorting
  5. Greedy
    • Graph Coloring (In Progress)

Usage

let backtrackViz = new algoviz.BacktrackViz({
    selector: "pp-backtrack-container", //container id where the visualization is to be added
    options: { //options related to vizualization
        solve: false,
        speed: 'fast'
    }
}); 

let sudoku = backtrackViz.sudoku(); //this will create the visualization view

sudoku.then(sudokuObject =>{
     backtrackViz.options.solve = true;
     backtrackViz.options.sudoku = sudokuObject;
     backtrackViz.sudoku();
 }); //start the vizualization

For respective views check the test example :

  1. Recursion
  2. Graphs
  3. Backtracking
  4. Sorting
  5. Greedy

About

A JS library of multiple algorithms visualisations which can be added to your website with just a few lines of code.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • JavaScript 68.6%
  • CSS 17.7%
  • HTML 13.7%