Skip to content

jarvisar/sorting-algos

Repository files navigation

Sorting Visualizer

Angular-powered web app capable of visually representing various sorting algorithms using bars of varying heights. As the sorting algorithm runs, the app updates the color and height of the bars to reflect the current state of the sorting process and also plays a tone based on the height of the bar at the current index.

Visit the GitHub pages site to access the latest deployment.

Also available as an Android APK.

Usage

Currently this web application supports the following sorting algorithms:

  • Bubble Sort
  • Selection Sort
  • Insertion Sort
  • Merge Sort
  • Quick Sort
  • Heap Sort
  • Radix Sort (LSD)
  • Bitonic Sort
  • Cocktail Shaker
  • Comb Sort
  • Gnome Sort
  • Shell Sort
  • Cycle Sort
  • Counting Sort
  • Tim Sort
  • Strand Sort
  • Pancake Sort
  • Stooge Sort
  • Bogo Sort

Learn more about sorting algorithms here: https://www.geeksforgeeks.org/sorting-algorithms/

Use the input box to enter the number of bars on the screen. Currently the maximum amount is 512.

Click Sort to begin sorting. Click Stop at any time to halt the sorting process. Click Reset to regenerate new bars.

Control the speed of the sorting process with the slider.

Local Installation

To install and run this app on a local machine, follow these steps:

  1. Clone the repository to the local machine using the command:

git clone https://github.com/jarvisar/sorting-algos.git

  1. Navigate to the project directory using the command:

cd sorting-algos

  1. Install the necessary dependencies using the command:

npm install

  1. If necessary, install Angular CLI:

npm i @angular/cli

  1. Start the app using the command:

ng serve

  1. Open a web browser and navigate to http://localhost:4200 to view the app.
This web app was created with Angular v14.3.0

Screenshots

Home Page
Home Page

Radix Sort
Radix Sort

Bitonic Sort
Bitonic Sort

Cocktail Sort
Cocktail Sort