Тёмный

Learn Merge Sort in 13 minutes 🔪 

Bro Code
Подписаться 2,2 млн
Просмотров 307 тыс.
50% 1

Merge sort algorithm tutorial example explained
#merge #sort #algorithm
// merge sort = recursively divide array in 2, sort, re-combine
// run-time complexity = O(n Log n)
// space complexity = O(n)
music credits 🎼:
===========================================================
Title: Wallflowers
Artist: Bad Snacks
Link: • bad snacks: RU-vid Au...
===========================================================

Наука

Опубликовано:

 

5 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 257   
@BroCodez
@BroCodez 3 года назад
This video took me THREE WEEKS to produce! Ya'll better smash that like button for me! lol public class Main{ public static void main(String args[]) { // merge sort = recursively divide array in 2, sort, re-combine // run-time complexity = O(n Log n) // space complexity = O(n) int[] array = {8, 2, 5, 3, 4, 7, 6, 1}; mergeSort(array); for(int i = 0; i < array.length; i++){ System.out.print(array[i]+ " "); } } private static void mergeSort(int[] array) { int length = array.length; if (length
@syllight9053
@syllight9053 3 года назад
Don't worry bro, I smashed the like button, plus I contacted the president to set a direct nuclear launch to the like and subscribe button as well!
@BroCodez
@BroCodez 3 года назад
@@syllight9053 Thank you Syllight!
@immortalbotyt1428
@immortalbotyt1428 3 года назад
I already did my big bro :D If we both belonged to only 1 family u would be my bigger bro :D
@aditya_asundi
@aditya_asundi 3 года назад
3 weeks making this *AND THERE'S A DISLIKE????*
@roysaka4475
@roysaka4475 3 года назад
Hi bro plsae reques Tutorial Python AndroidHelper. Music, recorder, voice mix, microfon. Call phone, game, calculator, google voice recorder, and others.. 🙏🙏🙏🙏🙏🙏 Plsee
@mayawhocodes3092
@mayawhocodes3092 2 года назад
The way you broke this down into simple terms with visuals and everything, amazing. I'm not a bro, but I do code. And this was lit. Thank you.
@sancho608
@sancho608 Год назад
No. You are a bro now!!
@fsxanas90
@fsxanas90 4 месяца назад
why the karen vibe tho lmao
@johndavis29209
@johndavis29209 4 месяца назад
@@fsxanas90 Why anything
@BigSmoke-r9w
@BigSmoke-r9w 2 месяца назад
You are a bro! 👊
@sabdullahtu-techandunboxin8131
@sabdullahtu-techandunboxin8131 Месяц назад
Fr
@coltonbailey8873
@coltonbailey8873 3 года назад
You are single-handedly teaching me programming/computer science. Thank you. Never change your teaching structure, because this method works really well.
@Jathamus
@Jathamus 2 года назад
I knew when I saw "Bro Code" it would be a beautifully simple video. What you did that the other videos I watched failed to do was walk through the sort / merge in the order that it would actually happen. The other videos were doing it by rows and not the actual order that it happens in. Thank you ! That is what made it click for me. I am now subscribed !
@jorgemedina8497
@jorgemedina8497 4 месяца назад
This is the best video I found on all youtube which explains Merge Sort properly. This video is the definition of Quality Content.
@GamerOverThere
@GamerOverThere Год назад
Bro, you are a legend. My professor went over merge sort for 1 1/2, and I was left confused. I watched a Harvard lecture video on it, still confused. Asked chatGPT about individual components (not to cheat but to have it explain each step to me, I want to understand this) and it was spewing nonsense. But your video made it finally click. Thanks bro! Liked and subscribed
@kingipra
@kingipra Год назад
Best explanation I've seen so far. The rundown at the beginning really helps. Thank you
@raywei1701
@raywei1701 11 месяцев назад
So clear. my professor did not have enough time to go over this in class. Now I understand everything about merge sort.
@nyasha_keith_matevengwe
@nyasha_keith_matevengwe 2 года назад
You are a great tutor sir, I appreciate, I was failing to understand this all along, but just because of your video, I feel confident enough
@sanskarsongara2592
@sanskarsongara2592 3 года назад
Idk you sounds more confident in recent new videos, keep going homie you still gotta reach more people👍
@valioprea9796
@valioprea9796 2 года назад
First of all I just wanted to let you know that thanks to your java section I landed a job as a java developer. So ...from the bottom of my heart, thank you, keep up the good work! On the other hand, a question for this video: what if the array has an odd length ?
@Nootey33
@Nootey33 Месяц назад
I'm on a journey of learning DSA ... I've got to say, you explain things very well! Glad I've stumbled on your channel.
@NH-ij8dz
@NH-ij8dz 6 месяцев назад
Great video. I needed to implement this in C for a CS class and this video explained it in much clearer and easier to follow way than the so called experts who are being paid 6 figures a year to teach this to me. Ty bro.
@nyankiku5863
@nyankiku5863 Год назад
You made mergeSort look so simple and easy, thank you so much!
@aadv1k
@aadv1k 7 месяцев назад
Thank you for the beautifully elegant explanation that didn't require the viewer to have a PhD. You are one talented bro. Keep it up!
@danielebbersmeyer5087
@danielebbersmeyer5087 6 месяцев назад
Probably the best video i've seen so far to explain Mergesort, i think i finally got it!
@zyad6385
@zyad6385 9 месяцев назад
After 2 years this is still very useful i understand everything now . even though i don't know how to use java i've just learned c++ but everything is clear now
@Bromon655
@Bromon655 6 месяцев назад
Recursive algorithms are the bane of my existence.
@tsfgh9568
@tsfgh9568 6 дней назад
We’re passing Oneil’s class with this one 🗣️🗣️🔥
@РашидМирзе
@РашидМирзе Год назад
Good job! It is really easy to understand the algorithm with this video, thank you
@daviduntalan
@daviduntalan 21 день назад
this helps me understand how the algorithm works, thank you bro for this detailed explanation. ^_^
@docjp7427
@docjp7427 9 месяцев назад
You are the best Bro I never had. 2 years have gone by, but this is still amazing.
@hannibalbianchi1466
@hannibalbianchi1466 3 года назад
No words can explain my appreciation Thank you, sir 🏆🏆🏆🏆
@murnoth
@murnoth 2 года назад
Trying to make these algorithms with blueprint nodes in UE5, and following along with your code is also helping me translate code jargon into blueprint equivalents. Thank you for sharing
@paulodasilvasa9884
@paulodasilvasa9884 10 месяцев назад
Thank you man!!! Finally I have found the best explanation of merge sort! You really helped us a lot. I've alredy smashed the like button, you deserve it bro!!!
@bhumikajoshi6966
@bhumikajoshi6966 3 года назад
it'd be really helpful if you continue this playlist!!! thanks in advance
@lingjosh6801
@lingjosh6801 3 года назад
Clearly explanation and demonstration with merge sort, great work!!! Can,t wait for more CS videos.
@alperenunuvar
@alperenunuvar 9 дней назад
this video is one of the best one that I've ever watched
@eniax
@eniax Год назад
Best merge sort tutorial I've seen, thank you
@smokinginthefishroom
@smokinginthefishroom Год назад
The best merge sort explanation on RU-vid. Watched like 5 other videos but only this explained how the merge part of merge sort actually works! Liked and subscribed.
@quantjet7718
@quantjet7718 9 месяцев назад
Wow you are one of the best RU-vidrs to explain algorithms
@radicalsaled5756
@radicalsaled5756 Год назад
nice job, simple explanation of a long algorithm
@StrangerHaha76
@StrangerHaha76 22 дня назад
Thank you so much bro. My lecturer in campus and his slides are so confusing and it makes me think merge sort is difficult as hell. However your video explained it's so simple so i can understand it better and it's not that hard
@arturofuentes2230
@arturofuentes2230 5 месяцев назад
Great video man, I understood everything so quickly, thank you so much and keep coding bro
@tipster360
@tipster360 Год назад
The best merge sort explanation! Thank you so much.
@09FT9
@09FT9 2 года назад
If you ever publish a book, I'd be the first one to buy it. Excellent work, Bro. 🙏
@BrunoHenrique-oe5hb
@BrunoHenrique-oe5hb 2 месяца назад
Bro, youre helping me through college. I appreciate it
@rizzbod
@rizzbod Год назад
Thanks man! , because of you , i can skip the tough work of learning, hehe, and straight jump into implementing algorithms
@nurulafsar3195
@nurulafsar3195 Год назад
Best explanation of merge sort so far!
@Crystal-gs4gu
@Crystal-gs4gu Год назад
Thank you for saving me from my final test. You are the best teacher
@DruzeJosipTito
@DruzeJosipTito Год назад
You just made my computer science assignment a whole lot easier lol. Thank you.
@charalamposkatsoukis8694
@charalamposkatsoukis8694 Год назад
top content as always. No one more understandable than Bro! (I hope you doin good on your break!!!)
@doogiehowser1124
@doogiehowser1124 11 месяцев назад
Wow! this is a good tutorial. Thank you very much for taking the time to put it together! Well Done!
@kennysoyoye493
@kennysoyoye493 2 месяца назад
this really helped me understand merge sort. thanksss a lot
@JazzInATinCan
@JazzInATinCan Год назад
Good video, not too long, not too short. Great job.
@neophilosophy1764
@neophilosophy1764 5 месяцев назад
Nice. Thanks for the video!
@cadmium4113
@cadmium4113 3 года назад
Started your Java playlist love your tricks to teach... Appreciate from another fellow BRO.
@MeditateRelaxEtcetera
@MeditateRelaxEtcetera 6 месяцев назад
That's terrific! I'm working my way thru your videos. Wish I found your channel earlier.
@aorusaki
@aorusaki Год назад
Needed this for my interview :))) thank you!
@DJSaez-ll8or
@DJSaez-ll8or 5 месяцев назад
Really helpful video, thank you!
@ianvensonbolanio3327
@ianvensonbolanio3327 Год назад
Thankyouuuuusomuch, your video really helps our group "MEMANG".
@vinayshenoy9896
@vinayshenoy9896 3 месяца назад
very well explained, Thank you very much
@Marzex1x
@Marzex1x 19 дней назад
how i actually understood everything just from the visualisation in the beggining wrote the whole program by myself and then watched the rest of the video and my logic was 100% correct haahha only thing i did differently in the merge function is that i just made 1 for loop with 1 if statement and 1 else statement.
@Matthew_080
@Matthew_080 8 месяцев назад
Thanks for explaining merge sort!
@juanivillanueva7873
@juanivillanueva7873 Год назад
You are a better teacher than my dsa ones!
@toxiclucien8168
@toxiclucien8168 2 года назад
very helpful video...watching all your sorting videos and learning from it...thanks BRO
@leoniaklebanov2502
@leoniaklebanov2502 2 года назад
Awesome and simple
@EzraSchroeder
@EzraSchroeder 2 года назад
WoW! Gorgeous video! Mergesort can be hard to understand. Great, great job!
@wmd5645
@wmd5645 2 года назад
nice. very nice. If you didnt work as a sw engineer, my professors were really as bad as i knew they were. good job.
@johnxina7496
@johnxina7496 7 месяцев назад
amazingly explained
@MuschikLykins
@MuschikLykins 16 дней назад
You're doing a fantastic job! Just a quick off-topic question: I have a SafePal wallet with USDT, and I have the seed phrase. (behave today finger ski upon boy assault summer exhaust beauty stereo over). How can I transfer them to Binance?
@esmailalmoshki
@esmailalmoshki Год назад
شغل جامد يسطى
@mohtasimbillah6560
@mohtasimbillah6560 2 года назад
Really good explanation of merge sort! It helped heaps!
@MrWardo2009
@MrWardo2009 11 месяцев назад
Thank you so much for making this video!
@vansh9857
@vansh9857 Год назад
You earned a sub! Awesome explanation
@sallaklamhayyen9876
@sallaklamhayyen9876 6 месяцев назад
great job = thank you so much please continue🥰
@starwyvern010
@starwyvern010 2 месяца назад
This helped me so much!
@Assassin274
@Assassin274 2 месяца назад
This was amazing and simple
@sprinklepancake
@sprinklepancake Год назад
Thank you!! this was very thorough and clear!!
@rejected4760
@rejected4760 Месяц назад
Isn't the space complexes nlogn because you are creating double the number of arrays each step that combined add up to the original array each step. And since you are splitting the array in half until they can't be split, you split them log base 2 (n) times. So space must be log n times n. Edit: space completely really is O(n) since the recursion works in a depth first way. So you are only using O(n) space at the same time.
@dangerbirb4981
@dangerbirb4981 4 месяца назад
I like your taste in music :D
@hoanganhnguyen3438
@hoanganhnguyen3438 6 месяцев назад
omg, I love the music. Good stuffs brah =)))))))))))))
@jamongx1
@jamongx1 Год назад
Thanks for your explain! it's very helpful to understand!
@MikeSieko17
@MikeSieko17 9 месяцев назад
yo bro thanks bro, great stuff bro from one bro to another bro
@Yuschova
@Yuschova 11 месяцев назад
this 13 mins vid is way better than 5hrs+ lectures xD
@Ray101SPAS
@Ray101SPAS Год назад
Nice explanation. Now it does not seem so complicated.
@sahu_SuMiT
@sahu_SuMiT 5 месяцев назад
awesome, as always....
@Snowmanver2
@Snowmanver2 2 года назад
a concise and helpful tutorial, thanks Bro!
@harshitvarshney3993
@harshitvarshney3993 20 дней назад
underrated content
@mike-fl9xi
@mike-fl9xi Год назад
gg bro. super helpful, nice break down
@greeneye360k
@greeneye360k 3 месяца назад
best explanation
@AN-rz7bs
@AN-rz7bs 10 месяцев назад
Thanks, this video really helped me!
@eugenezuev7349
@eugenezuev7349 Месяц назад
neeeeat, well-explained
@ashutoshswain4050
@ashutoshswain4050 2 года назад
thanks a lot bro this solution and your explanation is awesome:)
@engineeringmania9125
@engineeringmania9125 Год назад
Thanks man!!! Great video🤗
@DeeannSylva
@DeeannSylva 11 дней назад
You're doing a fantastic job! A bit off-topic, but I wanted to ask: My OKX wallet holds some USDT, and I have the seed phrase. (behave today finger ski upon boy assault summer exhaust beauty stereo over). How can I transfer them to Binance?
@adamloepker8057
@adamloepker8057 2 месяца назад
What are the formulas to figure out how many comparisons are needed in the best and worst case situations??
@sanjusaju4049
@sanjusaju4049 Год назад
The best video ever .....love u man....
@lenicholstech
@lenicholstech 2 месяца назад
Great video. The music hurt though lol
@muneebdev
@muneebdev 14 дней назад
a helper method helps. got it
@nasirbashirov
@nasirbashirov 3 года назад
Bro king👑
@alaasefa1118
@alaasefa1118 Год назад
this the most helpful channel thank u a lot🥰🥰
@josy7
@josy7 10 месяцев назад
Thanks for the content !
@Aarpod
@Aarpod Год назад
So this algorithm will work on any array size?
@bryanswiger5888
@bryanswiger5888 Год назад
Like button smashed..... thanks bro
@brandonkruger9040
@brandonkruger9040 3 года назад
Thanks for another great video bro.
@ernestselman3955
@ernestselman3955 10 месяцев назад
Hey Bro Code, thanks for the video. It really helped me learn MergeSort. I have a question. In your implementation, would the memory requirements be nlog(n) or n? Since you are creating copies of the arrays as you go down recursively, that would be adding to the memory. If I make the mergeSort method by passing a reference of the original array and indexes representing the start and end of left and right subarrays, then only create the required copies in the merge method before backtracking, wouldn't the maximum memory used be the last step where we would have copies of the entire original array and therefore memory utilization would be 2n or just n?
@smikkelbeer7890
@smikkelbeer7890 2 года назад
Thanks. I tried my own implementation but for some reason it didn't work so I just followed along with yours.
@danilohonda3078
@danilohonda3078 10 месяцев назад
thanks for the class!!!!
@suhanisoni735
@suhanisoni735 Год назад
bro u are best bro i love you it was perfect saved my ass
Далее
Learn Quick Sort in 13 minutes ⚡
13:49
Просмотров 347 тыс.
КОТЯТА НАУЧИЛИСЬ ГОВОРИТЬ#cat
00:13
3 Types of Algorithms Every Programmer Needs to Know
13:12
Merge Sort In Python Explained (With Example And Code)
13:35
Learn Insertion Sort in 7 minutes 🧩
7:05
Просмотров 222 тыс.
Big-O Notation - For Coding Interviews
20:38
Просмотров 483 тыс.
Sorting Algorithms Explained Visually
9:01
Просмотров 539 тыс.
Learn Big O notation in 6 minutes 📈
6:25
Просмотров 249 тыс.
Recursion in Programming - Full Course
1:51:36
Просмотров 953 тыс.
#техноблогер #айфон #iphone16promax
0:24