Skip to content

harshk-89/Sorting-Alogorithm-Visualizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Sorting Algorithms Visualizer

This project is a visualizer for various sorting algorithms. Users can select a sorting algorithm, generate a random array, and visualize the sorting process. It includes the following sorting algorithms:

  • Bubble Sort
  • Selection Sort
  • Insertion Sort
  • Merge Sort
  • Quick Sort

Features

  • Choose between different sorting algorithms.
  • Control the size of the array using a slider.
  • Generate a new random array.
  • Visualize the sorting process with color-coded comparisons and swaps.
  • Display the height of each bar above it.
  • Display the time taken to sort the array.

Demo

You can see a live demo of the project here.

Installation

  1. Clone the repository:
    git clone https://github.com/your-github-harshk-89/sorting-algorithms-visualizer.git
  2. Navigate to the project directory:
    cd sorting-algorithms-visualizer

Usage

  1. Open index.html in your web browser.
  2. Choose a sorting algorithm from the dropdown menu.
  3. Adjust the size of the array using the slider.
  4. Click "New Array" to generate a new random array.
  5. Click "Sort" to start the sorting visualization.

Files

  • index.html: The main HTML file that contains the structure of the page.
  • styles.css: The CSS file that styles the page.
  • script.js: The JavaScript file that contains the logic for the sorting algorithms and the visualization.

Customization

To customize the appearance or behavior of the visualizer, you can modify the CSS and JavaScript files.

Contributing

Contributions are welcome! If you have any improvements or new features to add, please open an issue or submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

First project on git

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published