Skip to content

A simple python project which visualizes various sorting algorithms.

License

Notifications You must be signed in to change notification settings

debdutgoswami/sorting-visualizer

Repository files navigation

HitCount

image image image image image

Sorting Visualizer

A simple python project which visualizes various sorting algorithms.


How to setup

Simply open up your terminal and type

pip3 install sorting-visualizer

Algorithms Implemented

  • Bubble Sort (bubblesort)
  • Selection Sort (selectionsort)
  • Insertion Sort (insertionsort)
  • Merge Sort (mergesort)
  • Quick Sort
  • Heap Sort

Prerequisite

  1. ffmpeg

How to use

  1. Show the plot

    from sorting_visualizer import visualizer
    visualizer.visualize('bubblesort')
    
  2. Show and save the plot

    from sorting_visualizer import visualizer
    visualizer.visualize('bubblesort', save=True)
    
  3. Only save the plot and not show it

    from sorting_visualizer import visualizer
    visualizer.visualize('bubblesort', save=True, show=False)
    
  4. Saving in a particular location

    from sorting_visualizer import visualizer
    visualizer.visualize('bubblesort', save=True, path='path/to/directory')
    

The default saving location is your current working directory.