Sorting Algorithm Visualizer is a powerful tool that allows users to witness the step-by-step execution of various sorting algorithms through an intuitive graphical interface. Whether you are a student studying algorithms or a developer looking to optimize your code, this visualizer provides valuable insights into the inner workings and efficiency of sorting algorithms.
-
Step-by-Step Visualization: With Sorting Algorithm Visualizer, you can observe each individual step of the sorting process in real-time. This allows you to understand how different sorting algorithms rearrange elements to achieve the final sorted order.
-
Array Access Count: Ever wondered how many times an algorithm accesses elements during sorting? Our visualizer keeps track of the number of element accesses, giving you a quantitative measure of algorithmic efficiency and providing valuable information for comparative analysis.
-
Color-Coded Visualization: To enhance the understanding of the sorting process, elements are color-coded to represent their state at any given time. This makes it easy to visualize how elements are moved and compared, making the algorithm's behavior crystal clear.
The Sorting Algorithm Visualizer currently supports the following sorting algorithms:
- Bubble Sort
- Selection Sort
- Insertion Sort
- Merge Sort
- Quick Sort
- Heap Sort
QuickSort.mov
HeapSort.mov
SelectionSort.mov
InsertionSort.mov
BubbleSort.mov
- Clone the repository to your local machine.
- Open the project in your preferred IDE or code editor.
- Run the application and select the sorting algorithm you want to visualize.
- Observe the graphical representation of the sorting algorithm in action, step-by-step.
- Analyze the array access count and the color-coded element movement to gain insights into the efficiency of the chosen algorithm.
To run this program, you need to install python and the following libraries:
- Mathplotlib
- Numpy
- Scipy
Additionally, to view each change in the sorting algorithm, create a folder named "frames" in your working directory. This is where images of the sorting process will be stored.