This project is an interactive algorithm visualizer, designed to help users understand and visualize how different sorting algorithms work. The visualizer provides a UI where users can input an array of numbers and adjust the speed of the sorting animation. It includes various sorting algorithms and displays a step-by-step visual process of each sort.
- Interactive Sorting Visualization: Watch different sorting algorithms work step-by-step on your chosen array of numbers.
- User-Controlled Speed: Adjust the sorting speed with a slider for a closer look or a faster overview.
- Real-Time Status Updates: See the duration and steps in real time.
- Responsive Design: The interface adjusts for both desktop and mobile views.
-
Clone the repository:
git clone https://github.com/yourusername/algorithm-visualizer.git cd algorithm-visualizer```
Install dependencies:
npm install npm run start-dev
- Input an Array: Enter a set of numbers separated by commas in the input field.
- Choose Sorting Algorithm: Select one of the available algorithms.
- Set the Speed: Adjust the global speed with the slider (measured in milliseconds).
- Visualize Sorting: Click "Sort All" to start the sorting process or select individual sort buttons to run a single algorithm.
- Generate New Array: Use the "New Values" button to generate a random array if needed.
The application currently supports the following sorting algorithms:
- Bubble Sort:...
- Selection Sort:...
- Merge Sort:...
- Quick Sort:...
- Insertion Sort:...
- Heap Sort:...
- Radix Sort:...
- Counting Sort:...
- Tim Sort:...