10 Sorting Algorithms Easily Explained

Поделиться
HTML-код
  • Опубликовано: 19 окт 2024

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

  • @CodingWithLewis
    @CodingWithLewis  6 месяцев назад +24

    Let me know if you guys want me to go more in depth with these types of videos :)

    • @HARI-gm5qz
      @HARI-gm5qz 6 месяцев назад +5

      yesss plz do search algorithm

    • @AdamAdam-dn4st
      @AdamAdam-dn4st 6 месяцев назад +1

      Yes please

    • @castigousmetamageus8356
      @castigousmetamageus8356 6 месяцев назад +2

      Your explanations & animations are very clear & concise, so YEAH!
      Especially with the most used DSAs in professional scenarios --not just academical scenarios.

    • @ahmadentertainmentshorts4222
      @ahmadentertainmentshorts4222 6 месяцев назад +1

      Yes please

    • @mahavirpatel1517
      @mahavirpatel1517 6 месяцев назад +1

      DSA question solving with great approach to fit In mind

  • @babrad
    @babrad 6 месяцев назад +89

    When we learned about bubblesort in c lessons I really hated how slow it was so I tried to improve it, ending up with mergesort. I know this is nothing but I'll never forget how happy I was reinventing the wheel without reading about it elsewhere to the point this was almost 20 years ago but I clearly remember every detail -code was complete jank-

    • @CodingWithLewis
      @CodingWithLewis  6 месяцев назад +13

      Thats why its awesome to learn bubble sort! So you know to improve it!

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

      I have the same story except I ended up with shell sort 😅

    • @geang.carneiro3982
      @geang.carneiro3982 4 месяца назад

      i have a similar story.
      once a teache asked the students to get a list of numbers, create a binary tree, then get the values sorted, it was all fun until we had to process a HUGE amount of numbers, 10% of class didn't made it, and 90%(including me) was geting stack overflow due the amount of recursive call. i was the only one(and others students that copied my solution) who was able to bypass this erro by modify the algorithm to use single call with loop instead of recursive call

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

      this resourcefulness is what separates an engineer from a developer

  • @MyCodingDiary
    @MyCodingDiary 6 месяцев назад +9

    You have such a knack for explaining things clearly. Awesome job!

  • @BriariusTitan
    @BriariusTitan 6 месяцев назад +8

    my man lewis making gold content. every video and short is a hit man. keep up the awesome work

  • @codingwithroby
    @codingwithroby 6 месяцев назад +16

    This video is not getting enough love! The way you made this entertaining while sharing real information on sorting algorithms is crazy good.

  • @saber-seathearn82
    @saber-seathearn82 6 месяцев назад +5

    I just wanted to say this is one of the best videos I have watched for a topic like this. I wanted to learn something while I ate some food and this was really insightful and informative. Also straight to the point. I also really liked all of the graphics and the way you explained everything quickly and throughly.

  • @2MinutesScienceChannel
    @2MinutesScienceChannel 6 месяцев назад +59

    I made a sorting algorithm in Excel! It's really easy and I call it Neural Sort!

    • @CodingWithLewis
      @CodingWithLewis  6 месяцев назад +7

      Post it

    • @2MinutesScienceChannel
      @2MinutesScienceChannel 6 месяцев назад +16

      @@CodingWithLewis I don't know how to post it, but here is how it works:
      It seperates it into pairs, and then sort the pairss. All the data is then organized as pairs again but the pair combination is moved 1 number to the right. It keeps repeating between these two so
      4, 1, 2, 5, 3 would become (4, 1) (2, 5) (3)
      Sorts into (1, 4) (2, 5) (3)
      Then it shifts to become (1) (4, 2) (5, 3)
      Which is then sorted into (1) (2, 4) (3, 5).
      Repeat the first step and becomes (1, 2) (3, 4) (5)
      When it is sorted it is then output.

    • @dushalkumar
      @dushalkumar 6 месяцев назад +1

      Did you use a filter or something 😅

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

      @@dushalkumar No it isn't. You need to compare values.

    • @josef6126
      @josef6126 6 месяцев назад +1

      great work dude :)

  • @stio_studio
    @stio_studio 6 месяцев назад +26

    You are telling me that you did not talk about bogo sort????

    • @CodingWithLewis
      @CodingWithLewis  6 месяцев назад +7

      I got another vid coming :) dont you worry

    • @stio_studio
      @stio_studio 6 месяцев назад +2

      @@CodingWithLewisPhew, thanks

  • @thecodebendermaster
    @thecodebendermaster 6 месяцев назад +3

    Man love the vibe of your videos👌 Feels more and more cinematic

  • @Sinthoras155
    @Sinthoras155 6 месяцев назад +13

    My favourite sorting algorithm is still Stalin Sort.

    • @CodingWithLewis
      @CodingWithLewis  6 месяцев назад +1

      Stay tuned 😎

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

      How does it work? Eliminate all elements except one that pleases you and then define the problem to be solved?

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

      What about Mao ZeSort?

    • @UHN.406
      @UHN.406 25 дней назад

      We need a "The artist sort"

  • @Isaiahken
    @Isaiahken 4 дня назад

    I have watched other people like Brocode and others. But you helped me understand them. Thank you so much!

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

    5:55 "Heap is a tree-based data structure where all levels are filled except the lowest and is filled from the left to right." This is true but what's with the visual going against that definition? the 4 should be the left child node of the 3, shouldn't it? otherwise it's not being filled from the left lol

  • @vigneshshanmugam
    @vigneshshanmugam 6 месяцев назад +3

    We want more of Data structure and algorithms video ❤

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

    This is a really good video as a refresher because of its concise descriptions and neat visualizations, while also being entertaining with witty remarks about the algorithms

  • @King_Elijah1
    @King_Elijah1 6 месяцев назад +2

    Finally a new long form video

  • @maxca
    @maxca 6 месяцев назад +1

    I would love if u get more in depth in these, very interesting video!

  • @primenumberbuster404
    @primenumberbuster404 6 месяцев назад +2

    Now make one which will Sort these sorting algos as per requirement.

  • @ExplodeCode
    @ExplodeCode 6 месяцев назад +1

    amazing lewis! I only knew about some of them lol

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

    If you can sort integers, you can sort colors. Black = 0x000000, Blue = 0x0000FF, Green = 0x00FF00, Cyan = 0x00FFFF, etc.

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

    Quick sort with pivot: median of(first, middle, last element)
    Go ahead and try beat it's performance.

  • @JaneeshP-p1h
    @JaneeshP-p1h 6 месяцев назад

    Great Video, We need more like this from you

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

    *correction* the best case doesn't called Big O it's called Omega, and if it's both equal it's called Theta , thanks for the effort

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

    I thought bubble sort was a pom pom gun that points at a lower pigeonhole when the pom pom is heavy, and the upper pigeon holes when the pom pom is light.

  • @maunilparikh1963
    @maunilparikh1963 5 месяцев назад +1

    THIS IS SO UNDERRATED! Wish my CS profs explained like that! Love from India

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

    i feel like improvement to the visuals couldve made this a lot more easier to understand

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

    9:59 In verbose, radix sort has a big Oh of the product of the number of numbers in the largest number and the sum of the number of numbers and the base of the largest number.

  • @niktwaznyy3282
    @niktwaznyy3282 6 месяцев назад +1

    It would be perfect if you provide code for those kind of algorithms

  • @amiosarker1576
    @amiosarker1576 5 месяцев назад +2

    Personally as an intellectual I prefer bogo sort

  • @Whelknarge
    @Whelknarge Месяц назад

    Forgot about DontSort:
    function DontSort(arr) {
    let newArr = new Array(arr.length).fill(null);
    for (let i = 0; i < arr.length; i++) {
    let randomIndex = Math.floor(Math.random() * arr.length);
    while (newArr[randomIndex] !== null) {
    randomIndex++;
    if (randomIndex>= arr.length) {
    randomIndex= 0;
    }
    }
    newArr[randomIndex] = arr[i];
    }
    return newArr;
    }
    In rare cases, DontSort will fail and actually return a sorted list.

  • @ahmadentertainmentshorts4222
    @ahmadentertainmentshorts4222 6 месяцев назад +1

    Imagine! If we get the complete DSA list from this guy 🙄

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

    Great video! I still don't understand shell sort though.

  • @_hepl
    @_hepl 6 месяцев назад +2

    YAAY NEW VID! 🎉

    • @CodingWithLewis
      @CodingWithLewis  6 месяцев назад +1

      Told ya!

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

      @@CodingWithLewis When we will get an Discord community server, also are you going to teach your child how to write own chatgpt.

  • @salamundi
    @salamundi 6 месяцев назад +1

    Bogo sort stays unmatched

  • @ItsD3vil
    @ItsD3vil 6 месяцев назад +5

    HOLD UP. what the F! why your views are so low I remember each of your videos has over like 1M view??

    • @CodingWithLewis
      @CodingWithLewis  6 месяцев назад +2

      Haha none of my videos have over 1M views!

    • @ItsD3vil
      @ItsD3vil 6 месяцев назад +2

      @@CodingWithLewis My man I wish you all best in the world you really working hard on your videos!💛👏

    • @jlio2003
      @jlio2003 6 месяцев назад +2

      yeah right!? I also remember his videos has over 1M views damn thats crazy 5K on such a well-done video like this, youtube algo is wild

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

      @@jlio2003 hey! If you guys like it that’s all that matters :)

  • @HARI-gm5qz
    @HARI-gm5qz 6 месяцев назад +3

    best video compact and easy to understand

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

    Thanks for the video.
    Which sorting algorithm do you use the most?

  • @balijosu
    @balijosu Месяц назад +1

    1:11 quadratic, not exponential

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

    I am going through python documentation it still uses tim sort in 3.12. can you share any documents showing python using other sorting (power sort) in 3.12 ?

  • @KnightlyCoding
    @KnightlyCoding 2 дня назад

    You didn't show the sorting graphic for Counting sort or Radix sort. Not necessarily necessary, but I think it would be both hilarious and helpful to see the poor performance of both of those algorithms illustrated 🤣

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

    Hi I wanna add an e-commerce store app for my portfolio. I wonder which react stack is solid for it in 2024. Can someone suggest something? As a back I would prefer Firebase, also for styling scss+mui but need recommendations about state manager and other technologies and tools. Thanks!

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

    At 8:24 is shell sort O(n log n) or O(n2)

  • @md.mahbubanamtanim9081
    @md.mahbubanamtanim9081 5 месяцев назад +2

    Bro is him.....

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

    2:25 "exponentially"?

  • @ryoojiz
    @ryoojiz 6 месяцев назад +2

    lewis are you ok you look like you don't want to live anymore in the thumbnail 😥😥

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

    Should’ve done BOGO sort and shown a visual for that! 😂

  • @GamemodePC
    @GamemodePC 5 месяцев назад +1

    i still cant understand counting sort

  • @Innovate_Empires
    @Innovate_Empires 6 месяцев назад +2

    I inspired by you

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

    What is bucket sort

  • @Pythonist_01
    @Pythonist_01 6 месяцев назад +1

    all these algorithms for sorting numbers!!!!!!!!!!!!!!

  • @kingki1953
    @kingki1953 6 месяцев назад +1

    Where is the Bogo sort?

  • @fearlessforward611
    @fearlessforward611 Месяц назад

    what about search algorithms like this video made it

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

    True programmers use BOGO sort. Remember kids, Gamblers quit before hitting a jackpoint.

  • @napoleon1289
    @napoleon1289 6 месяцев назад +1

    Here from discord

  • @MiguelGarcia-kr5bm
    @MiguelGarcia-kr5bm 2 месяца назад

    Ticket to ride :D

  • @MamaruSishagn
    @MamaruSishagn 6 месяцев назад +1

    the first man to watch😎

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

    Wait real quicksort don't use new created list.
    It just use the same list.
    AFAIK

  • @Silquey
    @Silquey 6 месяцев назад +1

    goat

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

    the sound from the beginning of this video is from ruclips.net/video/kPRA0W1kECg/видео.html

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

    Gott es ist so traurig wenn ich jeden einzelnen verstehe.

  • @Saliman-vr
    @Saliman-vr 2 месяца назад

    ruclips.net/video/kPRA0W1kECg/видео.htmlsi=BG8WVl4R_kBzZd6l 0:20 kinda looks similar to the thumbnail🤔🤔🤔🤔🤔