Bubble Sort

preview_player
Показать описание
Visualization and "audibilization" of the Bubble Sort algorithm.
Sorts a random shuffle of the integers [1,100] using bubble sort.
Рекомендации по теме
Комментарии
Автор

I tried to sort my cards by bubble sort.
At last I did 5000 comparisons.

gabrielchan
Автор

I find it interesting how the unsorted part of the set develops a shape like a log graph.

JerusalemStrayCat
Автор

I was writing the visualization for this and when I ran it for 100 data points, i legitimately thought I had coded it wrong bc it was taking forever and i thought "who the hell would even write a sort this inefficient, I must have implemented it wrong or something", and then I google it and find out that this really is the worst algorithm ever lol

jairadhakrishnan
Автор

WOP WOOP WOOOP WOOOOP WOP WOP WOP WOP WOP

estebanvasquez
Автор

I can tell why it's called bubble. It sounds like what someone would hear when they drown; slowly diminishing hope, slowly turning into very distress cries which get shorter and shorter until they meet their demise.

eternalnut
Автор

Perhaps one of the simplest sorts currently existing, and probably one that works best on nearly sorted data. It's still not the most efficient by far.

aether-music
Автор

Bubble sort: Push greater item forward.

want-diversecontent
Автор

This animation is really misleading. It makes it appear like the right end of the array is evaluated and not touched as it builds the order (because there's no swaps). This makes it look like insertion sort. Should have been red for a swap and green for the index position (eval but no swap), because regardless if a swap happened or it was just an evaluation, it's still <n> iterative work.

rickleverton
Автор

Bubble sort actually sounds like bubbles!

NeonNinja
Автор

When you accidentally step on your dog's tail

Sooper
Автор

It's like if quick sort wanted to be selection sort without realising it's not got the same skills.

weaponizedpizza
Автор

this helps so much thanks! better than any code or explanation

MrsMalinaM
Автор

Literally the sound of oxygen escaping from a drowning mans lungs

lpsp
Автор

We listened to this a lot in my comp sci class and one of my classmates older sister could hear it from the class across the hall and asked if we were summoning a demon😂

xpeachyx
Автор

Fun fact: this is the most common way people start to sort stuff

josephjackson
Автор

Love these videos, 50 more sorts to go

annora
Автор

That's some nightmare fuel right there

Автор

This issue seems clear to me. The bars to the left have been sorted first, outside the influence of the bubbled data points. Thus, they are more organized, forming the tip of our curve. Then the list becomes more chaotic due to the bubbled data points. We can see some bars did get slightly bubbled, within the chaos. And so, they form a curve, with a steep tip that deaccelerates as it goes.

JimmyExtreme
Автор

Is this bubble sort optimised? In the best case, optimised will work for O(n) and unoptimised will do for O(n^2)

СавелийИсаев-ък
Автор

That's the sound a sci-fi space ship would make to tell that the nuclear-whatever core is curently melting down and that everybody on board should get out while they stil can.

morshu