Visualizing 70 Sorting Algorithms

  Рет қаралды 55,604

Kuvina Saydaki

Kuvina Saydaki

Күн бұрын

Full explanation video: • Every Sorting Algorith...
This video shows off my sorting algorithm visualization program that I made with c++ and sfml. I programmed the algorithms myself in order to properly understand them for the explanation video. For smooth, poplar, wiki, and grail, I didn't have time to program them, so I used ArrayV. The sound effects in this video are mostly musescore samples or audacity generated tones, chirps, etc.
Chapters:
0:00 Selection
0:25 Double Selection
0:37 Insertion
1:00 Binary Insertion
1:14 Bubble
1:38 Shaker
2:01 Comb
2:21 Heap
2:43 Min Heap
2:55 Shell
3:24 Quick
3:47 Merge
4:15 Radix LSD (b = 4)
4:35 Radix LSD (b = 10)
4:52 Radix MSD (b = 4)
5:15 Radix MSD (b = 10)
5:33 Bucket (b = 10)
6:04 Bucket (b = n/10)
6:18 Counting
6:32 Gravity
6:45 Bogo
7:08 Pancake
7:37 Cycle
8:04 Exchange v1
8:28 Exchange v2
8:44 Odd Even
9:08 Gnome
9:32 Baiai
9:55 Circle
10:12 Patience (cheat version)
10:42 Strand (cheat version)
11:19 Bitonic
11:58 Recursive Bitonic
12:14 Alternate Bitonic
12:30 Bitonic w/ Parallel Processors
12:41 Odd Even Network
13:16 Pairwise Network
13:50 Quick LL
14:26 Dual Pivot Quick
14:59 Proportion Extend
15:28 Intro
16:00 Pattern Defeating Quick
16:29 Tim
17:07 Iterative Merge v1
17:31 Iterative Merge v2
17:56 In Place Merge (basic edition)
18:21 Weave
18:53 Rotate Merge
19:29 Quad
20:00 Weak Heap
20:38 Ternary Heap
21:21 Smooth
21:46 Poplar
22:01 In Place Radix MSD (b = 4)
22:30 Binary Quick (b = 2)
22:58 In Place Radix LSD (b = 4)
23:24 American Flag (b = 128)
23:40 Spread (b = n/10)
23:57 Sample (b = n/10, s = 2)
24:23 Proxmap (b = n/10)
24:43 Sqrt (Kuvi version)
25:20 Original Block
26:03 Wiki
26:33 Grail
27:11 Stooge
27:38 Slow
28:05 Stalin
28:15 Miracle
28:34 Identity Crisis
29:01 Quantum Bogo
#sorting #algorithms #computerscience #visualization #satisfying

