10 Sorting Algorithms Easily Explained

  Рет қаралды 38,864

Coding with Lewis

Coding with Lewis

Күн бұрын

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!!!

Пікірлер: 99
@CodingWithLewis
@CodingWithLewis 3 ай бұрын
Let me know if you guys want me to go more in depth with these types of videos :)
@HARI-gm5qz
@HARI-gm5qz 3 ай бұрын
yesss plz do search algorithm
@AdamAdam-dn4st
@AdamAdam-dn4st 3 ай бұрын
Yes please
@castigousmetamageus8356
@castigousmetamageus8356 3 ай бұрын
Your explanations & animations are very clear & concise, so YEAH! Especially with the most used DSAs in professional scenarios --not just academical scenarios.
@ahmadentertainmentshorts4222
@ahmadentertainmentshorts4222 3 ай бұрын
Yes please
@mahavirpatel1517
@mahavirpatel1517 3 ай бұрын
DSA question solving with great approach to fit In mind
@babrad
@babrad 3 ай бұрын
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 3 ай бұрын
Thats why its awesome to learn bubble sort! So you know to improve it!
@vikraal6974
@vikraal6974 29 күн бұрын
I have the same story except I ended up with shell sort 😅
@geang.carneiro3982
@geang.carneiro3982 27 күн бұрын
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
@codingwithroby
@codingwithroby 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 3 ай бұрын
my man lewis making gold content. every video and short is a hit man. keep up the awesome work
@2MinutesScienceChannel
@2MinutesScienceChannel 3 ай бұрын
I made a sorting algorithm in Excel! It's really easy and I call it Neural Sort!
@CodingWithLewis
@CodingWithLewis 3 ай бұрын
Post it
@2MinutesScienceChannel
@2MinutesScienceChannel 3 ай бұрын
@@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 3 ай бұрын
Did you use a filter or something 😅
@2MinutesScienceChannel
@2MinutesScienceChannel 3 ай бұрын
@@dushalkumar No it isn't. You need to compare values.
@josef6126
@josef6126 3 ай бұрын
great work dude :)
@saber-seathearn82
@saber-seathearn82 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 3 ай бұрын
Man love the vibe of your videos👌 Feels more and more cinematic
@mrqk00
@mrqk00 2 ай бұрын
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
@MyCodingDiarie
@MyCodingDiarie 3 ай бұрын
You have such a knack for explaining things clearly. Awesome job!
@CodingWithLewis
@CodingWithLewis 3 ай бұрын
I appreciate that!
@user-fh1mx6pz3r
@user-fh1mx6pz3r 2 ай бұрын
You took explanations from google lol
@WinFoeLax
@WinFoeLax Ай бұрын
Oh damn 🙄
@ExplodeCode
@ExplodeCode 3 ай бұрын
amazing lewis! I only knew about some of them lol
@user-kx5ug9os9t
@user-kx5ug9os9t 2 ай бұрын
Great Video, We need more like this from you
@stio_studio
@stio_studio 3 ай бұрын
You are telling me that you did not talk about bogo sort????
@CodingWithLewis
@CodingWithLewis 3 ай бұрын
I got another vid coming :) dont you worry
@stio_studio
@stio_studio 3 ай бұрын
@@CodingWithLewisPhew, thanks
@maxca
@maxca 3 ай бұрын
I would love if u get more in depth in these, very interesting video!
@Sinthoras155
@Sinthoras155 3 ай бұрын
My favourite sorting algorithm is still Stalin Sort.
@CodingWithLewis
@CodingWithLewis 3 ай бұрын
Stay tuned 😎
@Timbalo0
@Timbalo0 18 күн бұрын
How does it work? Eliminate all elements except one that pleases you and then define the problem to be solved?
@King_Elijah1
@King_Elijah1 3 ай бұрын
Finally a new long form video
@vigneshshanmugam
@vigneshshanmugam 3 ай бұрын
We want more of Data structure and algorithms video ❤
@amiosarker1576
@amiosarker1576 2 ай бұрын
Personally as an intellectual I prefer bogo sort
@smaug9833
@smaug9833 Ай бұрын
Quick sort with pivot: median of(first, middle, last element) Go ahead and try beat it's performance.
@maunilparikh1963
@maunilparikh1963 2 ай бұрын
THIS IS SO UNDERRATED! Wish my CS profs explained like that! Love from India
@eechotunes
@eechotunes 19 күн бұрын
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
@TheWP120
@TheWP120 Ай бұрын
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.
@joebazooks
@joebazooks Ай бұрын
i feel like improvement to the visuals couldve made this a lot more easier to understand
@primenumberbuster404
@primenumberbuster404 3 ай бұрын
Now make one which will Sort these sorting algos as per requirement.
@automateTec
@automateTec Ай бұрын
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.
@antoniogorisek
@antoniogorisek 3 ай бұрын
Thanks for the video. Which sorting algorithm do you use the most?
@CodingWithLewis
@CodingWithLewis 3 ай бұрын
I've been using merge sort! Love it
@niktwaznyy3282
@niktwaznyy3282 3 ай бұрын
It would be perfect if you provide code for those kind of algorithms
@Pacvalham
@Pacvalham 2 ай бұрын
If you can sort integers, you can sort colors. Black = 0x000000, Blue = 0x0000FF, Green = 0x00FF00, Cyan = 0x00FFFF, etc.
@ahmadentertainmentshorts4222
@ahmadentertainmentshorts4222 3 ай бұрын
Imagine! If we get the complete DSA list from this guy 🙄
@_hepl
@_hepl 3 ай бұрын
YAAY NEW VID! 🎉
@CodingWithLewis
@CodingWithLewis 3 ай бұрын
Told ya!
@_hepl
@_hepl 3 ай бұрын
@@CodingWithLewis When we will get an Discord community server, also are you going to teach your child how to write own chatgpt.
@asmet2701
@asmet2701 2 ай бұрын
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 3 ай бұрын
At 8:24 is shell sort O(n log n) or O(n2)
@salamundi
@salamundi 3 ай бұрын
Bogo sort stays unmatched
@ItsD3vil
@ItsD3vil 3 ай бұрын
HOLD UP. what the F! why your views are so low I remember each of your videos has over like 1M view??
@CodingWithLewis
@CodingWithLewis 3 ай бұрын
Haha none of my videos have over 1M views!
@ItsD3vil
@ItsD3vil 3 ай бұрын
@@CodingWithLewis My man I wish you all best in the world you really working hard on your videos!💛👏
@jlio2003
@jlio2003 3 ай бұрын
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 3 ай бұрын
@@jlio2003 hey! If you guys like it that’s all that matters :)
@HARI-gm5qz
@HARI-gm5qz 3 ай бұрын
best video compact and easy to understand
@CodingWithLewis
@CodingWithLewis 3 ай бұрын
Glad you think so!
@domesticcadiz
@domesticcadiz 2 ай бұрын
Should’ve done BOGO sort and shown a visual for that! 😂
@md.mahbubanamtanim9081
@md.mahbubanamtanim9081 2 ай бұрын
Bro is him.....
@Innovate_Empires
@Innovate_Empires 3 ай бұрын
I inspired by you
@CodingWithLewis
@CodingWithLewis 3 ай бұрын
:D
@mrjutt9962
@mrjutt9962 2 ай бұрын
What is bucket sort
@Pyth_onist
@Pyth_onist 3 ай бұрын
all these algorithms for sorting numbers!!!!!!!!!!!!!!
@CodingWithLewis
@CodingWithLewis 3 ай бұрын
We have to do it somehow!
@MamaruSishagn
@MamaruSishagn 3 ай бұрын
the first man to watch😎
@napoleon1289
@napoleon1289 3 ай бұрын
Here from discord
@CodingWithLewis
@CodingWithLewis 3 ай бұрын
That fast
@napoleon1289
@napoleon1289 3 ай бұрын
@@CodingWithLewis you send it out for a reason
@GamemodePC
@GamemodePC Ай бұрын
i still cant understand counting sort
@Silquey
@Silquey 3 ай бұрын
goat
@alejrandom6592
@alejrandom6592 Ай бұрын
2:25 "exponentially"?
@not_estains
@not_estains Ай бұрын
the sound from the beginning of this video is from kzbin.info/www/bejne/oYG1cmONZtB4eck
@kingki1953
@kingki1953 3 ай бұрын
Where is the Bogo sort?
@CodingWithLewis
@CodingWithLewis 3 ай бұрын
Got another video coming :)
@ryoojiz
@ryoojiz 3 ай бұрын
lewis are you ok you look like you don't want to live anymore in the thumbnail 😥😥
@CodingWithLewis
@CodingWithLewis 3 ай бұрын
The algorithms are getting to me
@asagiai4965
@asagiai4965 2 ай бұрын
Wait real quicksort don't use new created list. It just use the same list. AFAIK
@BobChess
@BobChess 2 ай бұрын
True programmers use BOGO sort. Remember kids, Gamblers quit before hitting a jackpoint.
The Bubble Sort Curve
19:18
Lines That Connect
Рет қаралды 477 М.
sorting algorithms to relax/study to
58:05
Musicombo
Рет қаралды 2,7 МЛН
Incredible magic 🤯✨
00:53
America's Got Talent
Рет қаралды 74 МЛН
아이스크림으로 체감되는 요즘 물가
00:16
진영민yeongmin
Рет қаралды 55 МЛН
100❤️
00:19
MY💝No War🤝
Рет қаралды 21 МЛН
Does size matter? BEACH EDITION
00:32
Mini Katana
Рет қаралды 17 МЛН
How Dijkstra's Algorithm Works
8:31
Spanning Tree
Рет қаралды 1,3 МЛН
I Trained an AI with 10,000 Memes
14:52
Coding with Lewis
Рет қаралды 249 М.
Every Sorting Algorithm Explained in 120 minutes (full series)
1:57:33
Kuvina Saydaki
Рет қаралды 51 М.
Sorting Algorithms:  Selection Sort
1:52
Can Code Will Code
Рет қаралды 1,2 М.
Visualizing 70 Sorting Algorithms
29:24
Kuvina Saydaki
Рет қаралды 68 М.
I Made Sorting Algorithms Race Each Other
8:24
Green Code
Рет қаралды 65 М.
40 APIs Every Developer Should Use (in 12 minutes)
12:23
Coding with Lewis
Рет қаралды 309 М.
Naming Things in Code
7:25
CodeAesthetic
Рет қаралды 2 МЛН
how Google writes gorgeous C++
7:40
Low Level Learning
Рет қаралды 816 М.
3 Levels of Sorting Algorithms - FASTEST Comparison Sort!
10:38
НЕ ПОКУПАЙ СМАРТФОН, ПОКА НЕ УЗНАЕШЬ ЭТО! Не ошибись с выбором…
15:23
PART 52 || DIY Wireless Switch forElectronic Lights - Easy Guide!
1:01
HUBAB__OFFICIAL
Рет қаралды 46 МЛН
Опыт использования Мини ПК от TECNO
1:00
Андронет
Рет қаралды 785 М.
😱Хакер взломал зашифрованный ноутбук.
0:54
Последний Оплот Безопасности
Рет қаралды 627 М.
Опять съемные крышки в смартфонах? #cmf
0:50