50+ Sorts, Visualized - Almost Sorted Inputs

แชร์
ฝัง
  • เผยแพร่เมื่อ 9 มิ.ย. 2019
  • Visit our community Discord: / discord
    This bar graph visualization features 54 different sorting algorithms sorting inputs that either were 90% sorted or had at least one number out of order.
    *NOTE: Some algorithms with pathological inputs are skipped partway in this video to save time.
    Check out the NEW home for ArrayV here: github.com/gaming32/ArrayV-v4.0
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 287

  • @Musicombo
    @Musicombo  3 ปีที่แล้ว +4

    Join our community Discord! discord.com/invite/2xGkKC2

  • @Cane-Aubright
    @Cane-Aubright 4 ปีที่แล้ว +808

    I love how confused the algorithms are like "wtf is this some kind of joke" and they proceed to overdo it.

    • @Green24152
      @Green24152 4 ปีที่แล้ว +31

      HEAP SORTS

    • @indeepjable
      @indeepjable 4 ปีที่แล้ว +19

      They *Broke* It And Fixed It

    • @WaluigiisthekingASmith
      @WaluigiisthekingASmith 4 ปีที่แล้ว +5

      Merge sort

    • @icebearpl188
      @icebearpl188 4 ปีที่แล้ว +10

      Pigeonhole and gravity are still like: *??? Either way, ill just do my job*
      And they do it fast either way without breaking it

    • @daffa_fm4583
      @daffa_fm4583 4 ปีที่แล้ว +1

      Pancake sort

  • @Israel220500
    @Israel220500 3 ปีที่แล้ว +89

    "The data is almost sorted."
    Radix sorts: "Who cares?"

  • @nexterpl3085
    @nexterpl3085 4 ปีที่แล้ว +260

    7:47 - Still the best at wasting your time, ears, disk throughput, CPU resources and sanity

    • @marcscattolin1554
      @marcscattolin1554 4 ปีที่แล้ว +25

      Radix sort is incredibly fast at least with random input

    • @nexterpl3085
      @nexterpl3085 4 ปีที่แล้ว +26

      ​@@marcscattolin1554
      I just checked how he actually works, and yeah, seems like you're right.
      Radix is like counting sort, but can use less memory for very high numbers.

    • @Leta_Star
      @Leta_Star 4 ปีที่แล้ว +6

      At least it’s funny to watch lol

    • @marcscattolin1554
      @marcscattolin1554 4 ปีที่แล้ว +2

      @Flippy Flip Tru although not in place radix sort is fast

    • @Kino-Imsureq
      @Kino-Imsureq 4 ปีที่แล้ว +4

      its fast when you're confident that the list is random and large, if not then dont use radix lol

  • @DeinonychusCowboy
    @DeinonychusCowboy 4 ปีที่แล้ว +152

    Wow, never seen such a dramatic difference between quicksort and stable quicksort.

    • @Ambipie
      @Ambipie 2 ปีที่แล้ว +9

      Stable hates it to the point it got that slowed down

  • @ZmanVlog
    @ZmanVlog 4 ปีที่แล้ว +458

    1:21 "Stable Quick Sort"
    Well, he didn't act like it. In fact, the poor guy seemed rather unstable.

    • @user-xh9pu2wj6b
      @user-xh9pu2wj6b 4 ปีที่แล้ว +22

      stability refers to the order of the elements of the same value.

    • @SeventhSolar
      @SeventhSolar 4 ปีที่แล้ว +31

      Take a look at the timer, it still ended up quicker than just about every other sort. The video just played that part really, really slowly for some reason.

    • @septicstache9625
      @septicstache9625 4 ปีที่แล้ว +21

      3 comments and none of them got the joke

    • @brandonn6099
      @brandonn6099 4 ปีที่แล้ว +3

      @@septicstache9625 OP doesn't understand. It is quite stable, even if it appears chaotic and unstable. I know how it works I program.

    • @septicstache9625
      @septicstache9625 4 ปีที่แล้ว +26

      @@brandonn6099 I'm pretty sure that OP was talking about the algorithm like it was a person

  • @nathangamble125
    @nathangamble125 4 ปีที่แล้ว +177

    Counting sort: Hmm, yes, data.
    Counting sort 1ms later: Swoosh, I've sorted it.
    Wait, what? How?
    Pigeonhole sort 0.5ms later: Swooshing from this direction is faster.

    • @pabloibanez8210
      @pabloibanez8210 3 ปีที่แล้ว +12

      In-Place Radix LSD Sort, Base 16: *Hacking System*

    • @astro_cat030
      @astro_cat030 2 ปีที่แล้ว +1

      @@pabloibanez8210 lol

    • @pneumoniasoupisnotagoodorange
      @pneumoniasoupisnotagoodorange 2 ปีที่แล้ว +2

      @@pabloibanez8210 Radix In-Place 16: *hack and have a brain aneurysm*

    • @theguywhofrogottonotask5676
      @theguywhofrogottonotask5676 2 ปีที่แล้ว

      Counting sort does it by counting the lsd from ones tensión hundreds etc

  • @kp2k
    @kp2k 4 ปีที่แล้ว +64

    24:21: almost sorted
    24:22: OH NO RANDOM

  • @TekExplorer
    @TekExplorer 4 ปีที่แล้ว +114

    9:28 Estimated Real Time: 8,192.709ms
    UM

    • @MortalMercury
      @MortalMercury 4 ปีที่แล้ว +18

      Maybe thats why it's called time sort LOL

    • @TekExplorer
      @TekExplorer 4 ปีที่แล้ว +7

      @@MortalMercury yeah. But what exactly is it DOING?

    • @MortalMercury
      @MortalMercury 4 ปีที่แล้ว +1

      @@TekExplorer Idk, it was a joke

    • @TekExplorer
      @TekExplorer 4 ปีที่แล้ว +4

      @@MortalMercury it didn't work because it's true. I just wonder what it's actually doing to be called time sort or to take so long such that it gets named time sort.

    • @firstnameiskowitz8493
      @firstnameiskowitz8493 4 ปีที่แล้ว +2

      Silly and Slow Sort both got 17000 something milliseconds.

  • @shadowfire04
    @shadowfire04 4 ปีที่แล้ว +46

    counting and pigeonhole sort: YOU DARE APPROACH ME? *sorts whole thing in half a millisecond*

  • @hypertion
    @hypertion 4 ปีที่แล้ว +100

    Strangest asmr on youtube.

  • @DeinonychusCowboy
    @DeinonychusCowboy 4 ปีที่แล้ว +19

    Radix LSD sort: imagine a different reality where this array was sorted
    Viewer: But... It's the same. You traveled through dimensions to one where it was almost exactly the same.
    Radix LSD sort: e x a c t l y

  • @this_commenter_had_a_stroke
    @this_commenter_had_a_stroke 4 ปีที่แล้ว +29

    I'm so used to merge sort going "whoop whoop" and now with the almost sorted inputs it just sounds shy

  • @CariagaXIII
    @CariagaXIII 4 ปีที่แล้ว +80

    next video: just 1 item out off place in the middle then let it sort that.

    • @Schnorzel1337
      @Schnorzel1337 4 ปีที่แล้ว +12

      Go one further and sort an already sorted list.

    • @temmie9997
      @temmie9997 4 ปีที่แล้ว +3

      Desort it

    • @ENCHANTMEN_
      @ENCHANTMEN_ 4 ปีที่แล้ว +5

      @@temmie9997 shuffle an already sorted array and then play it in reverse

    • @californium-2526
      @californium-2526 3 ปีที่แล้ว +1

      In place LSD sort: Let me desort and resort it in 350 ms!

  • @elvisdepressly6965
    @elvisdepressly6965 5 ปีที่แล้ว +62

    Radix LSD and Radix MSD are my favorites

  • @often_nie
    @often_nie 4 ปีที่แล้ว +36

    Uses pancake sort as dystopian city skyline

  • @mateuszodrzywoek8658
    @mateuszodrzywoek8658 4 ปีที่แล้ว +126

    Depending on your luck, bogo sort can either solve on its 1st attempt, its n!th attempt or anything in-between. For example, if you give bogo sort a random assortment of 9 numbers, it will take it anywhere from 1 to 9! attempts.

    • @connorhorman
      @connorhorman 4 ปีที่แล้ว +55

      TechnoGuz GD Actually, its possible for bogosort to never successfully sort an array larger than size one, its just Probability 0.

    • @brandonn6099
      @brandonn6099 4 ปีที่แล้ว +9

      @@connorhorman Depends on if it's random or permutative

    • @connorhorman
      @connorhorman 4 ปีที่แล้ว +18

      Brandon N bogosort is random.

    • @brandonn6099
      @brandonn6099 4 ปีที่แล้ว +12

      @@connorhorman There are versions where it goes through every possibility instead of randomly

    • @realprotonn
      @realprotonn 4 ปีที่แล้ว +2

      @@brandonn6099 it still takes over 1000000000 comparisons to sort 20 units, no matter what

  • @nucg5040
    @nucg5040 2 ปีที่แล้ว +8

    i love how the heap sorts just take a look at the almost sorted graph and just throw that all out the window

    • @want-diversecontent3887
      @want-diversecontent3887 2 ปีที่แล้ว +1

      They do that even when it's already done

    • @TransistorizedCharlie
      @TransistorizedCharlie 6 หลายเดือนก่อน

      Yep they always make their heap no matter what the array is. It makes the time taken to sort the array exactly the same each time so the time complexity never changes

  • @ExtremeSquared
    @ExtremeSquared 4 ปีที่แล้ว +111

    It's possible Slowsort and Badsort just have a confidence problem.

    • @CariagaXIII
      @CariagaXIII 4 ปีที่แล้ว +1

      try to give it more motivation

    • @amethystt727
      @amethystt727 4 ปีที่แล้ว +9

      You can do it badsort! I believe in you!

    • @Tonatsi
      @Tonatsi 4 ปีที่แล้ว +1

      DemNoel The Internet Guy you can do it goodsort!

    • @nathangamble125
      @nathangamble125 4 ปีที่แล้ว +1

      Badsort was actually one of the fastest sorts. It only took 5ms.

    • @cube2fox
      @cube2fox 4 ปีที่แล้ว +5

      @@nathangamble125 Like the other "impractical" algorithms at the end it sorted only 256 numbers instead of 2048.

  • @gal749
    @gal749 4 ปีที่แล้ว +13

    AutoCaptions: [Music]
    Yeah, there's no other way of describing this sound

  • @ZyphLegend
    @ZyphLegend 4 ปีที่แล้ว +14

    lmao, I love how some of these just make it worse before making it better

  • @edwardclark6731
    @edwardclark6731 2 ปีที่แล้ว +2

    Bogosort: NOOO, YOU CAN'T JUST FLIP IT AND GET IT RIGHT!!!
    Pancake sort: flip go brrrrrrr

  • @chasington5102
    @chasington5102 3 ปีที่แล้ว +5

    18:04
    Captions: [Laughter]
    Ahh yes, I too laugh in kfuenmfiwunrnlcuzhnekfi

  • @rocksalt636
    @rocksalt636 3 ปีที่แล้ว +25

    combing sort is really good at making the data almost sorted, it’s just slow finishing it off.
    Combining it with a pidgeonhole sort would probably be a really fast algorithm.

  • @PJM257
    @PJM257 2 ปีที่แล้ว +8

    I like how bad sort is actually really fast in this situation

  • @GeorgeCowsert
    @GeorgeCowsert 3 ปีที่แล้ว +6

    It's situations like these that explain why I like Bubble Sort. No BS complicated algorithm to add steps when it's sometimes just not necessary.

    • @the_cheese_cultist
      @the_cheese_cultist 2 ปีที่แล้ว +5

      but very slow
      if you want an easy to implement algorithm that does relatively well, use insertion sort
      infact many hybrid algorithms use insertion sort for small subarrays

  • @wolfether
    @wolfether 3 ปีที่แล้ว +6

    1:22 is my brain when I try to put two things together.

  • @firstnameiskowitz8493
    @firstnameiskowitz8493 5 ปีที่แล้ว +71

    25:41

  • @bluesansball3707
    @bluesansball3707 3 ปีที่แล้ว +3

    I have an indescribable hatred for the comb sort

  • @sunnywunny
    @sunnywunny 2 ปีที่แล้ว +4

    I will never understand wtf pancake sort is doing but it's a masterpiece

  • @jiaming5269
    @jiaming5269 4 ปีที่แล้ว +3

    Damn max heap lookin good 2:47

  • @matthew99_
    @matthew99_ 4 ปีที่แล้ว +58

    Me: turns on the washing machine
    The washing machine: 0:55

  • @Ambipie
    @Ambipie 2 ปีที่แล้ว +1

    Heap Sort: I'm not gonna hurt myself I'm just gonna start from scratch

  • @Henrix1998
    @Henrix1998 4 ปีที่แล้ว +15

    Silly sort and pancake sort didnt even try

  • @sinajakelic
    @sinajakelic 5 ปีที่แล้ว +112

    meanwhile, pigeonhole went ‘hold my beer’

    • @the_cheese_cultist
      @the_cheese_cultist 5 ปีที่แล้ว +4

      Pigeonhole is my favorite sorting algorithm

    • @indeepjable
      @indeepjable 4 ปีที่แล้ว +1

      Its Actually The Best Sorting Algorithm

    • @Alexander-oh8ry
      @Alexander-oh8ry 4 ปีที่แล้ว +24

      @@indeepjable nope. It requires insane amounts of auxilliary memory. Even more if the array elements werent distributed evenly on a straight slope

    • @Hexhammer
      @Hexhammer 4 ปีที่แล้ว +5

      @@Alexander-oh8ry i'm an outsider to this stuff. what exactly determines the best sorting method? i imagine it's not a linear answer but if it's possible eli5

    • @Alexander-oh8ry
      @Alexander-oh8ry 4 ปีที่แล้ว +15

      @@Hexhammer depends heavily on the purpose and circumstances. Bubblesort is pretty bad, but very easy to implement, counting/pigeonhole sort are very quick if you have enough memory, etc. The Introsort can be considered the best, as it tries to determine which subalgorithm should be used to continue sorting. Just the ones with negative names, plus stoogesort and gnome sort (basically a dumb insertion sort) and bogosort and bozosort are literally useless

  • @australiananarchist480
    @australiananarchist480 3 ปีที่แล้ว +2

    When I saw Gravity Sort I was like "damn, that looks really cool"
    Then I saw In Place Radix LSD Sort, Base 16

  • @Slinx92OLD
    @Slinx92OLD 4 ปีที่แล้ว +5

    Radix MSD Sort Base 8 sounds like a sick beat

  • @squareme
    @squareme 4 ปีที่แล้ว +14

    From This I think I'll use bogo sort

    • @quinn7894
      @quinn7894 4 ปีที่แล้ว

      It would've taken nearly forever if done with more numbers...

    • @weeaboo869
      @weeaboo869 3 ปีที่แล้ว

      @@quinn7894 it doesn't matter how many numbers there are
      bogo is definitively the worst
      it just randomizes until sorted

    • @eksno
      @eksno 3 ปีที่แล้ว

      r/woosh

    • @The360MlgNoscoper
      @The360MlgNoscoper 3 ปีที่แล้ว

      @@weeaboo869 worstsort is worse

  • @mocaothi7383
    @mocaothi7383 2 ปีที่แล้ว

    This input: Skip my sorted elements
    Heap sorts & Bogo sorts: No you

  • @0RatedChess
    @0RatedChess 3 ปีที่แล้ว +1

    Stooge Sort: Let’s party and go anywhere but the workplace.
    Bogo Sort: Aah! I know where it belongs! Now where do I put it?

  • @itryen7632
    @itryen7632 4 ปีที่แล้ว +7

    HOLY SHIT BOGO SORT ACTUALLY DID IT
    WE ARE SO PROUD

  • @clonefighter1996
    @clonefighter1996 3 ปีที่แล้ว +4

    3:11 Min heap is DEFINITELY not an option.

  • @maltee69
    @maltee69 2 ปีที่แล้ว

    Selection sort: nice

  • @CariagaXIII
    @CariagaXIII 4 ปีที่แล้ว +15

    i wish we have algorithms that detect if its reverse, partially sorted, noise

    • @Schnorzel1337
      @Schnorzel1337 4 ปีที่แล้ว +8

      We have, but it is simply better to start sorting immediately.

    • @ashtree129
      @ashtree129 4 ปีที่แล้ว +4

      Thats timsort

    • @aycc-nbh7289
      @aycc-nbh7289 3 ปีที่แล้ว

      A variant of quicksort that may have been seen in this video and is called introsort, does this. Ironically, quicksort performs at its worst when the array is almost or already sorted and the pivot choice is always a maximum or a minimum.
      What this variant does is it only runs for log n recursions on a particular array before it calls heapsort to sort the remaining elements. For example, if the array were sorted in reverse and the rightmost element was always the pivot, the array would be sorted with heapsort after log n iterations.

  • @nickfarmer2452
    @nickfarmer2452 5 ปีที่แล้ว +20

    Here's a suggestion for one of these videos: a list that is almost fully sorted except that there are half a dozen or so misplaced items on the end. Like you had a sorted list but then added some more items later without putting them in the right place to begin with.

    • @Musicombo
      @Musicombo  5 ปีที่แล้ว +9

      I hate to be rude, but that's basically what this video is.

    • @nickfarmer2452
      @nickfarmer2452 5 ปีที่แล้ว +2

      @@Musicombo
      Well, except the out of order items are scattered through the list at the start. I'm thinking more like "1 2 3 4 5 6 7 8 ... 2046 2047 2048 13 42 17"; as if the list had been sorted and then three more items were appended. I'm looking at the code but it's been yonks since I did any Java.

    • @Musicombo
      @Musicombo  5 ปีที่แล้ว +9

      @@nickfarmer2452 I mean, I see, but it would be similar in many ways to this video. I'll deliberate.

    • @foxvulpes8245
      @foxvulpes8245 4 ปีที่แล้ว +2

      @@Musicombo I suppose it would be a "worse case" scenario for the insert/select parts of the code? I mean you'd only be scrambling the end. I guess the question is "How does this sorting handle a partially sorted algorithm?" Then again.. that is what the sorts approach at the end.
      I think if you were able to overlay a time based graph of the "swaps/ms"(basically the time it takes to get one data point from its initial position to another) it would be cool to see the change in performance over time. Some of them feel like they slow down A LOT towards the end.
      BTW I should have watched these before commenting last LOL. I love the metrics.

  • @destrierofdark_
    @destrierofdark_ 4 ปีที่แล้ว +3

    Reverse bad sort's search direction and add a fence to sorted bounds and you have a stupid fast list flipper, most definitely.

  • @Hazel-xl8in
    @Hazel-xl8in 3 ปีที่แล้ว +3

    the bogo sort is the fastest if you’re very lucky

  • @MsZiomallo
    @MsZiomallo 4 ปีที่แล้ว +3

    7:13 DAT SPEED

  • @FM-lc6hp
    @FM-lc6hp 4 ปีที่แล้ว +2

    its my fav pigeonholes algorithm 7:13

  • @PaulMurrayCanberra
    @PaulMurrayCanberra 5 ปีที่แล้ว +35

    Dude - I have an idea for a sorting algorithm, is there an interface that I can code to and give you the code for it? It's a hybrid sort: SmoothShell. Shell sort, but each 'shell' is sorted using smoothsort. As shell sort progresses, the shells are kinda/sorta in a rough order from the coarser shells, so smooth sort ought o be able to deal with them well.

    • @Musicombo
      @Musicombo  5 ปีที่แล้ว +27

      Just write it out in Java and I'll see what I can do!

    • @thegallivantinggamers4904
      @thegallivantinggamers4904 4 ปีที่แล้ว

      Paul Murray Why don‘t you try something similar with Quicksort and Radix MSD?

    • @masonduarte8001
      @masonduarte8001 4 หลายเดือนก่อน

      If you need a name, I'd suggest quail sort. If you're asking why, just search up "quail bird call."

  • @JerusalemStrayCat
    @JerusalemStrayCat 4 ปีที่แล้ว +35

    "Bad Sort" wasn't all that bad this time around. It outdid a good number of the more common sorts.

    • @ukcroupier
      @ukcroupier 4 ปีที่แล้ว +25

      Bad sort did 256 numbers, some of the others were doing 2048

    • @indeepjable
      @indeepjable 4 ปีที่แล้ว +6

      Bogo Only Did 7 Comparisons And Nothing Else

    • @YourAverageSpelunker
      @YourAverageSpelunker 3 ปีที่แล้ว +1

      @@indeepjable bogo only did 8 numbers

    • @indeepjable
      @indeepjable 3 ปีที่แล้ว

      *Put It On Max*

  • @noticeme6412
    @noticeme6412 3 ปีที่แล้ว +1

    radix sorts: I DONT CARE IF IT IS ALMOST SORTED, MOVE ALL OF THEM!

  • @adam_barfi5376
    @adam_barfi5376 2 ปีที่แล้ว

    "*you sure its stable bro?*"
    "*yeah dont worry*"

  • @boxthememeguy
    @boxthememeguy 2 ปีที่แล้ว

    at least the gnome sorts knew what they were doing and didn't freak out like stable quicksort

  • @Mars-zr2zn
    @Mars-zr2zn 2 ปีที่แล้ว

    2:48 is so satisfying

  • @themaxplay3270
    @themaxplay3270 ปีที่แล้ว

    time: i'm the most useless sort!
    gravity:...

  • @cube2fox
    @cube2fox 4 ปีที่แล้ว +1

    Is there a benchmark for algorithms which are very quick in approximately sorting random numbers? Where "approximately" means that after sorting, each element is "close to" its optimal location. For some tasks approximate sorting should be enough. Maybe such an algorithm could be faster than one which sorts perfectly. (Comb sort indeed has such approximate results as intermediate results, but it is not very fast.)

  • @lamenwatch1877
    @lamenwatch1877 2 ปีที่แล้ว +1

    10:24
    This entire sort just looks like screenshots of a sorting algorithm fading from one to the next.
    13:54
    This entire sort was painful to watch.

  • @no_name3823
    @no_name3823 2 ปีที่แล้ว +1

    god i fucking love bogo soRt

  • @dylansp4049
    @dylansp4049 4 ปีที่แล้ว +2

    When bad sort actually does good

  • @cast_e899
    @cast_e899 2 ปีที่แล้ว

    base 16 was wild

  • @nunthenihtara608
    @nunthenihtara608 2 ปีที่แล้ว

    Pancake sort: R E V E R S E A R R A Y

  • @arkosammy12
    @arkosammy12 3 ปีที่แล้ว +1

    I just wanna know how does the In-place Radix LSD sort base 16 works. I wish I could know how all of these sorting algorithms work.
    And even worse, why do some of the most complex ones dont even compare or swap at all. How do they figure out where goes where?

    • @Musicombo
      @Musicombo  3 ปีที่แล้ว

      The channel Discord is buzzing with people who would love to teach you how sorting works!!

  • @NCG337
    @NCG337 4 ปีที่แล้ว +6

    We're all here for LSD Base 16 sort and we know it.

    • @lategamer6684
      @lategamer6684 4 ปีที่แล้ว +2

      I came here for pigeon hole sort

    • @kharris3352
      @kharris3352 4 ปีที่แล้ว +1

      I’m a sucker for gravity sort

    • @forktographer861
      @forktographer861 4 ปีที่แล้ว

      Looking for the iterative merge kind of stuff

  • @joda7697
    @joda7697 ปีที่แล้ว

    Have i mentioned how much i fucking love quick-sort and comb-sort? Both for the aesthetic, tho quick-sort gets extra points for being efficient as fuck.

  • @thigas1_
    @thigas1_ ปีที่แล้ว

    2:47 i was flabbergasted

  • @user-hi7pl9jk3g
    @user-hi7pl9jk3g 4 ปีที่แล้ว +4

    With any of these sorting vids, i’m always confused about the time like some sorts seems slower than others but the Estimated real time is way faster what is this?

    • @ShadowsLetsPlays37
      @ShadowsLetsPlays37 4 ปีที่แล้ว +8

      The delay varies to allow us to see what the algorithm is doing, you can see the delay between steps above the estimated real time.

    • @user-hi7pl9jk3g
      @user-hi7pl9jk3g 4 ปีที่แล้ว +1

      TehSoulja yeah okay that makes perfect sense

    • @francescodelellis8932
      @francescodelellis8932 2 ปีที่แล้ว

      It's because the algorithms can't be all shown with the same scale of speed

  • @lifeloveandfood2058
    @lifeloveandfood2058 11 หลายเดือนก่อน

    0:00 Run All: Done

  • @Disgustedorite
    @Disgustedorite 4 ปีที่แล้ว +1

    Sorting algorithms visualized except it's in real time

  • @MySisterIsASlytherin
    @MySisterIsASlytherin 3 ปีที่แล้ว +2

    Pancake sort... buddy... what are you doing?
    Edit: just got to silly sort... half a billion comparisons for 256 numbers???

  • @juiuice
    @juiuice 5 ปีที่แล้ว +10

    yes more sorting :Y

    • @FluffyVu
      @FluffyVu 4 ปีที่แล้ว

      Juice gg on first

  • @ZyphLegend
    @ZyphLegend 4 ปีที่แล้ว +2

    what on earth does time sort do?

  • @Hambrack
    @Hambrack 3 ปีที่แล้ว +1

    Radix base 10 walked so Radix base 16 could run

  • @ngzushen4833
    @ngzushen4833 2 ปีที่แล้ว +1

    2:38
    Plays bumblebee instead

  • @timo.eppler
    @timo.eppler 4 ปีที่แล้ว +1

    What are those sorting algorythms used for?

    • @TheVergile
      @TheVergile 4 ปีที่แล้ว +4

      certain types of modern electronic music

    • @timo.eppler
      @timo.eppler 4 ปีที่แล้ว

      @@TheVergile for real? for electronic music? because before i get a r/woooosh from anybody, i really don't know this.

    • @TheVergile
      @TheVergile 4 ปีที่แล้ว +8

      @@timo.eppler nah, thats a joke.
      as the name says they sort data. they basically take in a list of unsorted data points and try to produce a list of ordered data points. its not a complicated task, but depending on the type of data and hardware you have different approaches result in very different performance.
      hence there is a ton of different sorting methods for different applications.

    • @gabrielandy9272
      @gabrielandy9272 4 ปีที่แล้ว +5

      even the windows "organize file by "Time/data/name" use some sort algorythm of those, they all can sort the files only difference is performance/time, some are just used for programming lessons to teach how to bad code something tho like bogosort.

    • @niccy266
      @niccy266 4 ปีที่แล้ว

      @@timo.eppler check out bitonic beats it's lit

  • @kartonrealista
    @kartonrealista 2 ปีที่แล้ว

    How is patience sort worse than pure merge? It should be faster since there would be larger piles due to the list being already almost sorted

  • @derpboi3155
    @derpboi3155 2 ปีที่แล้ว +1

    The fastest sort remains pigeon hole sort and I don’t know why. Could someone tell me why?

  • @duke86fan
    @duke86fan 3 ปีที่แล้ว +1

    the equivalent of using quantum mechanics to answer 2+2

  • @ImJustABacon69420hahafuni
    @ImJustABacon69420hahafuni 3 ปีที่แล้ว +1

    Gaming in the Future:

  • @SRMkay
    @SRMkay 3 ปีที่แล้ว

    Radix LSD sort be like "Ah yes, this array seems mostly sorted. Time to ruin it"

  • @ts4gv
    @ts4gv 2 ปีที่แล้ว

    LSD sorts start at 7:18

  • @nin10dorox
    @nin10dorox 4 ปีที่แล้ว +1

    So bad sort is better than merge sort?

    • @ReaSeBy
      @ReaSeBy 4 ปีที่แล้ว +5

      nin10dorox bad sort had less numbers to sort

    • @nathangamble125
      @nathangamble125 4 ปีที่แล้ว

      @@ReaSeBy Still, "bad sort" is a lot less bad than the other non-serious sorting algorithms, and fairly close to some of the serious ones.

  • @shoeskode136
    @shoeskode136 2 ปีที่แล้ว

    What are the purpose of shorts tho ?

  • @fortnemgamn8473
    @fortnemgamn8473 2 ปีที่แล้ว

    Gnomed

  • @joaorodrigues1477
    @joaorodrigues1477 4 ปีที่แล้ว

    when a quarter of the vid is pancake sort

  • @Tondadrd
    @Tondadrd 4 ปีที่แล้ว +3

    Ruler sort:
    I take a ruler, make the diagonal and whistle. It is pretty slow, Estimated Real Time: 5 000 ms

  • @cathedralsedm
    @cathedralsedm 3 ปีที่แล้ว

    Why am I watching algorithm videos at 2:00 AM help me

  • @Ambipie
    @Ambipie 2 ปีที่แล้ว

    Why does gravity take so long

  • @fortnemgamn8473
    @fortnemgamn8473 2 ปีที่แล้ว

    Gnomes sort

  • @IBeforeAExceptAfterK
    @IBeforeAExceptAfterK 2 ปีที่แล้ว

    I feel like comb sort is the least satisfying sorting algorithm to watch. It doesn't even have the "he's trying his best" appeal of bogo sort. It's just unsatisfying.

  • @TransistorizedCharlie
    @TransistorizedCharlie 6 หลายเดือนก่อน

    9:18 how did timesort manage to take 8 seconds just for 2048 writes to the array!?

  • @kinematic_InMotion
    @kinematic_InMotion 3 ปีที่แล้ว

    Still waiting for the beat drop

  • @flamingpi2245
    @flamingpi2245 3 ปีที่แล้ว +1

    What is this
    What is the point of this
    Why am I still watching it

  • @smellthel
    @smellthel 3 ปีที่แล้ว +1

    17:08 what am i watching

  • @geoffahunt
    @geoffahunt 2 ปีที่แล้ว

    Bogo sort: Nearly sorted? Wdym?

  • @makemaggaraaagd6820
    @makemaggaraaagd6820 4 ปีที่แล้ว +1

    0.55 like grass

  • @user-kw7ys4yd5n
    @user-kw7ys4yd5n 4 ปีที่แล้ว +3

    Smooth sort and Tim sort are good for almost sorted data right? I guess it

    • @Musicombo
      @Musicombo  4 ปีที่แล้ว +2

      Yes, correct, but in my opinion, TimSort is a much better choice.

    • @Neuroszima
      @Neuroszima 4 ปีที่แล้ว

      Bad sort very good 7 ms XD totaly unsorted data it takes eternity to sort with that

    • @db7erry
      @db7erry 3 ปีที่แล้ว

      @@Musicombo How can you defend that statement? The question was about ALMOST SORTED data. Smooth sort has been know for decades to be the best for ALMOST SORTED data. From your own video Smooth sort is FIVE times faster than TimSort on ALMOST SORTED data. TimSort is a better choice if you do not know in advance that the data are ALMOST SORTED, as it figures that out and adjusts. But if you already know ahead of time, Tim sort cannot compete at all with Smooth sort. So with ALMOST SORTED data TimSort is NOT a better choice... it's a dumb choice.

    • @Musicombo
      @Musicombo  3 ปีที่แล้ว +1

      ...Excuse me? I would appreciate it if you would talk to me without slinging around insults.
      Smoothsort is constantly slower than Timsort on average. It's less cache-friendly and much more complex. So no, Timsort is *not* a dumb choice... It's the smarter choice.

    • @db7erry
      @db7erry 3 ปีที่แล้ว

      @@Musicombo And yet your video proves otherwise.

  • @Jazzerizer
    @Jazzerizer ปีที่แล้ว

    GUYS BOGO SORT DID IT FIRST TRY
    25:40

  • @smlel8293
    @smlel8293 3 ปีที่แล้ว

    thanks youtube

  • @weirdojo2392
    @weirdojo2392 ปีที่แล้ว

    Aw poor max heap sort 2:48