Welcome to the Sorting Algorithms Visualizer, an interactive web application designed to make learning about sorting algorithms engaging and immersive.
This project implements various sorting algorithms with visualization and sound effects using HTML, CSS, and JavaScript.
- Implements six sorting algorithms: Selection Sort, Bubble Sort, Insertion Sort, Merge Sort, Quick Sort, and Heap Sort.
- Visualizes the sorting process with animated bars representing elements being sorted.
- Provides sound effects to accompany sorting actions for better user experience.
- Allows users to specify the number of elements to sort and the sorting speed.
- Enables users to reset the sorting process or change input parameters of array size and sorting speed .
- Selection Sort: Selects the smallest element from the unsorted portion of the array and swaps it with the first unsorted element.
- Bubble Sort: Repeatedly steps through the list, compares adjacent elements, and swaps them if they are in the wrong order.
- Insertion Sort: Builds the final sorted array one item at a time by repeatedly picking the next element and inserting it into the sorted portion of the array.
- Merge Sort: Divides the array into two halves, sorts them independently, and then merges them back together.
- Quick Sort: Selects a pivot element and partitions the array into two sub-arrays around the pivot such that elements less than the pivot are on the left and elements greater than the pivot are on the right.
- Heap Sort: Builds a max heap from the array and repeatedly extracts the maximum element from the heap.
- Open
index.htmlin a web browser. - Adjust the number of elements and sorting speed using the input controls.
- Select a sorting algorithm.
- To reset the sorting process, click the "Generate New Array" button.
You can find a live demo of this project here.