This is a Sorting Visualizer project built using HTML, CSS, and JavaScript. It provides a visual representation of different sorting algorithms, allowing users to see how various algorithms operate step-by-step on randomly generated arrays.
- Sorting Algorithms:
- Bubble Sort
- Selection Sort
- Insertion Sort
- Merge Sort
- Quick Sort
- Custom Array Size: Users can adjust the size of the array.
- Speed Control: Control the visualization speed of the sorting process.
- Generate New Array: Users can generate a new random array to visualize the sorting algorithms on different datasets.
https://ymadhumohanreddy.github.io/Sorting-Visualizer/
index.html
: The main HTML file that defines the structure of the webpage.styles.css
: The CSS file for styling the visualizer, layout, buttons, and overall appearance.app.js
: The core JavaScript file containing the logic for sorting algorithms and the visualization.
- Clone the repository:
git clone https://github.com/yourusername/sorting-visualizer.git
- Open the project folder:
cd sorting-visualizer
- Open
index.html
in any modern web browser:open index.html
- Open the
index.html
file in your browser. - Use the controls on the page to:
- Generate a new array: Click the "Generate New Array" button.
- Choose an algorithm: Select a sorting algorithm from the dropdown.
- Adjust array size: Use the slider to change the size of the array.
- Control speed: Use the speed slider to slow down or speed up the visualization.
- Start sorting: Click on the "Sort" button to begin visualizing the sorting process.
- HTML: For structuring the page and elements.
- CSS: For styling the interface and array bars.
- JavaScript: For implementing the sorting algorithms and controlling the visualization.