Visualization of Quick sort (HD)

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 พ.ย. 2024

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

  • @ninthpayloader0465
    @ninthpayloader0465 6 ปีที่แล้ว +1468

    Bubble sort is so short sighted he didn’t even see that he lost

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

      He doesn’t have ears

    • @Muhammad-sx7wr
      @Muhammad-sx7wr 4 ปีที่แล้ว +36

      He might be deaf, he might be blind, but he sure as heck ain't dumb.

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

      pure gold comment 😂😂😂😂😂

    • @ChrisSparks-zp8ue
      @ChrisSparks-zp8ue 7 หลายเดือนก่อน

      I think if quick sorting loss they won’t know either

    • @Johnny_Franco-12_Scratch
      @Johnny_Franco-12_Scratch 4 หลายเดือนก่อน

      That’s… actually true.

  • @BioHzrd0010
    @BioHzrd0010 7 ปีที่แล้ว +207

    I like how after it announces that quick sort won, it just lets bubble sort slowly and pitifully complete its sort.

  • @razerage1
    @razerage1 7 ปีที่แล้ว +2872

    bubble sort be like "I hate my life"

    • @krzywy8873
      @krzywy8873 6 ปีที่แล้ว +14

      xD

    • @taiyihanle
      @taiyihanle 6 ปีที่แล้ว +53

      Bubble Sort be like "I'm doing my job! ^o^ you go here, you go there... and there you go!"

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

      Bruh this is me at me job watching everyone leave as i stay behind to close T_T

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

      And we hate bubble sort's life too...

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

      bogo: hand me the gun

  • @granceroblast
    @granceroblast 10 ปีที่แล้ว +1086

    This has to be the best educational video on sorting I have ever seen!

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

      I thought this too. It is amazing seeing how even when you code using comparisons (using if/for/switch) you could have the same output using a more developed algorithm much more quickly.

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

      Hungarian dance sorting is much better
      Check it out!

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

      9 years later we got better

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

      ​@@luisandre2750i dont understand what u say lmfao, yes computers use if and? That takes some time, its not literally instantanious, it never is, thats why you need optimization and that is what this sorting algorithm does

  • @ImmacHn
    @ImmacHn 11 ปีที่แล้ว +403

    Bubble sort will always have a special place in my heart :')

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

      When u necropost BP

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

      @@smortboi2374 nani?

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

      @@ImmacHn you're a man

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

      me too

  • @ziskador
    @ziskador 9 ปีที่แล้ว +2195

    omg i felt so sorry for bubble sort robot at the end :(

    • @marquizzo
      @marquizzo 8 ปีที่แล้ว +155

      +ziska dor Lights are out, everybody's cleared out of their seats and gone home. The janitor is about to ask him to hurry up so he can clean the floor.

    • @ziskador
      @ziskador 8 ปีที่แล้ว +30

      +marquizzo so sad :(

    • @ProducShuns
      @ProducShuns 8 ปีที่แล้ว +69

      +marquizzo He says nothing. Keeps on sorting. Janitor mops around him.
      Doors open the next day. The celebration finally sounds as he clicks in his last comparison.

    • @frtard
      @frtard 8 ปีที่แล้ว +41

      I felt sorry for it the entire time. Just think about how many balls he had so close to his face...

    • @Luffi98
      @Luffi98 7 ปีที่แล้ว +28

      imagin bogo sort robot :(

  • @hendroyohanes4295
    @hendroyohanes4295 6 ปีที่แล้ว +773

    The moral here is to never give up even when you lose

    • @reda29100
      @reda29100 5 ปีที่แล้ว +19

      But you never lose if the match never ends!

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

      The bubble Sort Robot still came to a final Solution even if it took years :) its becauz he didnt gave up

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

      Trump

    • @uwu.-.5873
      @uwu.-.5873 2 ปีที่แล้ว +3

      Bubble sort is me 😔

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

      the moral here is that bubble sort fucking sucks lmao

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

    I like that quicksort isn’t annoying bubble sort and letting him just do his thing. Such a nice guy

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

    bubble sort: what is my purpose?
    me: to sort in O(n^2)
    bubble sort: omg

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

      Yes

    • @Muhammad-sx7wr
      @Muhammad-sx7wr 4 ปีที่แล้ว

      Bubble sort be like, "I thought bigger was always better."

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

      Insertion sort intensifies

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

      I thought bubble sort would do 10^2 comparisons

    • @bitonic589
      @bitonic589 3 หลายเดือนก่อน

      ​@@slowmotion2300Bro thought bubble sort had constant complexity 💀💀💀

  • @TomTom-gy7ov
    @TomTom-gy7ov 8 ปีที่แล้ว +1997

    Legend has it that the bubble sort robot is still sorting

    • @DirkIronside
      @DirkIronside 7 ปีที่แล้ว +89

      Now imagine if it was a Bogosort robot!

    • @Anohaxer
      @Anohaxer 7 ปีที่แล้ว +9

      ORST
      is the alphabetically sorthed correct order

    • @Anohaxer
      @Anohaxer 7 ปีที่แล้ว +8

      By going: Quick Sort
      Pivot: R
      S>R = S to the right (Memory) | [S]O T
      T>R = T to The right | [S]O T
      S

    • @paulcasanova1909
      @paulcasanova1909 7 ปีที่แล้ว

      Tom Tom That would be the Bogo sort bro

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

      Lets just do merger sort then
      SORT = 19-15-18-20
      [19][15][18][20]
      19>15
      [15-19][18][20]
      18

  • @realeques
    @realeques 10 ปีที่แล้ว +129

    so awesome , we spent 45 minutes in college for what we could have learned through this video

    • @Muhammad-sx7wr
      @Muhammad-sx7wr 4 ปีที่แล้ว +5

      Interestingly I discovered bubble sort without being taught it. Only later finding out what it was called.

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

      @@Muhammad-sx7wr most people could come up with bubble sort, insertion sort, or selection sort on their own

    • @Muhammad-sx7wr
      @Muhammad-sx7wr 3 ปีที่แล้ว +2

      @@MikehMike01
      Things just seemed a bit harder in the 90s and Google was not as reliable. I know however that most people can make these discoveries on their own. I'm just reminiscing with these people how great it felt and yet how far from the mark we were.

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

      @@MikehMike01and to discover things like quicksort or heapsort only through intuition it would require to be an astute mathematician I think.

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

      @@Muhammad-sx7wr those three are the O(n²) algorithms which aren’t very good but are easily understood

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

    this is the cutest video i have ever seen in my entire life, after watching so many boring videos trying to explain quick sort, this is a very welcomed treat

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

    Making computers look cute while also teaching a great concept in a lot of web development? Win-win!
    Also, noting how the computers are short-sighted is a very good way of describing how computers actually do operations.

  • @Pigeoncraft
    @Pigeoncraft 10 ปีที่แล้ว +419

    What about a bogo sort :P

    • @derekmallory985
      @derekmallory985 9 ปีที่แล้ว +87

      *****
      ... or the next level : 3
      "Bogobogosort
      is an algorithm that was designed not to succeed before the heat death of the universe on any sizable list. It works by implementing the bogosort on the first two elements in the list. If they are in order, then it bogosorts the first three elements, and so on, increasing by one until the entire list is sorted. Should the list not be in order at any point, the sort starts over with the first two elements."

    • @v000000000000v
      @v000000000000v 9 ปีที่แล้ว +21

      Derek Mallory there's always a chance that it will sucessfully sort tho!!

    • @ScipiPurr
      @ScipiPurr 8 ปีที่แล้ว +18

      Don't forget the king of all inefficient sorts: Worstsort.

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

      yeah? well in a comment above im trying to bogo sort the word "sort" alphabetically. I do it in batches of 10, random data gotten from www.superkids.com/aweb/tools/words/scramble/ and now going to my 4th batch

    • @Anohaxer
      @Anohaxer 7 ปีที่แล้ว +1

      th-cam.com/video/aXXWXz5rF64/w-d-xo.html&lc=z12xy3dixtf2tn5cg223yfyzxkqdztugn04.1498860895564993
      BOGO SORT BRIEF EXPLANATION AND 49-TRY EXAMPLE WITH 4 INTEGER (CHARACTER) VALUES

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

    Thanks! Currently I'm busy with two other videos (coming up soon), but I appreciate the interest in more sorting videos. I hope to get around to it soon.

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

    I never knew how Quick Sort managed to have confidence in it's placement without going to the ends first.
    That cleared it up really easily.

  • @kenji4861
    @kenji4861 8 ปีที่แล้ว +87

    Great video. Kids nowadays have so much good resource

  • @moogyboy6
    @moogyboy6 6 ปีที่แล้ว +16

    Those have got to be the cutest robots I've ever seen. Look at 'em sort!

  • @UntakenNick
    @UntakenNick 11 ปีที่แล้ว +106

    When I grow up I want to be a sorting robot..

    • @markhesse4510
      @markhesse4510 6 ปีที่แล้ว

      Quicksort or Bubblesort or Bogosort?

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

      How inspirational.

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

      Are you a grown up now? What are you doing now?

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

      @@devrafed he is sorting parcel in postoffice so he is not exactly the robot but some kind.

    • @Muhammad-sx7wr
      @Muhammad-sx7wr 4 ปีที่แล้ว +2

      You need to sort yourself out first.

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

    Someone has to do an edit of this video with the "The Rock stare" everytime the announcer say balls

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

    I am pleased at how accurate the video is. It didn't just count comparisons only, but moved the robots according to performed actions (cycles as it were).

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

    Dude I mean why or how, this videos are so old and they are so cool, the quality is genuinely amazing, I love your videos and the educational content they bring, make more!

  • @galzigler
    @galzigler 7 ปีที่แล้ว +88

    You should make a visualization for all existing sorting algorithm. Your videos are really helpful, and the best that could be find online to explain how the sorts work.

    • @traso56
      @traso56 6 ปีที่แล้ว

      different but there you go th-cam.com/video/kPRA0W1kECg/w-d-xo.html

    • @solomonprenevost4699
      @solomonprenevost4699 5 ปีที่แล้ว

      Gravity sort

    • @anonymoususer9837
      @anonymoususer9837 5 ปีที่แล้ว +1

      First off, curse you for having a right-to-left-language username, because replying to those screws up your left-to-right typing if you include it. Second, there are way too many sorting algorithms to explain. Many of them are hybrids (like Timsort), many don't work on these colored balls (like Radix Sort), and many are esoteric (not intended to be actually useful, like Bogosort and Slowsort). That and some of them are just *weird* (like Gravity Sort).

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

    TH-cam in 2012: Oh, look at him, he is learning algorithms! I should recommend it to him some time later.
    TH-cam in 2020: eah! This just the right time!

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

    I want to hug bubble robot, he deserves it.

  • @nki111-pa
    @nki111-pa ปีที่แล้ว +1

    Props to bubble sort for never giving up. A true inspiration!

  • @thowaway24767
    @thowaway24767 9 ปีที่แล้ว +167

    Why don't you give the robot glasses?😊

    • @TheTurtle-ui4ou
      @TheTurtle-ui4ou 7 ปีที่แล้ว +14

      Well, it wouldn't have vision problems anymore, now would it?

    • @winandfx
      @winandfx 7 ปีที่แล้ว +40

      Yeah, Glasses Bubble Sort is the fastest. Scientists should invent it.

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

      I see what you did there...

    • @youtubeismycity
      @youtubeismycity 5 ปีที่แล้ว

      @@miksuko omg

    • @MinecraftLD10
      @MinecraftLD10 5 ปีที่แล้ว

      jeffrey Presley Well who designed their vision sensors so near sighted in the first place?
      *If your into robotics at all, you’ll get this.*

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

    "this robot is short-sighted and can only compare balls when they're right in front of its' eyes"

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

    This is the only video that explained quick sort in a way I can understand

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

    This is the best educational video I've ever seen. I think using numbers in place of the balls could make the whole process more clear, for in the competition it is difficult to follow what is going on.

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

    i got distracted when i heard "balls"

  • @confused6526
    @confused6526 8 ปีที่แล้ว +168

    udipod,
    I just accidentally ran into your video. They're all great.
    You don't mind telling me what tool/software your used to create the animation? Or your write it yourself?
    Thanks
    John N.

    • @udiprod
      @udiprod  8 ปีที่แล้ว +107

      +confused Thanks :) I'm using a tool called Autodesk Maya. It's very powerful but not easy to learn.

    • @confused6526
      @confused6526 8 ปีที่แล้ว +50

      +udiprod !
      Thanks a lot for the info.
      You're done a great job of explaining computer/physics concepts. Keep up with good works. Can't wait to see more of your videos.
      Have a nice day!
      John N.

    • @zork34
      @zork34 6 ปีที่แล้ว +41

      you don't have to write comments like letters

    • @SiddharthJogi
      @SiddharthJogi 6 ปีที่แล้ว

      @@zork34 😂😂lmao right

    • @uknownada
      @uknownada 5 ปีที่แล้ว +16

      @@zork34 Although it's probably the easiest way to get a reply from a channel like this.

  • @AquaDavie
    @AquaDavie 5 ปีที่แล้ว

    The lore behind all these sorting videos I’ve been binge watching

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

    The robot is not the only one that needs balls close to its eyes

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

    It places on the ledge a ball from the left side that is designated to be swapped with a ball from the right side. Usually when two elements are swapped, one of them is placed in a temporary location. What's a bit unusual here, is that the element is placed in a temporary location before selecting the ball it should be swapped with. The reason is that the robot has only one free hand (the other one holds the pivot), and putting the ball on the ledge saves moves later when the swap takes place.

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

    Bubble sort's perseverance is truly inspiring.

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

    Nearly 1am and TH-cam recommends this out of the blue. And I watch it anyway. Thus is life.

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

    Even though I knew the outcome before they started I still wanted bubble sort to win. They're so cute!

  • @sapitron
    @sapitron 11 ปีที่แล้ว

    What a painstaking process should have been to animate that contest. hats off.

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

    The BubbleSort guy is smarter: he lets the other guy win, so he isn't bothered with these stupid tasks anymore!

  • @ahmde
    @ahmde 5 ปีที่แล้ว +1

    Just WOW, this visualization is on another level!

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

    Your visualizations are awesome! This is how educational material should be like!! thnx

  • @nathanj.williams1955
    @nathanj.williams1955 4 ปีที่แล้ว +1

    More insightful than meets the eye. Tiny training video to algorithms. Cool CGI.

  • @robbierotten2215
    @robbierotten2215 8 ปีที่แล้ว +12

    Winner! Bubblesort is like, I don't give a crap, gotta finnish this s_t.

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

    boy this new series of battlebots is going great.

  • @asj3419
    @asj3419 8 ปีที่แล้ว +29

    9_in
    11_order.
    4_the
    6_of
    8_sentence
    3_sort
    5_words
    1_Hello,
    7_this
    2_please
    10_acending

    • @themandel2017
      @themandel2017 7 ปีที่แล้ว +11

      Hello please sort this sentence in ascending order.

    • @anonymoususer9837
      @anonymoususer9837 7 ปีที่แล้ว +1

      Counting sort 😀

    • @k_tess
      @k_tess 7 ปีที่แล้ว

      I think you gave me OCD.

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

      I'll start with a swap
      8_sentence
      11_order.
      4_the
      6_of
      9_in
      3_sort
      5_words
      1_Hello,
      7_this
      2_please
      10_acending

    • @QuartzOfficial
      @QuartzOfficial 6 ปีที่แล้ว

      Hello, please sort the words of this sentence in ascending order

  • @syrilfiggus1350
    @syrilfiggus1350 11 ปีที่แล้ว +1

    Ahhh, so Sorting competitions are going to be what replaces sports when the robots take over. Very informative.

  • @valied8131
    @valied8131 7 ปีที่แล้ว +1

    This is the quality aesthetic i signed up for.

  • @Quarker
    @Quarker 12 ปีที่แล้ว +5

    Yay you let Bubble Sort finish this time!
    Btw, if you were able to make more videos like this on other sorting algorithms, it'd be extremely helpful!

  • @shaner217
    @shaner217 12 ปีที่แล้ว +5

    Amazing video. I always thought there should be a visualization program that visualizes computer code algorithm in a nice way like you've done here for these sorting algorithms, it could have a visual that shows how data is being passed around and manipulated in the computer code or perhaps computer networking. Maybe you're the guy who should make them! Thanks again for the awesome vid.

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

    I remember when I learned Java and my teacher expected us to do plan and program such a thing like "bubble sort", but we did it with buckets as long as I remember :)

  • @yiwen6794
    @yiwen6794 5 ปีที่แล้ว +1

    Who watched till the end? That bubble sort deserves some attention

  • @nicflatterie7772
    @nicflatterie7772 6 ปีที่แล้ว +1

    Wow, I wish I had this sort of video when I was in CS in college. Great work, great channel!

  • @szymon12w.64
    @szymon12w.64 ปีที่แล้ว +1

    "Sort theese balls"

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

    Is it just me or I just binge watch all of these sorting analysis videos

  • @ricksminecraft
    @ricksminecraft 5 ปีที่แล้ว +1

    Wow! Excellent Visualization. Cool.

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

    Thx, you saved my engineering diploma.

  • @GretgorPooper
    @GretgorPooper 7 ปีที่แล้ว

    This is an adorable way to explain algorithms to kids

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

    Quick sort made the best comeback in history!

  • @Clement-xy9iv
    @Clement-xy9iv 7 ปีที่แล้ว +12

    Nice explanation!

  • @OddworldCrash
    @OddworldCrash 11 ปีที่แล้ว

    I'm learning this for Visual Basic and i was very moody till i saw this video. Awesomely made :D

  • @valrabellkeys9867
    @valrabellkeys9867 5 ปีที่แล้ว +1

    Great video, explains the algorithm quite well!

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

    Don't feel sad for the bubble sorting bot. He's doing his best

  • @SarenArterius
    @SarenArterius 11 ปีที่แล้ว +45

    radix sort pls

    • @anonymoususer9837
      @anonymoususer9837 5 ปีที่แล้ว

      Radix is very powerful, beating even quicksort and mergesort if the keys in the sequence are short enough, but it takes a lot of memory, stinks on longer keys, and only works on numbers (so no colored ball sorting).
      If you want to go all the way, counting sort is even faster than radix in an optimal set of elements, but it only works on positive integers (similar to radix but it can't even hypothetically handle decimals), takes even more memory than radix (as much memory as the biggest element), and is even slower if the biggest element is too big (even if the other elements are smaller).

    • @krisizcelja
      @krisizcelja 5 ปีที่แล้ว

      I want to see the base 10 one. You know, the ear rape one?

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

      @@anonymoususer9837 Ball colors can be expressed in 'brightness'. For example, the above spheres can be '000000' for the pitch black one, and 'FFFFFF' for the brightest one. From there, Radix can sort the balls

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

    "I hurt myself today" - Bubble Sort

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

    These are fun to watch. Though I think all these approaches could all be explained in a single video.
    That would be nicer than having to watch all these Separate
    Great job making this random subject engaging though :D

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

    I think bubble was just a little nervous. With a name like quick sort as the opponent I would have been too. Good job both of u

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

    I was watching historical youtube video's on how WWI started and ended here. Quick sort wins.

  • @pga128
    @pga128 10 ปีที่แล้ว

    This channel is quality.

  • @AsbjornGrandt
    @AsbjornGrandt 10 ปีที่แล้ว +226

    Bubble Sort cheated at the end. It didn't compare the last two...

    • @udiprod
      @udiprod  10 ปีที่แล้ว +249

      It's actually not cheating. Bubble sort has an optimization that if in a certain iteration all the pairs are in order, then it concludes no further iterations are needed. It most likely happens in the one of the final iterations, but with luck it can happen early. If you give bubble sort an already sorted list, it will stop after one iteration. Therefore if bubble sort and quick sort competed over on already sorted list, bubble sort would win.

    • @AsbjornGrandt
      @AsbjornGrandt 10 ปีที่แล้ว +6

      udiprod
      I didn't suggest that it should have run an additional iteration. It just never compared the last two balls, before marking them sorted. It checked the second and third, and then assumed the first was in order, marking all three at the same time.

    • @brands2131
      @brands2131 10 ปีที่แล้ว +55

      Asbjørn Grandt That's because all 3 were already sorted. Ok, let me explain, and also to the other people that liked your comment. In the end, we had a section that was already sorted, the balls that were lit up, and a section that was unsorted, the 3 balls at the end. When bubblesort went to sort out the last 3 balls, it compared the first 2, no swap was made, then it compared 2 and 3, and no swap was made. We have bubblesorted the unsorted section, no swaps were made during that iteration, now we can assume that the unsorted section has been sorted (since there were no swaps) this is because an efficient bubblesort has a "swap" flag that is turned on if a swap was made, since we ran through the 3 unsorted balls, without turning on this flag, then bubblesort knows all element in this unsorted section are sorted. You can see this at 3:05 where bubblesort checked all 3 balls in the unsorted section and did not make any swaps, leaving the swap flag down, meaning we can stop the algorithm early.

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

      Brandon Sandoval
      I can see that now that I rewatched that part

    • @SimonTiger
      @SimonTiger 5 ปีที่แล้ว +6

      @Asbjørn Grandt Hehe...it's because already knew the list was sorted! How? The last pass it performed was: "Swap 1 2? No. Swap 2 3? No." If it's all no's, all the smaller elements are already on the left, and the bigger ones on the right, meaning that the list is already sorted.

  • @ciCCapROSTi
    @ciCCapROSTi 5 ปีที่แล้ว +1

    Eh, problem is the robot's movement takes time, which is not true when sorting something with random access. Somewhat comes back when you think about cache misses, but still. The memory itself is random access.

  • @tarcal87
    @tarcal87 9 ปีที่แล้ว +76

    Look at him go :D all the way to the end. Give it up buddy

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

      how dare you you talk to a robot who is physically and mentally handicapped. TAKE IT BACK

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

    The year is 2020 and the bubble bot is still sorting the balls

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

    Bogosort is also a very great sort, it can sort completely randomised stack in one move!
    If you're astronomically lucky

  • @EgorBo
    @EgorBo 6 ปีที่แล้ว +9

    Give those robots already sorted data and we will see who is better ;-)

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

    One pass of Bubble Sort can still be useful for simulations involving raytracing. What else can it be used for? I invite replies of your answers.

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

    Very original and well done !

  • @SyuAsyou
    @SyuAsyou 7 ปีที่แล้ว +1

    泡沫排序法:找到最亮的球,然後排到最亮的位置;接著找到次高的球,然後排到次亮的位置。重複以上步驟直到排完最暗的球。
    快速排序法:隨機選出一個球當作基準,然後比較每一顆球,比基準亮的球移到亮邊,比基準暗的球移到暗邊,最後的空位就是基準的位置。排完後排列被分成兩個較小的排列,分別對較小的排列重複以上步驟直到排完。

  • @lennytheburger
    @lennytheburger 5 ปีที่แล้ว +1

    hey can you visualize how radix base 10 just pulls an already sorter array out of the next dimention

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

    This video is so helpful! Thank you!

  • @horseliver338
    @horseliver338 11 ปีที่แล้ว

    This was so cute, it made me cry, thank you

  • @CoryMck
    @CoryMck 7 ปีที่แล้ว +1

    Cool, but is it fair to include the time of the robots traveling since in reality the code/sorting algorithm would not require the robots to move and they would essentially be at the same place solely depending on how many comparisons they had made.

    • @udiprod
      @udiprod  7 ปีที่แล้ว

      Sorting algorithms performance can be evaulated according to several criteria. Comparisons may be the most important one, but there are others, e.g., swaps (memory writes). Also, if the algorithm moves around a lot it can impact performance, since a computer's memory is usually optimized for speed assuming the program accesses close locations. If it jumps around it becomes slower (this is only true if the sorted list is really big). Anyway, the video mainly focuses on comparisons, like you say. The robot moving slows them down a bit, but doesn't effect the end result.

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

    What about Cocktail Shaker Sort?

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

    If you overclocked Bubble’s reduced instruction set, he could win.

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

    These cute fellows are making things simple, abstract and adorable ❤️👍

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

    all heroes don't wear capes...you guys are one of them....thank you soooo muchhhhh...!!

  • @Hao-gc3dp
    @Hao-gc3dp 11 ปีที่แล้ว +1

    Awesome animations! Hoping you could make videos on other sorting algorithms.

  • @offchan
    @offchan 5 ปีที่แล้ว

    Though people might have mistaken that quicksort is just slightly quicker than bubble sort from this animation because you only showed it on 10 items.
    But in reality, quicksort can be tremendously quicker if the number of items is in order of millions or billions. It can mean that bubble sort uses a year while quicksort uses 10 minutes.

    • @udiprod
      @udiprod  5 ปีที่แล้ว

      Right you are. There's a visualization of this difference you mention in a more recent video (near the end): th-cam.com/video/TZRWRjq2CAg/w-d-xo.html

  • @martinbalage9225
    @martinbalage9225 5 ปีที่แล้ว +1

    “The End. Thank you for watching” before bubble sort taking a break...funny, and cruel.

  • @BergenVestHK
    @BergenVestHK 9 ปีที่แล้ว

    Great animation. Had me smiling throughout the entire video. Thanks for uploading. :-)

  • @linsproul3548
    @linsproul3548 6 ปีที่แล้ว +1

    so this is how robots keep themselves entertained

  • @groszak1
    @groszak1 7 ปีที่แล้ว

    There are several different pivot rules for quick sort, such as random pivot you used, first pivot, last pivot, middle pivot and median of three (median of first, middle and last pivot).

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

    Great video and animation

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

    Bubble sort robot is doing his best

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

    god, I hate how these are 'intuitively' explained. By using the simplest explanation they think it makes it more 'palatable', but what really happens is the parameters are not understood and the example is lost. When someone hears the example "The robot has short vision", their immediate thought would be "Well why don't they make a robot that can see all the balls clearly?"

  • @Vlcet
    @Vlcet 11 ปีที่แล้ว

    Nice video with clear demonstrations.

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

    This deserves 500M, not 500k views

  • @Mameyaro
    @Mameyaro 6 ปีที่แล้ว

    One of these days I’ll be able to comfortably watch this video with a straight face.

  • @user-kufihfmurb
    @user-kufihfmurb ปีที่แล้ว

    Bogo sort represents:"eternity"
    Stooge sort represents:"shorter than eternity"
    Bubble sort represents:"patience"
    Quick sort represents"HURRY UP"

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

    Would love to see a video on bogo sort