Learn Merge Sort in 13 minutes 🔪
Ғылым және технология
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: KZread Au...
===========================================================
Пікірлер: 233
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 System.out.print(array[i]+ " "); } } private static void mergeSort(int[] array) { int length = array.length; if (length
@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
3 жыл бұрын
@@syllight9053 Thank you Syllight!
@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
3 жыл бұрын
3 weeks making this *AND THERE'S A DISLIKE????*
@roysaka4475
3 жыл бұрын
Hi bro plsae reques Tutorial Python AndroidHelper. Music, recorder, voice mix, microfon. Call phone, game, calculator, google voice recorder, and others.. 🙏🙏🙏🙏🙏🙏 Plsee
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
Жыл бұрын
No. You are a bro now!!
@fsxanas90
2 ай бұрын
why the karen vibe tho lmao
@johndavis29209
Ай бұрын
@@fsxanas90 Why anything
@user-kn4oi9oh4i
5 күн бұрын
You are a bro! 👊
You are single-handedly teaching me programming/computer science. Thank you. Never change your teaching structure, because this method works really well.
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 !
Best explanation I've seen so far. The rundown at the beginning really helps. Thank you
The best merge sort explanation on KZread. Watched like 5 other videos but only this explained how the merge part of merge sort actually works! Liked and subscribed.
This is the best video I found on all youtube which explains Merge Sort properly. This video is the definition of Quality Content.
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
You made mergeSort look so simple and easy, thank you so much!
So clear. my professor did not have enough time to go over this in class. Now I understand everything about merge sort.
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
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!!!
Clearly explanation and demonstration with merge sort, great work!!! Can,t wait for more CS videos.
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
Probably the best video i've seen so far to explain Mergesort, i think i finally got it!
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.
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!
top content as always. No one more understandable than Bro! (I hope you doin good on your break!!!)
Good job! It is really easy to understand the algorithm with this video, thank you
Best merge sort tutorial I've seen, thank you
Idk you sounds more confident in recent new videos, keep going homie you still gotta reach more people👍
You are the best Bro I never had. 2 years have gone by, but this is still amazing.
it'd be really helpful if you continue this playlist!!! thanks in advance
The best merge sort explanation! Thank you so much.
Wow! this is a good tutorial. Thank you very much for taking the time to put it together! Well Done!
Best explanation of merge sort so far!
You just made my computer science assignment a whole lot easier lol. Thank you.
Thanks man! , because of you , i can skip the tough work of learning, hehe, and straight jump into implementing algorithms
Really good explanation of merge sort! It helped heaps!
Wow you are one of the best KZreadrs to explain algorithms
Started your Java playlist love your tricks to teach... Appreciate from another fellow BRO.
Thank you!! this was very thorough and clear!!
You earned a sub! Awesome explanation
very helpful video...watching all your sorting videos and learning from it...thanks BRO
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
a concise and helpful tutorial, thanks Bro!
Good video, not too long, not too short. Great job.
No words can explain my appreciation Thank you, sir 🏆🏆🏆🏆
Thank you for your amazing videos!!!❤️❤️❤️
Needed this for my interview :))) thank you!
Thank you so much for making this video!
Great video man, I understood everything so quickly, thank you so much and keep coding bro
Thank you for saving me from my final test. You are the best teacher
thanks for these videos ,we need them alot
Thanks man!!! Great video🤗
thanks a lot bro this solution and your explanation is awesome:)
great work, well explained!
Nice. Thanks for the video!
If you ever publish a book, I'd be the first one to buy it. Excellent work, Bro. 🙏
Thanks for your explain! it's very helpful to understand!
WoW! Gorgeous video! Mergesort can be hard to understand. Great, great job!
Recursive algorithms are the bane of my existence.
Really helpful video, thank you!
Thanks for another great video bro.
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?
nice job, simple explanation of a long algorithm
gg bro. super helpful, nice break down
You are a better teacher than my dsa ones!
Thanks, this video really helped me!
Great video! Now I understand it :)
omg, I love the music. Good stuffs brah =)))))))))))))
great job = thank you so much please continue🥰
Thanks for the informative video
this really helped me understand merge sort. thanksss a lot
Thanks for explaining merge sort!
Thanks Bro, you are the best!
Like button smashed..... thanks bro
yo bro thanks bro, great stuff bro from one bro to another bro
Thankyouuuuusomuch, your video really helps our group "MEMANG".
The best video ever .....love u man....
شغل جامد يسطى
very well explained, Thank you very much
nice. very nice. If you didnt work as a sw engineer, my professors were really as bad as i knew they were. good job.
Thanks for the content !
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 ?
That's terrific! I'm working my way thru your videos. Wish I found your channel earlier.
awesome, as always....
this the most helpful channel thank u a lot🥰🥰
Bro, youre helping me through college. I appreciate it
Nice explanation. Now it does not seem so complicated.
amazingly explained
Hey bro thanks for the video.
thanks for the class!!!!
Awesome and simple
This was amazing and simple
awesome explanation bro
Thank you brother!!!
Thanks. I tried my own implementation but for some reason it didn't work so I just followed along with yours.
Great video. Thanks
Bro king👑
thanks for the video :)
Thank you !
this 13 mins vid is way better than 5hrs+ lectures xD
legendary explanation
how do you deal with an uneven number of elements in an array when using mergesort?
I like your taste in music :D
amazing!
Does it only work for arrays with its size being an integer power of 2
Nice explanation
Big fan bro