10 Sorting Algorithms Easily Explained

Sdílet
Vložit
  • čas přidán 29. 05. 2024
  • Every programmer has run into sorting algorithms at one point in their career. 🧑‍💻 In today's video I am going to explain 10 Sorting Algorithms as easy as possible in only 10 minutes with the pros and cons of each.
    Each sorting algorithm is explained in surface level, then the mathematical formula is explained and ending with a real life example. I encourage you to watch this video and whatever one intrigues you the most, go look up some tutorial on how you can implement this in your favourite programming language. 🧑‍💻
    👉WE ARE PLANNING A HACKATHON!!! 👈
    Join the discord to learn more:
    dsc.gg/lewismenelaws
    If you like this video, check out some of my other videos where I build awesome projects and provide awesome developer resources that you can use in order to be a better developer :)
    LINKS
    ---
    MY NEWSLETTER 💌
    thebetter.dev
    ------
    CONNECT WITH ME ON SOCIAL
    📸 Instagram: / lewismenelaws
    🎚TikTok: / lewismenelaws
    🐣 Twitter: / lewismenelaws
    -
    My gear 💻
    liinks.co/lewismenelaws
    -----
    Timestamps
    0:00 Intro
    0:11 Bubble Sort
    1:29 Selection Sort
    2:24 Insertion Sort
    3:13 Merge Sort
    4:29 Quick Sort
    5:41 Heap Sort
    6:54 Counting Sort
    7:48 Shell Sort
    8:38 Tim Sort
    9:27 Radix Sort
    10:27 WATCH!!!
  • Věda a technologie

Komentáře • 91

  • @CodingWithLewis
    @CodingWithLewis  Před měsícem +12

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

  • @babrad
    @babrad Před měsícem +19

    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  Před měsícem +1

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

  • @2MinutesScienceChannel
    @2MinutesScienceChannel Před měsícem +34

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

    • @CodingWithLewis
      @CodingWithLewis  Před měsícem +2

      Post it

    • @2MinutesScienceChannel
      @2MinutesScienceChannel Před měsícem +7

      @@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 Před měsícem

      Did you use a filter or something 😅

    • @2MinutesScienceChannel
      @2MinutesScienceChannel Před měsícem

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

    • @josef6126
      @josef6126 Před měsícem

      great work dude :)

  • @codingwithroby
    @codingwithroby Před měsícem +3

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

  • @BriariusTitan
    @BriariusTitan Před měsícem +3

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

  • @saber-seathearn82
    @saber-seathearn82 Před měsícem +3

    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.

  • @thecodebendermaster
    @thecodebendermaster Před měsícem +2

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

  • @stio_studio
    @stio_studio Před měsícem +11

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

  • @Sinthoras155
    @Sinthoras155 Před měsícem +8

    My favourite sorting algorithm is still Stalin Sort.

  • @MyCodingDiarie
    @MyCodingDiarie Před měsícem +3

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

  • @mrqk00
    @mrqk00 Před měsícem

    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

  • @ExplodeCode
    @ExplodeCode Před měsícem +1

    amazing lewis! I only knew about some of them lol

  • @maxca
    @maxca Před měsícem +1

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

  • @user-kx5ug9os9t
    @user-kx5ug9os9t Před měsícem

    Great Video, We need more like this from you

  • @primenumberbuster404
    @primenumberbuster404 Před měsícem +2

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

  • @vigneshshanmugam
    @vigneshshanmugam Před měsícem +2

    We want more of Data structure and algorithms video ❤

  • @user-fh1mx6pz3r
    @user-fh1mx6pz3r Před 24 dny +8

    You took explanations from google lol

  • @TheWP120
    @TheWP120 Před 21 hodinou

    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.

  • @King_Elijah1
    @King_Elijah1 Před měsícem +1

    Finally a new long form video

  • @Pacvalham
    @Pacvalham Před 19 dny

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

  • @asmet2701
    @asmet2701 Před měsícem

    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!

  • @niktwaznyy3282
    @niktwaznyy3282 Před měsícem +1

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

  • @ahmadentertainmentshorts4222
    @ahmadentertainmentshorts4222 Před měsícem +1

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

  • @amiosarker1576
    @amiosarker1576 Před 15 dny +1

    Personally as an intellectual I prefer bogo sort

  • @aixizu
    @aixizu Před měsícem

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

  • @salamundi
    @salamundi Před měsícem +1

    Bogo sort stays unmatched

  • @joebazooks
    @joebazooks Před 4 dny

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

  • @_hepl
    @_hepl Před měsícem +2

    YAAY NEW VID! 🎉

    • @CodingWithLewis
      @CodingWithLewis  Před měsícem +1

      Told ya!

    • @_hepl
      @_hepl Před měsícem

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

  • @maunilparikh1963
    @maunilparikh1963 Před měsícem

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

  • @ItsD3vil
    @ItsD3vil Před měsícem +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  Před měsícem +2

      Haha none of my videos have over 1M views!

    • @ItsD3vil
      @ItsD3vil Před měsícem +2

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

    • @jlio2003
      @jlio2003 Před měsícem +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  Před měsícem

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

  • @antoniogorisek
    @antoniogorisek Před měsícem

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

  • @mrjutt9962
    @mrjutt9962 Před 24 dny

    What is bucket sort

  • @domesticcadiz
    @domesticcadiz Před měsícem

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

  • @HARI-gm5qz
    @HARI-gm5qz Před měsícem +3

    best video compact and easy to understand

  • @md.mahbubanamtanim9081
    @md.mahbubanamtanim9081 Před 16 dny +1

    Bro is him.....

  • @MamaruSishagn
    @MamaruSishagn Před měsícem +1

    the first man to watch😎

  • @Innovate_Empires
    @Innovate_Empires Před měsícem +2

    I inspired by you

  • @alejrandom6592
    @alejrandom6592 Před 4 dny

    2:25 "exponentially"?

  • @Pyth_onist
    @Pyth_onist Před měsícem +1

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

  • @Silquey
    @Silquey Před měsícem +1

    goat

  • @napoleon1289
    @napoleon1289 Před měsícem +1

    Here from discord

  • @ryoojiz
    @ryoojiz Před měsícem +2

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

  • @kingki1953
    @kingki1953 Před měsícem +1

    Where is the Bogo sort?

  • @GamemodePC
    @GamemodePC Před 13 dny

    i still cant understand counting sort

  • @asagiai4965
    @asagiai4965 Před měsícem

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

  • @not_estains
    @not_estains Před 2 dny

    the sound from the beginning of this video is from czcams.com/video/kPRA0W1kECg/video.html

  • @BobChess
    @BobChess Před měsícem

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