A clean and interactive web-based sorting visualizer.
Explore the Demo »
Sorting Visualizer is a web application designed to help users understand how sorting algorithms work through visual representation. It provides a real-time view of algorithms like Bubble Sort, Selection Sort, and Insertion Sort as they process a randomized array.
- Interactive Controls: Generate new arrays, adjust array size, and control sorting speed.
- Multiple Algorithms: Visualize different sorting techniques side-by-side.
- Real-time Stats: View the current sorting cycle count.
- Responsive Design: Works on various screen sizes.
The current version supports the following algorithms:
| Algorithm | Time Complexity | Space Complexity | Description |
|---|---|---|---|
| Bubble Sort | O(n²) | O(1) | Repeatedly steps through the list, compares adjacent elements and swaps them if they are in the wrong order. |
| Selection Sort | O(n²) | O(1) | divides the input list into two parts: a sorted sublist of items which is built up from left to right at the front (left) of the list and a sublist of the remaining unsorted items that occupy the rest of the list. |
| Insertion Sort | O(n²) | O(1) | Builds the final sorted array (or list) one item at a time. |
Distributed under the MIT License. See LICENSE for more information.