This project is a web-based tool to visualize the working of different sorting algorithms. It helps users understand how various sorting algorithms work step-by-step using interactive animations.
-
Visual representation of sorting algorithms
-
Adjustable array size and sorting speed
-
Supports the following algorithms:
- Bubble Sort
- Selection Sort
- Insertion Sort
- Merge Sort
- Quick Sort
-
Displays time and space complexity for each algorithm
-
Code snippet display for each algorithm
- HTML
- CSS
- JavaScript
-
Clone the repository:
git clone https://github.com/your-username/sorting-visualizer.git
-
Navigate to the project directory:
cd Sorting-Algorithm-Visualizer -
Open
index.htmlin your web browser.
/sorting-visualizer
β
βββ index.html # Main HTML page
βββ style.css # Styling for the page
βββ script.js # JavaScript logic for sorting and visualizations
Example: Bubble Sort
- Worst-case Time: O(NΒ²)
- Average-case Time: Ξ(NΒ²)
- Best-case Time: Ξ©(N)
- Space Complexity: O(1)
(Similar info is displayed for each sorting algorithm in the interface.)
- Add more sorting algorithms (e.g., Radix Sort, Shell Sort)
- Improve UI/UX with modern design
- Add mobile responsiveness
- Add sound effects for each comparison/swap
This project was inspired by educational visual tools and aims to help students and developers better understand how sorting algorithms function.
