Skip to content

A GUI based Sorting Algorithm Visualizer using Python Tkinter Library.

License

Notifications You must be signed in to change notification settings

YHZ-EPIC/Sorting_Algorithms_Visualizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Visualization of Sorting Algorithms

A GUI based Sorting Algorithm Visualizer using Python Tkinter Library.

Abstract

The idea behind this project is to compare the performance 
of different algorithms while also visualizing them.

Installation

Install Tkinter Library using pip

  pip install tk

Introduction

The program I developed contains all the necessary 
features that satisfy the overall purpose of this project. 
It is Interactive and has Graphical User Interface (GUI) 
which makes it easy to use.

Features and Working

1. Ability to Select Desired Algorithms from Menu.

2. Ability to Select Desired File Containing the Data from Menu.

3. Ability to Select Speed of Sorting During Visualization.

4. After Selecting the Desired Options, User can Click on Buttons 
to get the Desired Output.

5. User Can See the Data being Sorted in Real time in form of Blue Sticks, 
Height of Stick represents the Size of the value.

6. When all Sticks turn Green then it means Array is Sorted.

7. After All the Data is Sorted then a New Window pops up, 
Showing the Final Sorted Array.

8. User can also see Both Unsorted and Sorted Arrays printed on Console
  • Working of Buttons

    1. "Generate Array from File" Button, Reads Data from the Selected file.

    2. “Generate Random Array" Button, Creates Random Data after
      Opening a new Dialog Box asking User to Enter Size of Data to be generated.

    3. “Sort" Button, Starts Sorting the Data from Selected Algorithm from Menu.

Design and Tools

This program is developed in “Python Programming Language". 
Python is both convenient and very popular language among 
Scientists, Engineers and Programmers.
Python has many Libraries to Achieve Different Tasks.
For the GUI of this Program a library called “Tkinter" is used.

Experimental Setup

The Resources and Tools Used to Develop this Program,

* Hardware
Device Type : Laptop
CPU : Core i7 5th Gen
RAM : 12 GB DDR3
HDD : 500 GB, 7200 rpm
* Software
OS : Windows 10
Code Editor : VS Code
Interpreter : Python 3.11.0

Results

In this Section, Basic GUI and Its Navigation will be shown in form of 
Screenshots. Furthermore the Output and Results are also displayed.
  • Basic Look of the Interface

    Alt text

  • Drop-Down Menus

    1. For Selecting Algorithms

      Alt text

    2. For Selecting Input Files

      Alt text

  • Canvas Showing Data Sticks

    Alt text

  • Canvas After Data is Sorted

    Alt text

  • Dialog Box for User Input

    Alt text

  • Output Window

    Alt text

  • Console Window

    Alt text

Conclusion

This Program can be beneficial for academic purposes and can help 
students understand both the working and complexity of these 
commonly used algorithms. It is user friendly and easy to work with.

References

Official Tkinter Documentation:

https://docs.python.org/3/library/tk.html

Official Python 3.11.0 Documentation:

https://docs.python.org/3/

Fundamentals of Algorithms by GeeksforGeeks:

https://www.geeksforgeeks.org/fundamentals-of-algorithms/

About

A GUI based Sorting Algorithm Visualizer using Python Tkinter Library.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages