Comb Sort

  Рет қаралды 89,756

Timo Bingmann

Timo Bingmann

Күн бұрын

Пікірлер: 63
@tennenyt5311
@tennenyt5311 4 жыл бұрын
Why is this one of the funniest things I've ever seen and what's wrong with me?
@CatoSierraWasTaken
@CatoSierraWasTaken 6 жыл бұрын
interesting how it creates an approximate sort relatively quickly. Maybe a few passes of this and then feeding it to something that works well on nearly sorted lists (like linear insertion) would be a good idea.
@raffimolero64
@raffimolero64 2 жыл бұрын
that's actually exactly what it does. it makes an approximate sort, then feeds it into a smaller version of itself. if you want an insertion sort version, use shellsort.
@matthewzhao7316
@matthewzhao7316 9 жыл бұрын
Starts off fast, then at the end it takes forever to sort.
@richardhuang8512
@richardhuang8512 9 жыл бұрын
+MATTHEW ZHAO yeah its my favorite sorting algorithm. well second favorite. I think we all know my first favorite ;)
@richardhuang8512
@richardhuang8512 9 жыл бұрын
+MATTHEW ZHAO sex
@groszak1
@groszak1 8 жыл бұрын
Bubble sort has always the part that "takes forever". Comb sort makes some faster passes that make it ... faster.
@mac6na6na26
@mac6na6na26 4 жыл бұрын
Generally you would put a different sort like bubble sort at the end
@spencerandersen271
@spencerandersen271 10 жыл бұрын
Love this algorithm; when audibilized it sounds like Super Mario.
@Zxoro
@Zxoro 6 жыл бұрын
0:40 when you try playing the piano for the first time
@afj810
@afj810 4 жыл бұрын
CHROMATIC SCALE
@humanoidx977
@humanoidx977 Жыл бұрын
sound like some liszt cadenza
@Drivenout
@Drivenout 7 жыл бұрын
00:39 Time keeps on slippin slippin slippin into the future~
@ATIHpss64HM
@ATIHpss64HM 4 жыл бұрын
Lol
@ATIHpss64HM
@ATIHpss64HM 4 жыл бұрын
U a steve miller fan?
@AriTheMothQueen
@AriTheMothQueen 4 жыл бұрын
Two workers doing a job. Im proud of em
@quink2060
@quink2060 7 жыл бұрын
I'd think this'd be best if there was a way to detect if all elements were within like 5 or 10 places of their proper place, then another sort could come in, where it'd be faster with a near-sorted list.
@groszak1
@groszak1 7 жыл бұрын
Comb Sort _is_ doing large gapsize passes to cause list to become nearly sorted, however they are bubble passes, and switching to 1-passes quickly would not lead to much improvement, because many passes are needed anyway. If you want a sort with insertion passes and fewer of them, go to Shell Sort.
@joedempseysr.3376
@joedempseysr.3376 7 жыл бұрын
The Comb Sort is inefficient. Somewhere between the Shell Sort and Bubble Sort. I prefer the LSD First Radix Sort for integers and Quick Sort for everything else. I generally use the Insertion Sort within the Quick Sort for the small buckets. I also test all sorting algorithms on each platform before deploying in the field. In this way, I can tweak the algorithms for optimal performance.
@bbdare7874
@bbdare7874 6 жыл бұрын
It's definitely inefficient, but that's just because it was only ever designed as a minor improvement to Bubble sort. it's supposed to more quickly handle "turtles" or the large values that are closer to the start, as this slows down bubble sort plenty due to it not being able to move it across the array quickly.
@nunsense9489
@nunsense9489 6 жыл бұрын
@@bbdare7874 nerds
@raffimolero64
@raffimolero64 6 жыл бұрын
@@nunsense9489 the kind that builds computers and allows you to have youtube sort by most liked
@comet9864
@comet9864 2 жыл бұрын
@@raffimolero64 lol
@Ambipie
@Ambipie 4 жыл бұрын
Paid by the hour and fed right on up, its Comb Sort, goofing around with a comb waiting for the deadline.
@zerosora8520
@zerosora8520 7 жыл бұрын
lol the last when the distance=2 it does one useless run
@Ramzuiv
@Ramzuiv 7 жыл бұрын
ZeroSora: It’s not actually useless- while it’s obvious to the human eye that the list is sorted, the algorithm doesn’t actually know that, so it has to check to make sure. Remember that this occurs over the span of less than a millisecond in real life.
@raffimolero64
@raffimolero64 7 жыл бұрын
it's not guaranteed that when the distance is 2 it will be sorted next round, so it checks.
@BlackXxScopez
@BlackXxScopez 6 жыл бұрын
Mikk W it is useless though. Good sorts have flags for when they're already sorted, and are set as true by default. The flag is only set as false when the algorithm makes a swap.
@Isaic02
@Isaic02 6 жыл бұрын
@@BlackXxScopez It would take longer to check the flag every run than it does to run that last run.
@BlackXxScopez
@BlackXxScopez 6 жыл бұрын
@@Isaic02 checking flags is linear, but the savings checking them create more than make up for it
@groszak1
@groszak1 7 жыл бұрын
What the heck? How did you get comb sort to work so poorly? More than one 1-pass was needed to eliminate all inversions. A good comb sort parameter choice would _usually_ end all inversions in one 1-pass, not counting the second pass needed to ensure proper sorting.
@raffimolero64
@raffimolero64 7 жыл бұрын
this is one of the cases that isn't part of _usually_
@groszak1
@groszak1 7 жыл бұрын
I have Sound Of Sorting and I notice it often.
@strangent404a7
@strangent404a7 6 жыл бұрын
"We an't found shit!" Spaceballs
@Obstagoon862
@Obstagoon862 8 жыл бұрын
What's the difference between the comb and shell sorts?
@LadyZechie
@LadyZechie 8 жыл бұрын
Comb Sort works like an upgraded Bubble Sort by comparing two elements and swapping them, except the elements are a certain distance away rather than right next to one another. The distance at which elements are compared is decreased per each complete interval until they're right next to each other, in which case it's the same as Bubble Sort (but hopefully it should complete sorting relatively soon after it hits that point.) Shell Sort works similarly in that the compared elements aren't always right next to each other, BUT Shell Sort compares more than 2 elements at most times. From when it begins sorting, Shell Sort sorts every nth element of the list so that every nth element is sorted as you want them to be, while reducing n every interval until it's comparing every element to one another, at which point it's the same thing as Bubble Sort. (It's also worth noting that I'm not a master of sorting algorithm knowledge, I only started getting into how these all work recently so I can't honestly get into specifics like time complexity and best/worst case scenarios or where Bubble/Comb/Shell would each be better than one another)
@gisibah
@gisibah 8 жыл бұрын
Zechling i'd say shell sort is an upgraded insertion sort rather than bubble sort
@want-diversecontent3887
@want-diversecontent3887 6 жыл бұрын
Samurott Gaming Inc. wrong.
@dlwatib
@dlwatib 5 жыл бұрын
You're wrong about Shell sort comparing more than 2 elements at a time. There is no computer instruction that can compare more than two elements at once. What's actually happening is that Shell sort is doing an insertion sort with gaps. Instead of sorting every element, it's sorting every 5th element, etc., then shortening the gap until the entire list is sorted. Comb sort just bubbles elements closer to their final destination, it doesn't completely sort its sublists like Shell sort does.
@samb443
@samb443 5 жыл бұрын
isnt this video misnamed, this looks like shell sort, not comb
@princessemila8056
@princessemila8056 6 ай бұрын
This is not the original EAS alarm. The audio is from a video called Comb Sort.
@Asdfghkll49
@Asdfghkll49 5 ай бұрын
What
@ovi1326
@ovi1326 4 жыл бұрын
Ah yes, jazz music
@jazzyboyem7b569
@jazzyboyem7b569 4 жыл бұрын
As a jazz musician i can confirm this.
@narucy56
@narucy56 11 жыл бұрын
We love Comb Sort!
@itspinebro
@itspinebro Жыл бұрын
beep boop beeeep boop i dont understand but brain go weee
@perpendicularfifths7312
@perpendicularfifths7312 3 жыл бұрын
starting up, dont step on yet
@yamibakura8805
@yamibakura8805 6 жыл бұрын
crab sort?
@smestre
@smestre 6 жыл бұрын
aka poor man's Shell sort?
@bethmadden82
@bethmadden82 9 ай бұрын
Comb Sort
@SouravDash96
@SouravDash96 7 жыл бұрын
better to tell the algo
@wowyeah666
@wowyeah666 9 жыл бұрын
816
@ALLCAPS
@ALLCAPS 6 жыл бұрын
Pretty gay. It's almost as bad as the bubble sort. It's like running two threads of bubble sort through some program. LOL! E. Z.
15 Sorting Algorithms in 6 Minutes
5:50
Timo Bingmann
Рет қаралды 25 МЛН
Odd-Even Sort
2:09
Timo Bingmann
Рет қаралды 66 М.
How to treat Acne💉
00:31
ISSEI / いっせい
Рет қаралды 108 МЛН
When you have a very capricious child 😂😘👍
00:16
Like Asiya
Рет қаралды 18 МЛН
UFC 310 : Рахмонов VS Мачадо Гэрри
05:00
Setanta Sports UFC
Рет қаралды 1,2 МЛН
In-Place LSD Radix Sort
13:11
Musicombo
Рет қаралды 142 М.
Turning Math Into Art With Beautiful Fractals
8:45
Numb3r Tr33
Рет қаралды 385 М.
10 FORBIDDEN Sorting Algorithms
9:41
Ardens
Рет қаралды 976 М.
Obscure Sorting Algorithms
4:06
Sorting Stuff
Рет қаралды 700 М.
Visualizing 70 Sorting Algorithms
29:24
Kuvina Saydaki
Рет қаралды 253 М.
*SEIZURE WARNING* Pushing Sorts to their Limits
59:06
Musicombo
Рет қаралды 5 МЛН
Slow Sort
3:05
Timo Bingmann
Рет қаралды 325 М.
Listening to Sorting Algorithms!
17:16
Kitty Beans
Рет қаралды 765 М.