A simple Sorting Algorithm Visualizer built using Java Swing.
It demonstrates how different sorting algorithms work by representing array elements as vertical bars, where the height of each bar corresponds to its value.
- Generate Random Bars — create a new random dataset to sort
- Multiple Sorting Algorithms:
- Bubble Sort
- Selection Sort
- Insertion Sort
- Merge Sort
- Quick Sort
- Dual-Pivot Quick Sort
- Heap Sort
- Color-coded visualization:
- 🔴 Red → Elements being compared / swapped
- 🟡 Yellow → Key element (Insertion Sort) / Pivot (Quick Sort)
- 🟣 Magenta → Right pivot (Dual-Pivot Quick Sort)
- 🔵 Cyan → Default (unsorted)
- 🟢 Green → Sorted / finalized
- Clone this repository:
git clone https://github.com/your-username/sort-visualizer.git cd sort-visualizer