Shell sort vs Insertion sort

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 พ.ค. 2022
  • Introduction of Shell sort, and a match with Insertion Sort.
    For an introduction of Insertion sort, see:
    • Insertion Sort vs Bubb...
    Choosing the sequence 9-6-1:
    For a list of size 10, the gaps can be any number 1,2,....,9, and the sequence must end with 1.
    So each of the gaps 2,3,...,9 can be included in the sequence, or not included. So there's a total of 2^8=256 possible gap sequences. For each we checked the average number of comparisons for all possible 10! permutations.
    Here are the 3 best sequences:
    9-6-1: 25.512 comparisons
    4-1: 25.516 comparisons
    6-1: 25.539 comparisons
    We could have also checked which has the highest probability of performing less comparisons than insertion sort. Here are the top 3 in this respect:
    4-1: prob=0.72
    9-4-1: prob=0.704
    6-1: prob=0.701
    Analyzing Shell sort variants more generally: See it explained in my home page:
    www.udiprod.com/shell-sort/#a...
    Why did Shell sort lag behind in the second match in comparisons per second? You are welcome to post answers. Or read answer here:
    www.udiprod.com/shell-sort/#t...

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

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

    I like how the robots having to move the full distance between balls approximates the idea of data locality

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

      Everything is smartly thought to approximate all the concepts for everyone to understand, like the robot only being able to compare 2 balls at a time to explain the fact that only humans can roughly compare lots of values (and also the fact that with merge sort the robot had to push the balls when finished sorting...)

    • @stuartallen2001
      @stuartallen2001 ปีที่แล้ว +47

      I thought this was cool too but what is the real life equivalent of the rocket boosters in the second race?

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

      @@stuartallen2001 clock speed

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

      @@stuartallen2001 Increased cache size.

    • @thanksalot46
      @thanksalot46 ปีที่แล้ว +43

      @@stuartallen2001 memory latency

  • @SuperfieldCrUn
    @SuperfieldCrUn ปีที่แล้ว +670

    While this may seem like it's a marginal improvement over insertion sort if you manage to crack the gap code, remember that we are only working with very small lists of 10 items at a time. Once you scale up the list to hundreds or thousands, it becomes a completely different ball game and things like shell sort kick insertion sort to the curb.

    • @codahighland
      @codahighland ปีที่แล้ว +37

      And shell sort is among the slower sorts in that tier, too.

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

      Insertion sort is also being handy capped by not using an binary search to find the insertion location. On 10 it would be a rather small reduction of checks, but savings scale up significantly on the hundreds or thousands of element cases.

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

      @@TheFinagle You also need to account for the complexity of actually inserting the value into the array. Binary search makes it faster for you to find the location, but once you do, you still need to shift a bunch of elements over by one position to make room. Insertion sort does that as it is walking the array.

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

      @@TheFinagle Yeah, that's a huge handicap. It would go from O(n^2) comparisons, to O(n*log(n)) comparisons by using a binary search.

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

      @@pseudo_goose Your right, I hadn't though of that.
      And if your data type can do easy arbitrary insertion its usually not binary search friendly.

  • @zorm_
    @zorm_ ปีที่แล้ว +145

    I love that 13 years after the first video you guys are still doing 3d animations with the exact same robot model

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

    for the question at 6:16, I think it's due to shell sort spending more time moving different elements from one place to another on the rack, whereas insertion sort was almost always holding one element and comparing others to it.

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

      I was thinking the same thing. You hit all the points I noticed.

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

      Right! I just added a detailed account here: www.udiprod.com/shell-sort/#timing

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

      But she'll sort had 1 extra comparison

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

      I think that's also why the jet boosts were way more advantageous for Shell Sort. Insertion Sort didn't really utilize the rockets much, but Shell Sort necessarily has to go long distances.

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

    It's been over a decade since his first sorting video yet he is still interested in making sorting videos. Guys, dedicate to your friends and family like this guy dedicate to sorting algorithms.

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

    I really like this lines display. Surely on Quick sort it would show at a glance how the first iteration partitions the set into two non-overlapping subsets.

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

      Yeah, it definitely would, could be a cool addition for quick sort video.

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

    Shell sort is one of the most interesting sorting algorithms, im glad you’re making videos about it

  • @52flyingbicycles
    @52flyingbicycles 2 ปีที่แล้ว +29

    Upside: gets into O(nlogn) territory with the right gap sequence
    Downside: you need to calculate that gap sequence ahead of time

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

    I like these animations. They make the video easy and intuitive to understand.

  • @medexamtoolsdotcom
    @medexamtoolsdotcom ปีที่แล้ว +57

    Insertion is best with actual physical objects, when making room to insert an object in is as simple as shoving everything to the right of it further to the right, rather than with computer memory, moving it over to the next memory address for each and every individual item in memory. With my DVD collection, inserting a movie between positions 23 and 24 out of 50 means shoving all DVD cases 24 through 50 together to the right by .5 inch all at once which can be done in one swift motion of a hand. While in a computer, that means moving the item in slot 50 to slot 51... then moving the item in slot 49 into slot 50, and then moving the item in slot 48 to slot 49... all the way down to then moving the item in slot 24 to slot 25, and then and only then having the space to put the new item into slot 24.

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

      Or if you have a linked-list, but you then need a way to perform the binary search. A linked list is where the computer grabs a random chunk of memory for the new data field, uses pointers to identify that chunk of memory, then has the predecessor and successor items re-point from each other to the new item. After the list is sorted, you then copy the elements from the linked list to the final list.
      A linked list is composed of multiple individual data elements, where each data element is composed of the data value, and two pointer values (forward and backward). Element number one has a data value, and two empty pointers. When element number two is added (assuming element number two is supposed to go after element #1), then the 'forward' pointer is reassigned to point at the location of data element number two. Element number two has its backwards pointer to point at element number one.
      From there, items number three is analyzed. Item number thre3e is discovered to fit between elements #1 and #2. So another chunk of memory is grabbed, the data value for item #2 is put in that chunk of memory, and then the pointers for element number three are updated. The #3 'forward' pointer is changed to point to element #2, and the backward pointer is changed to point at element #1. Similarly, element #1 has its forward pointer changed to point to element #3, and element #2 has its backwards pointer changed to point at element #3.
      (apologies for the words, but I need pretty pictures to better explain it)

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

    I think it'd be better if the balls were numbered because it's hard to tell the difference between some of the shades of red and think about sorting them. would also be better for colorblind people

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

      Commenting to boost this, cus I have red-green color deficiency.

    • @affegpus4195
      @affegpus4195 ปีที่แล้ว +33

      Really? I thought you could differentiate shades of the same color, just not tell the colors apart

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

      Would also help understanding radix sort

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

      @@affegpus4195 it might depend on the specific type of colourblindness, perhaps?

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

      no

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

    Having watched a decade of sorting videos as if they were released as a series over the course of a week, the robots getting jet engines is hilarious and a wild plot twist.
    Also the whole series is just well made and really shows off the differences in the algorithms.

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

    Finally, a new udiprod video! I've been waiting for so long lol
    Good that the sorts are back

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

    I have a feeling that this is about to be recommended to everyone

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

    Babe wake up, new udiprod video just dropped

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

    Almost 10 years and still making these animations. Kings

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

    The sort comparisons are back! How about a video highlighting how much the result can be rigged with carefully crafted inputs?

  • @heck_fy
    @heck_fy 7 หลายเดือนก่อน +2

    Wow, the coolest explanation and visualization of Shell sort I've seen! Thank you so much. So simple, short and clear explanation

  • @1994AustinSmith
    @1994AustinSmith ปีที่แล้ว

    Thanks to these videos, I now understand the "sounds of sorting" videos TH-cam keeps recommending me.

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

    The fact that you've used this same visualization for 10+ years with few changes is delightful to me

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

    The fact that this channel is still making these late 1990s-esque animations in the 21st century really keeps me going. Love these robots!

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

    Wake up babe, new udiprod video about sorting algorithms just dropped

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

    Would have been interesting to see binary insertion sort, another optimization to insertion sort

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

    I love these visual expressions and explanations of algorithms! Please more!

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

    I need more of this. I love coming back here from time to time to watch these guys sort!

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

    I love this channel, and what I love the most is that even thought it's been 15 years the art style hasn't changed a bit. Wish you would upload more often

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

    I had no idea you were still making videos and I am so glad you are. Keep up the good work! I love these vids

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

    I love that you keep making videos! I really like them, they're quite interesting and relaxing

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

    Finally! Another video!

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

    Thank you for continuing this series!

  • @nadie-qm8rq
    @nadie-qm8rq 2 ปีที่แล้ว +1

    I found this channel just a few weeks ago, glad they updated

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

    Boy I can't wait for you guys to explain the absolute magic that is Radix sort. I wish I understood how that thing worked.

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

    When the world most called for him, he returned

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

    The Return of The King

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

    It's always a good thing to see a new Udiprod video.

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

    I am CS student but I'm bad at math and algorithm
    Thank you, now I can understand most of basic understanding

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

    Really awesome to see this channel upload!

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

    so glad we are getting another sorting video

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

    its always a great surprise when you upload !

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

    STANDINGS:
    21 Quicksort
    44 Bubble Sort
    44 Merge Sort
    52 Quicksort
    39 Heap Sort
    23 Merge Sort
    30 Insertion Sort
    44 Bubble Sort
    36 Bubble Sort
    81 Stooge Sort
    27 Stooge Sort
    605 Bogosort
    30 Insertion Sort
    31 Shell Sort

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

      Where is Shell(9,6,1) Sort? It's not a proper sort, just a modification of Shell Sort.

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

      I don't get what's going on here

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

      Those are the current standings of all the sorting algorithms featured so far.

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

      Its the same list?

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

      @@affegpus4195 I don't remember.

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

    Yay! Another sorting video! We sub for these and we will always come back no matter how long!

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

    Thank you Uriprod, your videos are so helpful and intuitive!!

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

    new udiprod sorting algo vid dropped?????? why was i not informed immediately. absolutely fantastic

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

    Thanks once again for these extremely informative videos!

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

    what a beauty this channel is!

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

    I really enjoyed this demonstration of shell and insertion sorting. Thank you so much for making these videos :)

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

    I never thought I'd understand Shell sort. Thank you

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

    Nothing better than watching these videos at 2:30 AM

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

    I would like to see gnome sort next, you explain sorting algorithms really well and i cant understand the difference between gnome sort and insertion sort so making a video about it would help me a lot, thanks.
    Edit: i finally understood it, but a video about it would be cool!

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

      i would want to see it just for the sake of seeing a robot in a funny little gnome hat and beard

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

      @@claw25533 Actually me too, but as of now, I STILL DON´T KNOW THE DIFFERENCE OF GNOME SORT AND INSERTION SOTR, PLEASE EXPLAIN!

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

    Ooo, new sorting videos! I love these!

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

    Thanks! I didn't know how shell sort worked until I saw this video!

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

    I would absolutely watch a 1 hour video of this style animation with the robots sorting a 100-element list or whatever the max you could do in an hour or so. Maybe get more algorithms going at once even.

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

    Love the animation. Keep up the good work.

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

    i have wanted more of these so bad

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

    Thanks. I now know shell sort. I was confused what shell sort does. This video helped me.

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

    I know nothing about computing, but I do like those hardworking bots moving the balls.

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

    While using "the jet engines" do not forget it doesn't always work like this in the real life where we have caches and bus widths. Chances are the comparisons (let's assume we just sort some 8-bit values) will take the addresses far enough to make the memory controller trigger a full-width read for every byte it needs, see ya performance :)

  • @nguyentan9359
    @nguyentan9359 6 หลายเดือนก่อน +1

    Hey this is actually really easy to understand

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

    The Ciura gaps are said to be the most optimal for shell sort of no specific input length, and shell sort is preferred over quicksort in tight applications because of its small code size, but it's cache unfriendly because of why the robot lags behind in comparisons per second. One reason why the optimal gaps barely beat insertion is because its best case is O(n log n) instead of O(n)

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

    Could we get some comparisons on MUCH larger sets? I feel like some only truly shine when the amount of data grows.

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

      Like Bogo sort

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

      Or std::sort

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

      @@typhoonzebra there's a Bogosort video
      it's hilarious
      it's 40 minutes long, and 35 of it is literally waiting for Bogosort to actually finish randomizing

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

      @@musicexams5258 Just came back from that. Glad to see they have recognised the ultimate sorting method.

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

    Amazing! Very well explained

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

    Other people: Watching Netflix Stranger Things 4
    Me: Watching two robots sorting color balls

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

    this is the best channel

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

    These videos r kinda helpful to learn sorts

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

    Great sorting explanation as always! If you guys take requests, can you show the way a Circle Sort acts? Or a Comb Sort? Either one would be really fun to see.

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

    This is a blessing

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

    In the last shell sort step, is each ball guaranteed to be either in its correct position or next to it? Or can it be further away?

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

      Not in the gap sequences used in the video, but for some gap sequences it's true. For example a gap sequence of 3-2-1 guarantees it. Other gap sequence guarantee larger bounds. I'll soon post more details on that.

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

      If the second to last gap size is n (assuming the last gap size is 1) then I'm pretty sure each element is guaranteed to be n-1 positions away from it's final position at most. Assuming my math is good, I feel like you could improve the worst case speed of the algorithm pretty significantly by having it move on to the next element after n-1 comparisons since the nth comparison would be guaranteed to show the two elements don't need to swap. You might even be able to use a similar rule for every sub-sort after the first.

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

    I love these robot dudes so much. 24 ball race when

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

    Finally, a new algorithm! Could you please do a video on Cocktail Shaker Sort, or maybe Gravity Sort?

  • @legendgames128
    @legendgames128 9 หลายเดือนก่อน +1

    Never had I felt this tense between two robots in a sorting competition. Shell sort should work better in theory due to moving elements closer and closer, but the time it took moving and the lack of optimization made me nervous in this match.

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

    I Appreciate this video

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

    yoooo new sorting method video just dropped

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

    Let's goo, another sorting video

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

    Babe wake up, there's a new sorting robot video

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

    i love the classic solution of "lets add jet boosters!" when something isnt fast enough

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

    I remember watching these in high school! I don’t know if you thought about visualizing quantum algorithms, and most quantum sorts don’t outperform classical sorts, but if you could figure out how to visualize Grover’s algorithm or Shor’s that’d be so cool!

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

    Id love to see how you tackle Sleep sort 😅

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

    Oh this is amaaaaziingg!

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

    I eventually want to see a large competition of all sorts. Not only to see all the different screens of each sort all together, but a "look how far we've come" from slower but vaguely effective sorts to...shell and beyond.

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

    Great video!

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

    babe wake up new udiprod sorting algorithm video

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

    Yes a new video!

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

    wake up babe. new uniprod video just dropped.

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

    Nobody:
    Nosoul:
    These videos lore if robots weren't shortsighted:

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

    Babe wake up new udiprod sorting video

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

    You should do a comparison on bigger lists. With 100+ elements shell sort will be significantly faster than simple insertion. Actually the biggest reason why Quick, Merge or Shell Sort are much faster is because they can easily switch elements that are far from each other. Comb sort was developed with this idea in mind. Comb sort is a simple bubble, that uses sublists with wide gaps.
    However Insertion Sort works really well on small or almost sorted lists, where each element has to move just a few spaces. This is why hybrid sorts often use Insertion sort as a last step on almost sorted list, because it's the fastest way.

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

      th-cam.com/video/8MsTNqK3o_w/w-d-xo.html

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

    Would be interesting to see binary insertion sort. Of course, the improvement would be very minor on such a small set, but it would still be interesting.

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

    thanks!

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

    Honestly this editing was better imo

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

    Now I want to see shell vs merge sort

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

    He is back

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

    HUGE UPSET!! LETS GO INSERTION SORT

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

      Shell sort training arc went crazy though

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

    I'd like to see how bitonic sort works.
    Or maybe cocktail shaker

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

    New sorting algorithm dropped. All my friendsove sorting algorithms.

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

    I wish you would sometimes do a race with 100 items instead of just 10, to show the disparity in speed more obviously.

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

    Finally another one

  • @abhinashjena216
    @abhinashjena216 7 หลายเดือนก่อน +1

    So good animation 👌 😍

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

    I think the lag in comparisons per second has to do with the fact that insertion sort does most of its comparisons with one ball at a time, and so it only has to pick up and put down one ball at a time. Shell sort has more putting down and picking up of two

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

    yay theyre back

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

    Can you make a video about the radix sort or bitonic sort, i think it's very interesting to talk about