Skip to content

karan-owalekar/Visualize-Sorting-Algorithms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Visualize-Sorting-Algorithms

Here are some preview:

(Gif's are fasforwaded to take less time)

Time taken by each algorithm was:

■ Merge Sort - 1 min 35 sec.

■ Quick Sort - 1 min 9 sec.

■ Insertion Sort - 1 min 53 sec.

■ Bubble Sort - 3 min 28 sec.

■ Selection Sort - 4 min 19 sec.

Here I've used #matplotlib to draw bar graph of the array, where height of bar represents the number on that position.

Using 5 of the most known sorting algorithms to visualize how each element move in the array.

The program generates a list of 10 random elements between 1 and 100. Number of elements can be changed by the user and user can even input his own list.