Пікірлер: 161
@Kuvina
@Kuvina Ай бұрын
Explanations: kzbin.info/www/bejne/nmKlmmOdp8ahrq8 Which algorithm looks and sounds the coolest?
@gamerguyrandom
@gamerguyrandom Ай бұрын
so many piano keys being slammed into my ears i like heap and comb tho
@jimiwills
@jimiwills Ай бұрын
Your voice sounds better ❤ Gnome reminded me of pigeon street. I like odd even, and others that maintain variety of pitch throughout... Alternate bitonic.basic in place merge. The actual sound for weave is nice. Identity crisis is obviously the best. Grail sounds like some radio data mode.
@shirleyandjessie
@shirleyandjessie Ай бұрын
shuffling
@thehipponugget3287
@thehipponugget3287 Ай бұрын
Def Bitonic w/ parallel processors
@BenK1122
@BenK1122 Ай бұрын
Grail takes you on a journey. It initially sounds like random noise (because it is). Then it shifts into an almost musical noise and finally shifts to a space laser battle.
@A_literal_cube
@A_literal_cube Ай бұрын
There is a version of this video, in which quantum bogo sort actually sorted the list.
@GamemodePC
@GamemodePC Ай бұрын
dont play with quantum bogo sort
@charlesmartin1972
@charlesmartin1972 10 күн бұрын
The many words hypothesis is equivalent to the Copenhagen interpretation, which does not need to invoke parallel universes in exchange for observational decoherence; the trick to implementing bogosort in the Copenhagen interpretation is to make any state where the list is unsorted lead to a contradiction, therefore leaving only the sorted list as a possible output. So, doing exactly the same math but interpreting it differently, we save n!-1 universes from certain destruction
@ceremyjlarkson9475
@ceremyjlarkson9475 Ай бұрын
My ass was NOT expecting bitonic sort in parallel processors to go as sicko mode as it did
@nevverre3500
@nevverre3500 Ай бұрын
Just saw it too! Insane lol
@rafasr0
@rafasr0 Ай бұрын
I used the Stalin alghorithm to sort 85% of the problems in my company Thanks!
@klosbati7321
@klosbati7321 Ай бұрын
RIP the universe
@tali64squared
@tali64squared Ай бұрын
If Mario made a sorting algorithm: 1:02
@haipingcao2212_.
@haipingcao2212_. Ай бұрын
I get it!😂
@user-yw5et3os6i
@user-yw5et3os6i Ай бұрын
I like that the instrument changes between sorts, they sound nicer than arrayV bip sound
@giovannicorso7583
@giovannicorso7583 Ай бұрын
70 algorithm, so wierd. I was expecting something random... maybe 37?
@Azyraasr
@Azyraasr Ай бұрын
This is too deep
@aidanmaniaMusic
@aidanmaniaMusic Ай бұрын
Veritasium moment
@wyattstevens8574
@wyattstevens8574 Ай бұрын
Alternate title: "When Kuvina meets Veritasium"
@temmie1662
@temmie1662 Ай бұрын
@@wyattstevens8574and we need vsauce, nilered and styropyro Also backyard scientist Best collab yet
@wyattstevens8574
@wyattstevens8574 Ай бұрын
@@temmie1662 VSauce be like, "37 is random... or is it?"
@zemethius
@zemethius Ай бұрын
I like how the noises range from tippy tappy on a child's xylophone to menace on a piano to discordia itself lol.
@matroqueta6825
@matroqueta6825 Ай бұрын
I felt an impending sense of doom when I saw quantum bogosort was next... so this is what non-existence feels like, huh?
@Mordecrox
@Mordecrox Ай бұрын
6:45 wake up babe new BogoSort type beat just dropped
@aidanmaniaMusic
@aidanmaniaMusic Ай бұрын
I think rotate merge (18:54) is my favorite. I love all the algorithms that make the little rainbows, but the teleport looking stuff rm does is next level
@MeriaDuck
@MeriaDuck Ай бұрын
12:38 blink and you miss it (bitonic parallel)
@pranitroy7306
@pranitroy7306 Ай бұрын
bitonic parallel is probably also the flashiest algorithm in this video
@justman017
@justman017 Ай бұрын
And sounds so futuristic 😂
@SockerKid
@SockerKid 13 күн бұрын
@@pranitroy7306bogo
@appel-seed_
@appel-seed_ Ай бұрын
The sound before pancake sort- it's too cool
@wyattfightmaster916
@wyattfightmaster916 Ай бұрын
2:24 When a cartoon character falls:
@usernametaken017
@usernametaken017 Ай бұрын
6:45 for bogo sort
@GoodrichT6
@GoodrichT6 Ай бұрын
Yoooo when's this releasing on spotify
@woomiiakarandomveemo5933
@woomiiakarandomveemo5933 Ай бұрын
for some reason i find it super fucking funny that miracle sort doesnt do shit (because it’s waiting for a miracle) and because of that it doesnt even get shuffled identity crisis just comes in and sorts the array for it
@VibinSquad
@VibinSquad Ай бұрын
I mean they technically did get a miracle, they just didn’t sort it themselves
@NocturnalTyphlosion
@NocturnalTyphlosion 28 күн бұрын
​@@VibinSquad i guess that makes it bludger sort then
@gnusnotutopia
@gnusnotutopia Ай бұрын
stalin sort is wonderfully silly
@astropeter31415
@astropeter31415 Ай бұрын
Shell Sort and Selection Sort is two of my favorite algorithms!But Shell Sort is my most favorite algorithm.I used Selection Sort in my school.
@Matyanson
@Matyanson Ай бұрын
My favorite is Insertion sort! 1) Binary insertion: It is the best at what it does (inserting into sorted list) 2) Shell sort: so satisfiing visually (The list troughout the whole range is gradually more and more sorted) 3) Basic form: very intuitive and easy to understand while being better performing out of the simplest ones. Even the code is very minimalistic and beautiful! for i = 0 to n: for j = 0 to i: if a[i] < a[j] swap(a[i], a[j])
@dmirtyisakov8112
@dmirtyisakov8112 Ай бұрын
giving pattern defeating quicksort a uniformly random list is just mean
@2010hyundaielantra
@2010hyundaielantra 26 күн бұрын
what is bro's beef with 70
@rubenvanderark4960
@rubenvanderark4960 Ай бұрын
6:58 n=12 takes several months *on average*
@usernametaken017
@usernametaken017 Ай бұрын
keep gambling 🔥🔥🔥🗣🗣🗣
@DisguisedParrot
@DisguisedParrot Ай бұрын
I ❤️ your videos
@aerievee
@aerievee Ай бұрын
fellow shell sort liker! High five!!
@dead-eyedarrel3878
@dead-eyedarrel3878 Ай бұрын
You made a sort colors video that is impressively difficult to listen to. I love it
@Ratz99
@Ratz99 Ай бұрын
I am a sorting and I feel algorithmed
@sedutperspi
@sedutperspi Ай бұрын
New Kuvina video!!!
@Living_Murphys_Law
@Living_Murphys_Law Ай бұрын
Pairwise network, the Radux ones, and Weave definitely look the coolest.
@thatoneguy385
@thatoneguy385 Ай бұрын
The subtitles really helped in understanding everything
@greenoxidated9377
@greenoxidated9377 Ай бұрын
Shuffling gotta be my favorite out of them :D
@memofrf
@memofrf 28 күн бұрын
You have inspired me. Thank you,
@Xudmud
@Xudmud Ай бұрын
Radix LSD has always sounded like a starship energizing for takeoff, especially on the last few iterations.
@sunnloc
@sunnloc Ай бұрын
Min heap: Just like heap sort but it puts the smallest at the first places then reverses it when all maxes have been excrated. Baiai: Bubble and Insertion combined
@Arkycite
@Arkycite Ай бұрын
Bogo sort is sort what just mixing in random way and stopping when lines are sorted
@lyndonbrown3471
@lyndonbrown3471 Ай бұрын
2:24 is a UFO landing
@HesterClapp
@HesterClapp Ай бұрын
Why do most visualisations not show auxiliary memory?
@Tytoalba777
@Tytoalba777 Ай бұрын
I was waiting the entire video for Stalin sort. Was not disappointed
@NumberVectors
@NumberVectors Ай бұрын
insertion looks like a half-sort stack of lines eating up the other lines (idk how to explain it it's just so cool 🤩)
@herrhartmann3036
@herrhartmann3036 23 күн бұрын
It would have been more intuitive to use low notes for the high values and vice versa. That's how musical instruments actually work: A small object makes a short wavelength, which creates a "high" note. A large object makes a long wavelength, which creates a "low" note.
@haipingcao2212_.
@haipingcao2212_. Ай бұрын
My favorite 🎉🎉
@truongquangduylop33
@truongquangduylop33 Ай бұрын
def selection_sort(data): """Sorts a list of data in ascending order using selection sort. Args: data: A list of sortable elements. Returns: A new list containing the sorted elements. """ length = len(data) for i in range(length - 1): min_index = i for j in range(i + 1, length): if data[j] < data[min_index]: min_index = j if i != min_index: data[i], data[min_index] = data[min_index], data[i] return data # Example usage my_data = [64, 25, 12, 22, 11] sorted_data = selection_sort(my_data.copy()) # Avoid modifying original list print(sorted_data) # Output: [11, 12, 22, 25, 64]
@gamergoogol2048
@gamergoogol2048 Ай бұрын
why did i find this so early
@_personwhoplaysalot_336
@_personwhoplaysalot_336 Ай бұрын
i cant..... bogo blinded me
@RiedlerMusics
@RiedlerMusics Ай бұрын
why do none of the popular visualizations show more than one bucket? :argh: fyi, I made basav (bucket-aware sorting algorithm visualizer), but it's been unmaintainable and dead for years… I want to remake it properly one day, but I don't have time…
@LitoMike
@LitoMike Ай бұрын
my ears are secreting some weird red substance right now
@quocphong6588
@quocphong6588 Ай бұрын
Quick sort is my favorite algorithm
@urphakeandgey6308
@urphakeandgey6308 Ай бұрын
4:35 Sounds like something Pilot Red Sun would kill to imitate.
@Nedo_letsplayshik
@Nedo_letsplayshik Ай бұрын
Stalin sort🗣️🗣️🗣️🔥🔥🔥🔥🔥💯💯💯💯💯
@memofrf
@memofrf 28 күн бұрын
Baiiai not sure if i spelled it correctly but you get me.
@candykatkittylichiousisthebomb
@candykatkittylichiousisthebomb Ай бұрын
Cool!
@nevverre3500
@nevverre3500 Ай бұрын
Eye candy
@dj_laundry_list
@dj_laundry_list Ай бұрын
It would be cool if the runtimes were included... so I could hone my intuition about runtime
@fortcraftgaming2136
@fortcraftgaming2136 19 күн бұрын
The binary sounded like oof
@Ehanray
@Ehanray Ай бұрын
Algorithm 3 is super efficient its already done in 13 seconds
@otinissian
@otinissian Ай бұрын
YEY
@franklinbates925
@franklinbates925 Ай бұрын
quick is my favorate.
@asheep7797
@asheep7797 Ай бұрын
Poplar sort, why do you use the orginal sound?
@aykarain
@aykarain Ай бұрын
new samples!!??!?!?!?!?!?
@MrDasirae
@MrDasirae 27 күн бұрын
I've defragged myself
@dmirtyisakov8112
@dmirtyisakov8112 Ай бұрын
no bogobogo sort?
@truongquangduylop33
@truongquangduylop33 Ай бұрын
def comb_sort(data): """Sorts a list of data in ascending order using comb sort. Args: data: A list of sortable elements. Returns: A new list containing the sorted elements. """ shrink_factor = 1.3 gap = len(data) completed = False while not completed: # Update the gap value for a next comb gap gap = int(gap / shrink_factor) if gap < 1: gap = 1 completed = True index = 0 while index + gap < len(data): if data[index] > data[index + gap]: data[index], data[index + gap] = data[index + gap], data[index] index += 1 return data # Example usage my_data = [5, 2, 4, 6, 1, 3] sorted_data = comb_sort(my_data.copy()) # Avoid modifying original list print(sorted_data) # Output: [1, 2, 3, 4, 5, 6]
@theautisticdoomgod
@theautisticdoomgod Ай бұрын
THESE SOUNDS!!!!!!! 🤤🤤🤤🤤🤣🤣🤣🤣
@ishu4227
@ishu4227 6 күн бұрын
I think gravity is just reverse bubble sort
@aidanmaniaMusic
@aidanmaniaMusic Ай бұрын
No spaghetti ):
@SlashCrash_Studios
@SlashCrash_Studios Ай бұрын
Come to tf2, we have spaghetti of the source variety by the pallet!
@OLIVE_MANN
@OLIVE_MANN Ай бұрын
Ow my ears
@temmie1662
@temmie1662 Ай бұрын
How did you get the sounds lol
@usernametaken017
@usernametaken017 Ай бұрын
each number has a pitch i think
@temmie1662
@temmie1662 Ай бұрын
@@usernametaken017 like number of n
@vk8a8
@vk8a8 Ай бұрын
what was your first sorting algorithm? mine was insertion
@Kuvina
@Kuvina Ай бұрын
Selection is definitely the first idea that would come to mind, followed by bubble sort probably
@truongquangduylop33
@truongquangduylop33 Ай бұрын
Mine iz Alternats Bitonic​@@Kuvina
@arcturusgd
@arcturusgd 21 күн бұрын
radix lsd base 4 and radix msd base 4
@Greenthinglikesme7291
@Greenthinglikesme7291 Ай бұрын
Number-1+1×2×2÷2÷2 sort 5000 numbers 100 number per sort
@diegojost3351
@diegojost3351 Ай бұрын
whadamawachin
@NumberVectors
@NumberVectors Ай бұрын
heap looks like an avalanche 😂
@yellowmarkers
@yellowmarkers Ай бұрын
Kuvina Saydaki
@kxtbit
@kxtbit Ай бұрын
indeed
@truongquangduylop33
@truongquangduylop33 Ай бұрын
.
@mohamedshirajabdulshattar7030
@mohamedshirajabdulshattar7030 12 сағат бұрын
Bogo n=6 is weird
@jimiwills
@jimiwills Ай бұрын
Pancake made me feel sick.
@thienluuduc2207
@thienluuduc2207 Ай бұрын
wavw
@mansurehrezaeitabar3110
@mansurehrezaeitabar3110 Ай бұрын
0:06 Selection Sort,1st Sort of Selection Sorts Family 0:26 Double Selection Sort,2nd Sort of Selection Sorts Family 0:37 Insertion Sort,1st Sort of Insertion Sorts Family 1:00 Binary Insertion Sort,2nd Sort of Insertion Sorts Family 1:14 Bubble Sort,1st Sort of Exchange Sorts Family 1:39 Cocktail Shaker Sort,2nd Sort of Exchange Sorts Family 2:01 Comb 🪮 Sort,3rd Sort of Exchange Sorts Family 2:21 Maximum Heap Sort,3rd Sort of Selection Sorts Family 2:43 Minimum Heap Sort,4th Sort of Selection Sorts Family 2:55 Shell 🐚 Sort,3rd Sort of Insertion Sorts Family 3:24 Quick Sort(Left/Right Pointers),4th Sort of Exchange Sorts Family 3:47 Merge Sort,1st Sort of Merge Sorts Family 4:15 Least Significant Digit Radix Sort(Base 4),1st Sort of Distribution Sorts Family 4:35 Least Significant Digit Radix Sort(Base 10),2nd Sort of Distribution Sorts Family 4:53 Most Significant Digit Radix Sort(Base 4),3rd Sort of Distribution Sorts Family 5:16 Most Significant Digit Radix Sort(Base 10),4th Sort of Distribution Sorts Family 5:33 Bucket 🪣 Sort(10 Buckets),5th Sort of Distribution Sorts Family 6:04 Bucket 🪣 Sort(10 Bucket Numbers),6th Sort of Distribution Sorts Family 6:19 Counting Sort,7th Sort of Distribution Sorts Family 6:33 Gravity Sort,8th Sort of Distribution Sorts Family 6:46 BOGO Sort,1st Sort of Impractical Sorts Family 7:08 Pancake 🥞 Sort,1st Sort of Misccelaneous Sorts Family 7:37 Cycle 🔁🔄🔃 Sort,5th Sort of Selection Sorts Family 8:05 Sandpaper Sort(aka Earthbound Sort),5th Sort of Exchange Sorts Family 8:28 Reverse Sandpaper Sort(or Reverse Earthbound Sort),6th Sort of Exchange Sorts Family 8:44 Odd-Even Sort,7th Sort of Exchange Sorts Family 9:08 Gnome Sort,8th Sort of Exchange Sorts Family 9:32 Baiai Sort,1st Sort of Hybrid Sorts Family 9:55 Circle ⭕️ Sort,9th Sort of Exchange Sorts Family 10:13 Patience Sort,4th Sort of Insertion Sorts Family 10:43 Strand Sort,2nd Sort of Merge Sorts Family 11:19 Iterative Bitonic Sort,1st Sort of Concurrent Sorts Family
@nojokeimcrying
@nojokeimcrying Ай бұрын
Me *not understanding wtf is going on* Kewl sounds and colours hehe
@mzakyr342
@mzakyr342 Ай бұрын
if the software is not open source the its a crime punishable with 30 times licking ice cream
@TheRush.000
@TheRush.000 Ай бұрын
16:33 this tim sort is same as merge
@TheRush.000
@TheRush.000 Ай бұрын
18:23 this Weave sort is same as merge too
@pangpanggao
@pangpanggao 7 күн бұрын
Well they are both different from actual merge. Tim makes sub lists of size 32-64 with insertion, and weave alternates between the two, then insertions sorts them. Sure, they do look similar, but they are different algorithms.
@dmirtyisakov8112
@dmirtyisakov8112 Ай бұрын
miracle sort just gave up lol
@justman017
@justman017 Ай бұрын
Stalin?
@_personwhoplaysalot_336
@_personwhoplaysalot_336 Ай бұрын
the heck what happened to stalin?????
@unnnamd
@unnnamd Ай бұрын
Stalin sort just deletes any element that is smaller than the previous one, it's just how it sorts
@gamerguyrandom
@gamerguyrandom Ай бұрын
8
@asheep7797
@asheep7797 Ай бұрын
2 hors
@vk8a8
@vk8a8 Ай бұрын
hello😊
@ReynardJumawan-yd1pe
@ReynardJumawan-yd1pe Күн бұрын
Yhhi
@truongquangduylop33
@truongquangduylop33 Ай бұрын
R
@DEMEMZEA
@DEMEMZEA Ай бұрын
Why no sound?
@Kuvina
@Kuvina Ай бұрын
There's sound
@DEMEMZEA
@DEMEMZEA Ай бұрын
Maybe@@Kuvina Maybe
@parkpakh7775
@parkpakh7775 Ай бұрын
@DEMEMZEA there is
@DEMEMZEA
@DEMEMZEA Ай бұрын
@@parkpakh7775 maybe
@DictatePM
@DictatePM Ай бұрын
what do you mean with 'maybe'...?​@@DEMEMZEA
@kaderen8461
@kaderen8461 4 күн бұрын
the math nerd to trans pipeline is going crazy rn
@Chunes3
@Chunes3 Ай бұрын
Counting sort looks like cheating!
@Kuvina
@Kuvina Ай бұрын
It kind of is, since it only works on integers! Also, my array is always just integers 1 to n, but if you had a very large range of numbers, it would be really slow.
@helios749
@helios749 28 күн бұрын
LGBT ?
@DrozGodhammer
@DrozGodhammer Ай бұрын
sounds like a cat falling unto a piano and then doing a tap dance on it.
@subscheme
@subscheme Ай бұрын
lol
How I made my own Fractal
17:33
Kuvina Saydaki
Рет қаралды 79 М.
The Bubble Sort Curve
19:18
Lines That Connect
Рет қаралды 440 М.
A pack of chips with a surprise 🤣😍❤️ #demariki
00:14
Demariki
Рет қаралды 51 МЛН
I wish I could change THIS fast! 🤣
00:33
America's Got Talent
Рет қаралды 59 МЛН
MEU IRMÃO FICOU FAMOSO
00:52
Matheus Kriwat
Рет қаралды 28 МЛН
Stupid Barry Find Mellstroy in Escape From Prison Challenge
00:29
Garri Creative
Рет қаралды 20 МЛН
The Most Satisfying Animations You'll Ever See
8:36
CodeCraftedPhysics
Рет қаралды 449 М.
The ALMOST Platonic Solids
28:43
Kuvina Saydaki
Рет қаралды 109 М.
Raylib Sorting Visualizer Update
3:57
William Powell “wmpowell8”
Рет қаралды 461
Every Sorting Algorithm Explained in 120 minutes (full series)
1:57:33
Kuvina Saydaki
Рет қаралды 46 М.
Rotating Polygons on the Circle of Fifths | Surprising Results!
9:48
I Made a Graph of Wikipedia... This Is What I Found
19:44
adumb
Рет қаралды 2,5 МЛН
10 FORBIDDEN Sorting Algorithms
9:41
Ardens
Рет қаралды 797 М.
I Made Sorting Algorithms Race Each Other
8:24
Green Code
Рет қаралды 27 М.
Visualization of Radix sort
7:02
udiprod
Рет қаралды 25 М.
iOS 18 vs Samsung, Xiaomi,Tecno, Android
0:54
AndroHack
Рет қаралды 80 М.
Cadiz smart lock official account unlocks the aesthetics of returning home
0:30
Собери ПК и Получи 10,000₽
1:00
build monsters
Рет қаралды 999 М.
Gizli Apple Watch Özelliği😱
0:14
Safak Novruz
Рет қаралды 3,5 МЛН