Skip to content

udhaykarthi/Sort_Visualizer

Repository files navigation

Sorting Visualizer (Java Swing)

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.


Features

  • 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

🖥️ Demo

demo

🚀 How to Run

  1. Clone this repository:
    git clone https://github.com/your-username/sort-visualizer.git
    cd sort-visualizer

About

This is a Java Swing Application that help us to visualize the different sorting algorithms.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages