Skip to content

Sorting Algorithm Visualizer: Interactive web tool showcasing popular sorting algorithms like Bubble Sort, Selection Sort, Insertion Sort and Quick Sort. Customize array size and speed. Understand sorting visually for educational purposes.

Notifications You must be signed in to change notification settings

DeshDeepakKant/Book-Sorting-Visualizer

Repository files navigation

Book Sorting Visualizer

Welcome to the Book Sorting Visualizer! This project is an interactive website that allows users to explore and understand sorting algorithms through a visual and hands-on approach.

Live Link

Project Overview

The Book Sorting Visualizer is a virtual library where users can arrange books in alphabetical order. The website provides control over the speed and number of books displayed, enhancing the user's experience and learning process.

Key Features

  • User Control: Adjust the speed and number of books to be sorted.
  • Sorting Algorithms: Visualize the following sorting algorithms:
    • Bubble Sort
    • Insertion Sort
    • Quick Sort
    • Selection Sort

Sorting Algorithms

Bubble Sort

Bubble Sort is a simple comparison-based sorting algorithm. It works by repeatedly stepping through the list to be sorted, comparing each pair of adjacent items and swapping them if they are in the wrong order. This process is repeated until the list is sorted.

Insertion Sort

Insertion Sort is a simple sorting algorithm that builds the final sorted array one item at a time. It is much less efficient on large lists than more advanced algorithms such as quicksort. Insertion sort iterates, consuming one input element each repetition and growing a sorted output list. Each iteration removes one element from the input data, finds the location it belongs within the sorted list, and inserts it there.

Quick Sort

Quick Sort is an efficient, comparison-based, divide-and-conquer sorting algorithm. It works by selecting a 'pivot' element from the array and partitioning the other elements into two sub-arrays, according to whether they are less than or greater than the pivot. The sub-arrays are then sorted recursively. This can be done in-place, requiring small additional amounts of memory to perform the sorting.

Selection Sort

Selection Sort is a simple comparison-based sorting algorithm. It works by repeatedly selecting the smallest (or largest, depending on the sorting order) element from the unsorted portion of the list, and moving it to the end of the sorted portion of the list. This process is repeated until all elements are sorted.

  • Step-by-Step Visualization: Observe each step of the sorting process, including random and worst-case scenarios.
  • Interactive Learning: Aids in the visualization of complex concepts, shown to increase understanding and efficiency by 40%.

Logo

Logo

Logo

Logo

Logo

Technologies Used

  • HTML
  • CSS
  • JavaScript
  • TypeScript

Getting Started

To get started with the project locally, follow these steps:

  1. Clone the repository:
    git clone https://github.com/yourusername/book-sorting-visualizer.git
    
    
    
  2. Navigate to the project directory:
    cd book-sorting-visualizer
    
    
    
  3. Open index.html in your browser to view the website:

Usage

  • Adjust Settings: Use the controls to set the speed and number of books.
  • Select Algorithm: Choose a sorting algorithm to visualize.
  • Start Visualization: Click the start button to begin the sorting process and observe the algorithm in action.

Contributing

Contributions are welcome! If you have any suggestions or improvements, please create an issue or submit a pull request.

License

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

About

Sorting Algorithm Visualizer: Interactive web tool showcasing popular sorting algorithms like Bubble Sort, Selection Sort, Insertion Sort and Quick Sort. Customize array size and speed. Understand sorting visually for educational purposes.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published