Skip to content

cedricarts/sorting-algorithm-visualizer.github.io

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Sorting Algorithm Visualizer

This is a comprehensive, single-file web application that visualizes 15 different sorting algorithms. It is designed as an educational tool to help users understand how each algorithm works by watching it sort an array in real-time.

A Note on Authorship

This project was generated by a large language model (Gemini by Google) in response to a series of prompts. The user's role was to provide the prompts and functional requirements.

Its intended purpose is purely educational—to serve as a learning tool for visualizing and teaching computer science concepts, not as a portfolio piece for employment.

Features:

  • 15 Sorting Algorithms: Includes a wide variety of algorithms, from common to more obscure.

  • Interactive Controls: Adjust the array size and sorting speed.

  • Real-time Visualization: Color-coded bars show comparisons, swaps, and sorted elements.

  • Performance Timer: See how long each algorithm takes to run.

  • Audio Feedback: Hear the algorithms at work with sounds for comparisons and swaps.

  • Pseudocode Display: See the pseudocode for the selected algorithm update in real-time.

  • Single-File Application: The entire project (HTML, CSS, and JavaScript) is contained in one file.

Algorithms Included:

  • Bubble Sort

  • Selection Sort

  • Insertion Sort

  • Merge Sort

  • Quick Sort

  • Heap Sort

  • Shell Sort

  • Cocktail Shaker Sort

  • Comb Sort

  • Gnome Sort

  • Radix Sort (LSD)

  • Counting Sort

  • Bucket Sort

  • Pancake Sort

  • Bogo Sort (Warning: Very slow!)

How to Use

Download the index.html file or ___.

Open the file in any modern web browser (like Chrome, Firefox, or Edge).

Use the controls to select an algorithm, adjust the size/speed, and click "Sort!".

Technologies Used

HTML5

Tailwind CSS (loaded via CDN)

JavaScript (ES6 Modules)

Tone.js (for audio synthesis, loaded via CDN)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages