Share your repls and programming experiences

← Back to all posts
Visualize Your Favorite Sorting Algorithms
h
LOLMcman (65)

So last week this random video popped up in my YouTube recommendations at 3 A.M.: https://www.youtube.com/watch?v=kPRA0W1kECg. After watching this video, I decided to replicate it as best I could, so here it is.

Usage

Click the algorithm that you want to see visualized. Once it's sorted, you can reset the array to try out a new algorithm. Also, this is kind of but not really mobile friendly so you should be able to use it on your phone as well.

Algorithms

Here's a brief description of each algorithm:
1. Bubble Sort
A very slow and simple sorting algorithm. Has a time complexity of O(n^2)
2. Quick Sort
A fast, recursive, divide and conquer sorting algorithm. Has an average time complexity of O(n log n).
3. Heap Sort
Basically a better version of selection sort. Also has an average time complexity of O(n log n).
4. Bogo Sort
The worst best sorting algorithm in existence. Randomly shuffles the array until it's sorted (I made it stop after 500 shuffles).

I will try my best to add more algorithms in the future.

Note: I don't really do frontend and only did this because I thought that it would be cool so don't flame my css and js skills pls <3.

Commentshotnewtop
MasonErbini (22)

Very Cool! I like this project.

IreTheKID (277)

Very cool! Big O notation is really interesting!

[deleted]

it is very good and perfect, this is programming

Roar123 (430)

This is beautiful!