Skip to content

SwapnilGavali295/Sorting-Algorithm-Visualizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sorting Algorithm Visualizer

A web-based application that demonstrates six different sorting algorithms through real-time animations, built with HTML, CSS, and JavaScript. Users can adjust the speed and size of the array, offering an interactive way to understand sorting algorithms visually.

Features

  • Visual Sorting Algorithms: Supports Bubble Sort, Selection Sort, Insertion Sort, Merge Sort, Quick Sort, and Heap Sort.
  • Adjustable Speed and Size: Controls for sorting speed and array size (up to 150 elements).
  • Color-Coded Indicators:
    • Yellow: Element being compared or Pivot element (for Quick Sort)
    • Red: Elements being swapped
    • Green: Elements in the correct sorted position
    • Blue: Elements yet to be sorted

Technologies Used

  • HTML: Structure of the application.
  • CSS: Styling for an intuitive user interface.
  • JavaScript: Logic for sorting algorithms, animations, and user interactions.

Sorting Algorithms

The following algorithms are available for visualization:

  1. Bubble Sort: Compares and swaps adjacent elements if needed.
  2. Selection Sort: Finds the smallest unsorted element and swaps it with the leftmost unsorted element.
  3. Insertion Sort: Builds the sorted array one element at a time.
  4. Merge Sort: Recursively divides, sorts, and merges array halves.
  5. Quick Sort: Partitions array around a pivot and sorts each part recursively.
  6. Heap Sort: Builds a heap and repeatedly extracts the largest element to sort.

How to Use

  1. Clone the Repository:
    git clone https://github.com/swapnilgavali295/sorting-visualizer.git
    cd sorting-visualizer

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published