8 Sorting Algorithms in Minecraft

Поделиться
HTML-код
  • Опубликовано: 27 сен 2024
  • Sorting visualizer in Minecraft.
    Inspired by:
    "15 Sorting Algorithms in 6 Minutes" by Timo Bingmann
    • 15 Sorting Algorithms ...
    GitHub:
    github.com/The...
    A web-based sorting algorithm visualizer I made:
    heledron.com/m...
    All my links:
    heledron.com/l...
    Sources:
    "Insertion Sort" on Wikipedia.
    en.wikipedia.o...
    "Selection Sort" on Wikipedia.
    en.wikipedia.o...
    "Merge Sort" on Wikipedia. (Bottom Up and Top Down)
    en.wikipedia.o...
    "Heapsort" on Wikipedia.
    en.wikipedia.o...
    "Quicksort" on Wikipedia.
    en.wikipedia.o...
    "Shellsort” on Wikipedia.
    en.wikipedia.o...
    "Bubble Sort" on Wikipedia.
    en.wikipedia.o...

Комментарии • 642

  • @nw3473
    @nw3473 2 года назад +3032

    I love how it has the beeping to go along with it

    • @manutavano
      @manutavano 2 года назад +92

      @Jul W not really. not at all actually

    • @Caleb-fv5fp
      @Caleb-fv5fp 2 года назад +1

      @Liam Tran yes

    • @Caleb-fv5fp
      @Caleb-fv5fp 2 года назад +1

      @@manutavano what are you talking about? What is the beeping then?

    • @manutavano
      @manutavano 2 года назад +39

      @@Caleb-fv5fp the beeping is just an extra effect to make the video cooler. This is showcasing different sorting algorithms (different ways to sort a set of numbers) implemented in Minecraft. Basically the beep goes off whenever you're making comparisons, but the point of the video really are the little vertical bars getting switched around until they form a steady slope (each bar represents a number, the smaller ones are smaller numbers and the bigger ones are bigger)

    • @Caleb-fv5fp
      @Caleb-fv5fp 2 года назад +2

      @@manutavano exactly

  • @69k_gold
    @69k_gold 2 года назад +5172

    In a magical universe where selection sort is the fastest algorithm

    • @average792
      @average792 2 года назад +105

      Well i think pigeonhole sort is the fastest

    • @cope9489
      @cope9489 2 года назад +427

      Bogosort: hold my beer

    • @MrWite1
      @MrWite1 2 года назад +281

      @@cope9489 quantum bogosort: hold my beer

    • @lucasanddre
      @lucasanddre 2 года назад +90

      If you have information about your input that it is almost ordered, selection sort can be faster than quicksort for example.

    • @69k_gold
      @69k_gold 2 года назад +40

      @@lucasanddre Yeah I've actually read about this method used in scoreboard calculations. Although it's a very specific scenario

  • @MA-naconitor
    @MA-naconitor 2 года назад +965

    Notch: I’m gonna make a block-based environmental survival game
    Sorting algorithm: PEW PEW PEW PEW

    • @xtYLT2IY8
      @xtYLT2IY8 2 года назад

      who asked though...

    • @danielyuan9862
      @danielyuan9862 2 года назад

      @@xtYLT2IY8 who asked for your opinion anyway

    • @lightning_11
      @lightning_11 2 года назад +39

      @@xtYLT2IY8 Life is about being glad they answered without you having to ask...

    • @ناصرالحربي-د5ظ
      @ناصرالحربي-د5ظ Год назад +12

      @@xtYLT2IY8 is asking required?

    • @um_idkw
      @um_idkw Год назад +3

      ​@Impunity i don't like people who are in 4th grade. They are very not nice.

  • @MaxNovOfficial
    @MaxNovOfficial Год назад +619

    This is something that could be released in 2012 and gotten like 10 million views for how iconic/memorable it would've been

    • @celaldogangunes
      @celaldogangunes 10 месяцев назад +14

      Wait for 2030, dude.

    • @fffmcfff9112
      @fffmcfff9112 3 месяца назад +2

      looks like it's doing just fine on the views

    • @MaxNovOfficial
      @MaxNovOfficial 3 месяца назад +2

      ​@@fffmcfff9112 but like all of the old videos somehow get recommended 15 years later and they get millions of views

  • @Mnnvint
    @Mnnvint 2 года назад +891

    Very cute that you used a shell for shell sort, but that made me expect bucket sort for the bucket! Bubble sort is more of a magma block thing ;)

    • @consume_arsenic
      @consume_arsenic 2 года назад +7

      Or a glass block

    • @maxtheawesome4255
      @maxtheawesome4255 2 года назад +6

      @max Google it, you've had 23 minuites already. Also, hi me.

    • @kaziro
      @kaziro 2 года назад +4

      bubble coral

    • @lightning_11
      @lightning_11 2 года назад +3

      @@consume_arsenic What?

    • @paper177
      @paper177 Год назад +5

      cyan stained glass block

  • @TheLemon420
    @TheLemon420 2 года назад +26

    1:15 I was not ready

  • @Sush._.
    @Sush._. 2 года назад +116

    "What kind of music do you like?"
    Me: "It's complicated"

  • @smaybius
    @smaybius 2 года назад +182

    I wonder why quicksort on most visualizers I see uses only specifically the Lomuto partition. Geeks4Geeks probably also only uses Lomuto partitions.

    • @hikari1690
      @hikari1690 2 года назад +13

      Probly cause it comes up top in google or something

    • @apersoniguess_
      @apersoniguess_ 2 года назад +1

      what

  • @Alberos
    @Alberos 2 года назад +102

    Oh no! you forgot the whooooooopp sound lol

  • @shortcutDJ
    @shortcutDJ 2 года назад +126

    Some of them are very musical, they have almost an arpeggio sound to them, the last one is more like a chord. i also learned about shell sort which is pretty nifty

  • @heledron
    @heledron  2 года назад +1525

    Few notes:
    1. Some algorithms use auxiliary storage, which is not rendered. (Yellow animation)
    2. I didn't animate read instructions, so this isn't a good visualization of efficiency.
    3. There are much better algorithms for shuffling arrays. (Fisher-Yates shuffle)
    I fixed all these issues in the web app. I’ll probably redo this video in the future.
    Edit: Here's a revised video!
    ruclips.net/video/Lvd03mSjYZ0/видео.html

    • @Manny73211
      @Manny73211 2 года назад +4

      the bubble sort was the most interesting.

    • @Manny73211
      @Manny73211 2 года назад +7

      ✂️ selection sort - the usual one you see with those algorithms with the little beeps that non programmers think are cool
      ↔️insertion sort - seems a bit unusual, and I didn't really look back at it for too long. I wasn't paying much attention, but I've noticed that it wasn't very quick, and I wonder why.
      👞 quick sort - not much to say, it's very quick
      🐚 shell sort - I don't really get what's going on here, but I think it might be taking a random unfinished part and degrading it by a bit to what it's supposed to be. if this is correct, I could see this being used on systems with low memory
      ⬇️ TD merge sort - again not much to say, I find it an interesting approach.
      ⬆️ BU merge sort - it's probably my second favorite (bubble first of course) and I find it to be an amazing (visually, not practically) subset of the merge sort
      ◼️ heap sort - now why are you trying to look cool like merge sort?
      💧bubble sort - an interesting, yet slow algorithm to show to your friends, I wouldn't recommend using this in a program for any reason other than to look cool

    • @isaacstetson5720
      @isaacstetson5720 2 года назад

      Ayyyy

    • @king_james_official
      @king_james_official 2 года назад +6

      honestly as a programmer i like quick sort the most. i feel like anyone from my field will understand haha

    • @king_james_official
      @king_james_official 2 года назад +1

      also, the fisher-yates shuffle is literally like 5 lines of code (i used javascript and i'm not willing to touch javat so i donmt know how would it look in your situation)

  • @GGBeyond
    @GGBeyond 2 года назад +31

    Bubble sort is trying its best.

    • @LeBeaBae
      @LeBeaBae 11 месяцев назад +1

      sounds Zelda like

  • @alexandrutirtiu8084
    @alexandrutirtiu8084 2 года назад +24

    The last one sounds like it is saying "Move it" - 3:23

  • @bazingatheskialuser3519
    @bazingatheskialuser3519 2 года назад +89

    i bet bogo sort _could_ do it all instantly
    _could_

    • @AnEnderNon
      @AnEnderNon 2 года назад +11

      bogo quantum sort

  • @CowbellStudioss
    @CowbellStudioss 2 года назад +30

    anyone else have absolutely no idea what is happening, yet still find it cool?

    • @lifinale
      @lifinale 2 года назад +1

      No

    • @DaSquyd
      @DaSquyd 2 года назад +1

      It's... sorting them.

  • @Klabbity_Kloots
    @Klabbity_Kloots 7 месяцев назад +2

    For some odd reason, the sound of the insertion sort (0:14) reminds me of that one _Pokémon_ scene where a quagsire reunites with the rest of his kind and they all go "Quaaaaaaag!" "Quaaaaaaag!" "Quaaaaaaag!".

  • @beim8247
    @beim8247 2 года назад +23

    insertion sort looks like optimized gnome sort
    gnome sort swaps a select element backward until it finds the right spot
    insertion sort checks each element backwards from a select element until it finds the right spot

    • @WavyCats
      @WavyCats 2 года назад +4

      Everything is an optimized gnome sort

    • @rubykanima
      @rubykanima 2 года назад

      it IS the optimised gnome sort. Coded a gnome sort accidentaly while programming ;D

    • @beim8247
      @beim8247 2 года назад

      @@rubykanima same lmao

  • @tommasomaruffi1306
    @tommasomaruffi1306 2 года назад +82

    I don't know you, but this video is very useful to easily understand how these algorithms work compared to the other ones I've seen

    • @paper177
      @paper177 Год назад +12

      othr = hadr‼️‼️😡😡
      micraf = esy 😃😃😎😎😱😱🤯🤯

    • @karter_devolidad
      @karter_devolidad 8 месяцев назад

      It's literally the exact same as any other sorting algorithm video 😂

  • @twiddle10000
    @twiddle10000 2 года назад +5

    Even Minecraft shows how hilariously inefficient Bubble Sort is.

  • @LiamClowMusic
    @LiamClowMusic 2 года назад +19

    This is an amazing video. Loved it

  • @motzacarosh8060
    @motzacarosh8060 2 года назад +4

    2:50
    chase scene in horror video games

  • @3.D.L
    @3.D.L Год назад +11

    2:08 WE MAKIN IT OUTTA THE MATHS CLASS WITH THIS ONE 🔥🔥🔥🔥🗣🗣🗣🗣🔊🔊

  • @ModestNeophyte
    @ModestNeophyte 8 месяцев назад +1

    i don't know why this is so audibly satisfying.. I would not say it sounds "good" but.. i get this odd nice feeling from hearing it even though i hate dissonance. maybe its the ascension on the final check on each round? idk

  • @priusup
    @priusup 16 дней назад

    I'm impressed that it even reproduces the sound.

  • @nibirus1096
    @nibirus1096 2 месяца назад

    Every time he clicks "shuffle" I get the impression that I've watched a sketch or listened to a piece of a show, then the show's splash screen (shuffle) appears and the next show appears (the next sorting method)

  • @TheCrack_0124
    @TheCrack_0124 2 года назад +2

    me see other sorting algorithms: it is so slow, must be bubble sort.
    me realize that I am wrong all the time and see the last item is water bucket: it must be the famous bucket sort.
    The water bucket: sike.

  • @Sydneymotor2
    @Sydneymotor2 2 года назад +1

    Bubble sort sounds like there is something chasing you in a horror game.

  • @stacklysm
    @stacklysm 2 года назад +6

    Nice video! Would also have been interesting to see Radix Sort

    • @Mnnvint
      @Mnnvint 2 года назад +3

      the object for that would have to be block.hanging_roots

  • @------------------------..__
    @------------------------..__ 2 года назад +1

    Heap and bubble sort: *horror movie soundtrack*

  • @draguladriver
    @draguladriver 2 года назад +6

    i love that you used noteblocks for the sounds!

  • @SimonsAstronomy
    @SimonsAstronomy Год назад +2

    The sound is the best on these things

  • @kellisuzuki8889
    @kellisuzuki8889 2 года назад +1

    merge and quick sort were the most satisfying

  • @lancestryker
    @lancestryker 11 месяцев назад

    2:27 Heap sorting sounds like you're giving a Kubrick Stare as you realize that your life is going downhill past the point of no return.

  • @nicholasmann1832
    @nicholasmann1832 8 месяцев назад

    i haven't the remotest idea what just happened but every literal second of that tickled my brain, sincere thanks.

  • @eliteeinheit0530
    @eliteeinheit0530 8 месяцев назад +2

    Only real ones know that bogo sort is the fastest

  • @jonnytb212
    @jonnytb212 2 года назад

    Closed captions: hmm do [Music] [applause] [Music] [applause] [Music]

  • @SprinchelArt
    @SprinchelArt 2 года назад +1

    The heap sort sounds like something you'd hear in the back rooms

  • @nathanbrisson4905
    @nathanbrisson4905 2 года назад +1

    number of block commands behind: infinity

  • @Bol93E
    @Bol93E 4 месяца назад +1

    0:37 sounded like something from omori

  • @x4exr
    @x4exr 3 месяца назад +1

    1:45 algorithm sounds like xQc saying hey chat, like chat like WHAAAAAAt like chat like WHAAAAAAt like yk what im like WHAAAAAATTTTT like omg like WHAAAAAAT

  • @erionncs
    @erionncs 2 года назад

    Its 3 AM and I'm sitting here watching Minecraft sorting algorithms...

  • @wrevelmusic
    @wrevelmusic 2 года назад +4

    2:00 i went 💃🕺

  • @rubikonium9484
    @rubikonium9484 2 года назад +5

    0:49 E....D....C....

  • @D4N7H3M4N-d9q
    @D4N7H3M4N-d9q 11 месяцев назад +1

    ⚠️ Flashing lights/imagery/noises/Volume/Disturbing/Scary Content Warning! ⚠️

  • @insertnamehere9180
    @insertnamehere9180 2 года назад +7

    Idk whats more suprising, that this was made or that i know all the sorts and more...

  • @jacksonlaframboise6257
    @jacksonlaframboise6257 2 года назад

    Why did I start giggling at the shuffle sound, more and more as the video progressed.

    • @jacksonlaframboise6257
      @jacksonlaframboise6257 2 года назад

      Ah. I know. The contrast with the marimba….which still makes no sense. But, at least the “halfway through” part was solved. Now I just gotta figure out why it’s hilarious to me.

  • @NamiXSFR
    @NamiXSFR 2 года назад +1

    In my opinion, Heap Sort is the coolest

  • @GSFigure
    @GSFigure 11 месяцев назад

    Merge Sort gives me insane amounts of dopamine because of how consistent and clean it is.

  • @egnogg07
    @egnogg07 11 месяцев назад +1

    POV: Everywhere at the end of time after the 3rd album

  • @halfbaked8278
    @halfbaked8278 2 года назад

    I actually learned about sorting algorithms in school a week ago, well only bucket sort and bubble sort but it's still great to learn a little bit

  • @KainAndTheWildlandsOfficial
    @KainAndTheWildlandsOfficial Год назад

    Quicksort: I'm the fastest sort.
    Mergesort: hold my beer.

  • @Deathworm-eg5lt
    @Deathworm-eg5lt 2 года назад

    I have no idea wtf is going on this video, but it’s fun to watch

  • @SURok695
    @SURok695 2 года назад

    This video made me cry.
    I've never used bubble sorting since college but it's the only algorithm I don't forget and don't need to google it every time I need it >_

  • @Ramon314
    @Ramon314 2 года назад +6

    Is it just me or does the shuffling not seem random?

    • @danielyuan9862
      @danielyuan9862 11 месяцев назад +2

      It's not. A significant number of items have not moved.

  • @JulianGaming007
    @JulianGaming007 2 года назад +7

    This was really satisfying to watch

  • @richmanarg
    @richmanarg 2 года назад +1

    Welcome back to another episode of my youtube recommendation section.

  • @podlaskian
    @podlaskian 2 года назад

    funny beeps and lines make human happy

  • @riyamu7740
    @riyamu7740 11 месяцев назад

    Now sorting systems with pistons and actual noteblocks playing the sounds

  • @Intrafacial86
    @Intrafacial86 2 года назад +8

    I bet Radix LSD In-Place Base-10 sort starts sounding like 9001 suffocating Ghasts before ending with 9001 villagers hrrmming all at once.

  • @nononame26
    @nononame26 2 года назад

    This sounds like my brain when I'm trying to sleep.

  • @hollowknightenjoyer
    @hollowknightenjoyer 2 года назад +2

    The shuffle sort

  • @WTPawel
    @WTPawel 2 года назад +3

    Ah, unfortunately no bogo....
    But this video is still awesome!

  • @ManifestedMadness
    @ManifestedMadness 2 года назад +4

    You left out the best algorithm, BOGO sort :(

    • @NestAdmiral
      @NestAdmiral 2 года назад +1

      Shuffle button is bogo sort

    • @ManifestedMadness
      @ManifestedMadness 2 года назад

      @@NestAdmiral bogo should automatically loop until it is correct though

    • @NestAdmiral
      @NestAdmiral 2 года назад

      @@ManifestedMadness thing which it never does

  • @teinaka
    @teinaka 11 месяцев назад

    These sounds are so calming for some reason

  • @Crazylom
    @Crazylom 2 года назад

    Insertion be like:
    Yo, wanna hear some tunes?

  • @fatpancake52
    @fatpancake52 11 месяцев назад

    this will be the new "can it run doom"

  • @specialagentb4977
    @specialagentb4977 2 года назад +14

    Does this have any practical applications for actual datapacks or anything?

    • @WilcoVerhoef
      @WilcoVerhoef 2 года назад +2

      No

    • @templed2021
      @templed2021 2 года назад +2

      its just a sorting algorithm to sort numbers, etc this one is from least to greatest

    • @bnzzy_3104
      @bnzzy_3104 2 года назад +7

      its literally sorting, it does what it sounds like. if a datapack needed something to be sorted then yes it would be useful.

    • @ieatthighs
      @ieatthighs 2 года назад

      @beta male are you calling sorting algorithms useless?

    • @ieatthighs
      @ieatthighs 2 года назад

      @beta male that's a visualisation
      in minecraft
      for FUN. you know what this is?

  • @samcole5210
    @samcole5210 2 года назад

    this is peak of computer redstone science phd

  • @powerxcode5333
    @powerxcode5333 3 месяца назад

    Never knew that the first algorithm they teach you in school is the slowest. Also please do count sort.

  • @tobiaskoran6787
    @tobiaskoran6787 2 года назад

    Admit it, you just like flashy images, quirky sounds and the oddly satisfying feeling when it finishes

  • @strider_hiryu850
    @strider_hiryu850 2 года назад

    it's like one of them studied and did all the homework. and the rest don't even know what class they're in so they fake it 'till they make it.

  • @nitroninja1227
    @nitroninja1227 2 года назад

    The lack of bogosort is a crime.

  • @prashidash
    @prashidash 2 года назад

    It never got fully shuffled

  • @sc6the
    @sc6the 11 месяцев назад

    man i love the shuffle sorting algorithm

  • @helved807
    @helved807 11 месяцев назад

    I seem to realise the lack of bogo sort, the best and fastest sorting algorithm

  • @Frogg_ie
    @Frogg_ie Год назад +2

    2:36 sounds like a pikmin dying

  • @hrpang
    @hrpang 2 года назад +1

    What was noise?
    The sound of Sorting in Minecraft my friend.

  • @bobo096
    @bobo096 5 месяцев назад

    This feels like one of Felix Colgrave's animation soundtrack.

  • @nateharvey1300
    @nateharvey1300 11 месяцев назад

    All it’s missing is the final “bwooooOOOPP” as they finish, but this is really cool

  • @Edis7771
    @Edis7771 2 года назад +1

    this is my favorite minecraft video

  • @fierylightning3422
    @fierylightning3422 2 года назад +1

    Sad to see no bogo sort, but I think that would be pain

  • @phanton4305
    @phanton4305 2 года назад +2

    Ok so, I'm no expert in math, so what does sorting algorithms do? Does it help with something?

    • @heledron
      @heledron  2 года назад +2

      It sorts a list. In this case an array of numbers in ascending order.

    • @phanton4305
      @phanton4305 2 года назад

      @@heledron ah thanks

  • @thedragopolunga
    @thedragopolunga 2 года назад

    I hear the "shuffle" in my nightmares

  • @_-_-_-_-_-_-_-_-_-_-_-_-_-_
    @_-_-_-_-_-_-_-_-_-_-_-_-_-_ 2 года назад +5

    Ok now I want to see bogo sort

  • @thebeast5660
    @thebeast5660 6 месяцев назад

    Insertion sort sounds like drama

  • @SyncronedStuff
    @SyncronedStuff 11 месяцев назад

    Subtitles:
    *_[Music], [Applause], Do, hmm, so_*

  • @НагитПоехавший
    @НагитПоехавший 3 месяца назад

    Heap sort sound can be used in horror

  • @angee_p
    @angee_p 2 года назад +1

    When a gamer is a software engineer

  • @GooseIsShark
    @GooseIsShark 2 года назад

    We just not gonna talk about the few seconds of the bumblebees?
    But seriously, this is cool.

  • @Nicofisi
    @Nicofisi 2 года назад +1

    Love the idea but I was very dissatisfied every time by how little time you gave it to shuffle the columns, many of them didn't even get moved once :(

  • @tumultoustortellini
    @tumultoustortellini 2 года назад +3

    knockoff kanye beats be like 0:19

  • @joshmason1142
    @joshmason1142 Год назад +1

    My mind after watching this at 3am: 🥴🥸👺😴🤥💩💩

  • @elrien591
    @elrien591 2 года назад

    Me everytime he shuffles it:
    NOOO THE PERFECTLY GOOD STAIRLIKE SHAPE THING!!

  • @Foxy_5702
    @Foxy_5702 2 года назад

    3:25
    my 9 year old me playing the piano the 1st time:

  • @Bobbeh_
    @Bobbeh_ 2 года назад

    It do be sounding like a drone doe

  • @theawsomeglados8281
    @theawsomeglados8281 2 года назад

    to be honest the sound all of them makes reminds me of the way don't starve characters speak

  • @jadegreenleaf781
    @jadegreenleaf781 4 месяца назад

    For some reason this makes me think of a marvin the marsian episode

  • @benmartinez1267
    @benmartinez1267 2 года назад +1

    Love the video. I think for watching (at least on a phone) the sort names should be in a higher contrast font color

  • @DanielLennard.
    @DanielLennard. 11 месяцев назад

    the sounds of sorting can be used in a fucking arg

  • @hussainabbas1341
    @hussainabbas1341 2 года назад

    Thank you, I love the idea of implement it in Minecraft ❤️