Skip to content
 
 

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Logo

Algorithm Visualizer

A desktop app made using Tkinter and Pygame modules of Python to visualize different computer algorithms like searching and sorting. The main motive of this project is to help out beginners who's trying to understand the basic idea of common algorithms.

Algorithm Contents

  • Searching Algorithms
    • Linear Search
    • Binary Search
  • Sorting Algorithms
    • Selection Sort
    • Insertion Sort
    • Bubble Sort
    • Merge Sort
    • Quick Sort
    • Heap Sort
    • Radix Sort

Main Window

The main window has two dropdown menus to select the Algorithm Type and Name which the user wants to visualize. By default, the Algorithm Name menu is set to None, but if an Algorithm Type is selected it will get automatically updated with the different algorithms of that type. The next button will take you to a new window depending on the algorithm selected. For exit, it will show a warning message to check if you really want to exit or not. Below a gif is shown demonstrating the main window.

Farmers Market Finder gifs

Searching Algorithms

The Searching Algorithm Visualizer window again has the option to change the searching algorithm according to user needs (i.e. no need to go to the main window to change). Option to generate and shuffle the array is provided. A blank text box is given to enter the value of element user wants to search. The search button starts the searching operation. Slider for changing the size of the array and the speed of the visualization is provided. There's a label for showing number of comparisons and where the element is found after searching is done. Also an algorithm info section is given which will give necessary time complexity details of the searching algorithm. Button for going back to the main menu is also given. The searching is done on bar graphs with already checked elements marked with red and the searched element (if found) with green.

    Linear Search

     Linear Search

    Binary Search

     Binary Search

Sorting Algorithms

The Sorting Algorithm Visualizer window again has the option to change the searching algorithm according to user needs (i.e. no need to go to the main window to change). Option to generate and shuffle the array is provided. Two options are given to choose the type of visualization user wants to see. One using bar graph and other is colour bars. The sort button starts the sorting operation. Slider for changing the size of the array and the speed of the visualization is provided. There's a label for showing number of comparisons done after each operation. Also an algorithm info section is given which will give necessary time complexity details of the sorting algorithm. Button for going back to the main menu is also given. Once the sorting is done the entire array (bars) is painted green.

    Sorting Algorithm Visualizer Interface

     Farmers Market Finder Demo

    Selection Sort

     Selection Sort

    Insertion Sort

     Insertion Sort

    Bubble Sort

     Bubble Sort

    Merge Sort

     Merge Sort

    Quick Sort

     Quick Sort

    Heap Sort

     Heap Sort

    Radix Sort

     Radix Sort

Requirements/Steps to run

Thank You!

About

A desktop app made using Tkinter and Pygame modules of Python to visualize different algorithms with vibrant graphics and colors.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages