20 Sorting Algorithms Visualized
CompilerStuck CompilerStuck
5.03K subscribers
1,190,881 views
3.6K

 Published On Apr 1, 2020

Visualization of 20 different Sorting Algorithms as a disparity loop with sound.

Sorting Visualizer: https://github.com/CompilerStuck/sort...

✅ Subscribe:    / @compilerstuck  

The disparity Loop visualizes disparity of the Elements. If an element is at its original position, the distance from the center is max. if it is far away from its original index the distance from the center is 0.
Keep in mind that in this example we look at the array as if the beginning and the end is connected. So the distance between the 2nd element and the last is not n-2, but 2. The array is beeing shuffled in reverse.


▬▬ My Equipment ▬▬▬▬▬▬▬▬▬▬▬▬▬
* Microphone: https://amzn.to/3IFxjnc
* Monitor: https://amzn.to/3y3Niqg
* Keyboard: https://amzn.to/3Yg9b0A
* Mouse: https://amzn.to/3ZdslVZ


Algorithm Timecodes:
00:02 Radix Sort (Base 10)
00:19 Gravity Sort (Bead)
00:33 Shell Sort
00:58 Merge Sort
01:27 Heap Sort
01:25 Odd Even Sort
02:40 Comb Sort
03:07 Double Selection Sort
03:20 Pigeonhole Sort
04:06 Selection Sort
04:26 Quick Sort (Pivot Middle)
04:34 Quick Sort (Double Pivot)
04:44 Cycle Sort
05:01 American Flag Sort
05:20 Counting Sort
05:35 Bucket Sort
05:46 Cocktail Shaker Sort
06:30 Bubble Sort
07:16 Insertion Sort
08:00 Gnome Sort
09:00 COMPARISON TABLE

Measurements explained:
As "Comparison" counts the comparison of a value from the Array with any other value.
As "Segment" counts every sorted part of the array.
"Real Time" corresponds to the measured time only used for the algorithm.
As "Swap" counts the exchange between the indexes of two elements of the array.
As "Write to the Main Array" counts the change of a value in the Array.


* The links marked with an asterisk (*) are affiliate links. If you click on such a link and make a purchase, I receive a commission from the respective online shop or provider. The price for you does not change.

show more

Share/Embed