Coder Social home page Coder Social logo

algorithm-simulator's Introduction


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!

algorithm-simulator's People

Contributors

the-hritik avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.