Skip to content

A web application to visualize various sorting algorithms interactively.

Notifications You must be signed in to change notification settings

avi4h/sort-view

Repository files navigation

Sort-View

version last-commit repo-language-count repo-issues repo-top-language

A web application to visualize various sorting algorithms.

Features

Interactive Visualizations: Select a sorting algorithm and visualize each step.

Multiple Sorting Algorithms: Includes popular sorting algorithms.

Customizable Parameters: Adjust settings like array size and sorting speed.

Stack & Dependencies

React Tailwind CSS JavaScript Framer Motion rc-slider react-select

Algorithms

1. Bubble Sort: Worst - O(n²), Average - O(n²), Best - O(n)

Repeatedly steps through the list, compares adjacent elements, and swaps them if needed. It’s a basic and inefficient sorting method.

2. Comb Sort : Worst - O(n²), Average - Ω(n²/2ᵖ), Best - O(n log n)

An improvement on Bubble Sort that reduces the number of comparisons and swaps by initially considering distant elements and gradually reducing the gap.

3. Heap Sort : O(n log n)

A comparison-based technique using a binary heap structure. Elements are sorted by building a heap and repeatedly extracting the maximum element.

4. Insertion Sort : Worst - O(n²), Average - O(n²), Best - O(n)

Iteratively builds a sorted list by taking each new element and inserting it into its correct position within the sorted portion.

5. Selection Sort : O(n²)

Divides the list into sorted and unsorted portions and finds the minimum element from the unsorted portion to swap with the first unsorted element.

6. Shell Sort : Worst - O(n²), Average - O(n log n), Best - O(n log n)

A variation of Insertion Sort that starts by sorting elements far apart and reduces the gap, improving efficiency over regular Insertion Sort.

About

A web application to visualize various sorting algorithms interactively.

Resources

Stars

Watchers

Forks