Interactive visualization of sorting algorithms built with Next.js 15, React 19, TypeScript, and Tailwind CSS.
- Six sorting algorithms: Bubble Sort, Selection Sort, Insertion Sort, Merge Sort, Quick Sort, and Heap Sort
- Customizable array size (10-100 elements) and animation speed
- Color-coded operations: comparing, swapping, highlighting, and sorted elements
- Real-time algorithm complexity information
- Responsive design with modern UI
- Next.js 15
- React 19
- TypeScript
- Tailwind CSS
- Node.js (version 18 or higher)
- npm or yarn
-
Clone the repository:
git clone <your-repo-url> cd Sorting-Visualizer
-
Install dependencies:
npm install
-
Run the development server:
npm run dev
-
Open http://localhost:3000 in your browser
- Select a sorting algorithm from the available options
- Generate a new array or adjust the array size
- Control animation speed with the speed slider
- Click Start to begin visualization
- Use Pause/Resume and Reset controls as needed
src/
├── app/
│ ├── layout.tsx
│ ├── page.tsx
│ └── globals.css
├── components/
│ ├── SortingVisualizer.tsx
│ ├── ControlPanel.tsx
│ └── ArrayVisualization.tsx
└── types/
└── sorting.ts
- Default: Gray bars
- Comparing: Red bars
- Swapping: Amber bars
- Highlighting: Purple bars
- Sorted: Green bars