Skip to content

Latest commit

 

History

History
81 lines (55 loc) · 2.21 KB

README.md

File metadata and controls

81 lines (55 loc) · 2.21 KB

Sorting Algorithm Visualizer

Description

Heavily Inspired by the famous https://www.youtube.com/watch?v=kPRA0W1kECg
This Python script visualizes various sorting algorithms using the Tkinter GUI library.
It generates a random array of numbers and displays the sorting process in real time as different algorithms are executed.

Output

algo_visualizer.mp4

Features

  • Sorting Algorithm Visualization: Watch sorting algorithms in action as they progressively sort an array.
  • Multiple Sorting Algorithms: Includes Bubble Sort, Selection Sort, Insertion Sort, Quick Sort, Merge Sort, Shell Sort, Gnome Sort, Comb Sort, Pancake Sort, and Cocktail Shaker Sort.
  • Interactive UI: Simple button-based interface to select and execute sorting algorithms.
  • Real-time Updates: The visualization dynamically updates as the algorithm progresses.
  • Reset Functionality: Regenerate a new randomized array for further testing.

Installation

Prerequisites

Ensure you have the following installed:

  • Python 3.x
  • Required Python packages (if needed):
    pip install tkinter

Usage

Running the Application

Execute the following command to start the sorting visualizer:

python sorting_visualizer.py

Sorting Algorithms Available

  • Bubble Sort
  • Selection Sort
  • Insertion Sort
  • Quick Sort
  • Merge Sort
  • Shell Sort
  • Gnome Sort
  • Comb Sort
  • Pancake Sort
  • Cocktail Shaker Sort

Interface

  • Click on a sorting algorithm button to start sorting.
  • Click the Reset button to shuffle the array and try again.

Future Enhancements

  • Add more sorting algorithms.
  • Improve visualization effects.
  • Add speed controls to adjust sorting speed.
  • Add Audio Effects
  • Create a web-based version for online use.

Troubleshooting

  • Ensure Python 3 is installed and working properly.
  • If the script does not display the GUI, check that Tkinter is installed.
  • If the visualization appears too slow, adjust the sleep duration in the update function.

License

This project is open-source and available for modification.

Author

Developed by Ottitsch. Contributions are welcome!