Merge Sort Algorithm | How Merge Sort Works (Example Diagram) | Part - 1 | Sorting Algorithms - DSA
Вставка
- Опубліковано 3 жов 2024
- Understand or Merge Sort sorting algorithm works with easy example & visual diagram. We will dry run the merge sort algorithm step by step by taking a diagram example to understand the flow of the algorithm at every step.
Theory -
1. Merge Sort is a Divide and Conquer algorithm.
2. It divides input array in two halves, calls itself for the two halves(recursively) and then merges the two sorted halves.
3. A separate merge() function is used for merging two halves.
4. Merge sort is one of the most efficient sorting algorithms.
5. Time Complexity: O(nlog(n))
---------------------------------------------------------------------------------------------
Full DSA playlist - • Introduction to Data S...
Full Code & Theory article - simplesnippets...
C++ Programming Tutorials for Beginners Course - • Introduction to Comput...
---------------------------------------------------------------------------------------------
Support Simple Snippets by Donations -
Google Pay UPI ID - tanmaysakpal11@okicici
PayPal - paypal.me/tanmaysakpal11
---------------------------------------------------------------------------------------------
Simple Snippets Official Website -
simplesnippets....
Simple Snippets on Facebook -
/ simplesnippets
Simple Snippets on Instagram -
/ simplesnippets
Simple Snippets on Twitter -
/ simplesnippet
Simple Snippets Google Plus Page -
plus.google.co...
Simple Snippets email ID -
simplesnippetsinfo@gmail.com
For More Technology News, Latest Updates and Blog articles visit our Official Website - simplesnippets....
#mergesort #sortingalogrithms #dsa #divideandconcquer #algorithms
Best explaination of the recursion part..... haven't seen this much detailed explanation for recursion in any other UA-cam video
Thank you so much buddy🙏 Please support me by sharing the videos and our channel with your friends too. Thats the biggest help and support you can provide 😇
You are true bro ...
Yes, agreed. So many simple overviews out there that don’t give the true flow of the recursion, which results in a total misunderstanding of how recursion works in general. But this explanation is Outstanding!!! Thanks very much.
100% TRUE NO BODY EXPLAINED ABOUT RECURSION EXPECT YOU
Such a premium content.
Even expensive courses are not upto this level.
Keep up the good work man!
U have talent in such a way that even a beginner can understand the concept so clearly.Thank you so much.God Bless💯☺️
Thanks a lot 😊 It would mean a lot if you could please share our channel and videos with your friends too ✌
@@SimpleSnippets Sure Bro!! I have a small request please make more videos on file handling and exception handling in c++
Spent 4 days, understanding this algorithm, most other video gives theoritcal concept without the in-depth analysis, your video is best because the way you explained the pause part that's where I could not go forward initially. You are meditative.
Glad it helped! Thanks for such a wonderful feedback Dinesh. Means a lot. Please support me by sharing the videos with your friends too!
I don't know why this video is underrated. This video is very deep and clear. He showed what is happening behind the scenes which many teachers on youtube did not explained in their videos and had so much views.
Great Job man. I was looking for this kind of explanation.
Thanks Shivam. Really glad to see such genuine appreciation and feedback♥️😊
yes. you are right
I watched this one year ago and came here back today and I must say you are great sir! Thank you, your channel definitely deserves more subscribers, views and likes, always count on my support❤️
I just finished my Data Structures course and wanted to explore algorithms in my free time, beautiful explanation. You explain these concepts like a university professor!
*better than university professor
Great to hear!
I've searched all merge sort videos on youtube, but could not find a better one. Best recursion explanation ever.
Literally the best video on the internet for merge sort. Amazing!!!!
After watching 2-3 tutorials on same topic it wasn't cleared but now it's cleared thanks for such a great explanation.
Very Explained and in-depth solution of Merge Sort Algorithm !
Thank You Very Much !
No words to say , i think some people have kind of special gift, if they explain everyone will understand . You are one of them
Thank you so much Puneeth bro this means a lot 🙏 Please support me by sharing the videos and our channel with your friends too. Thats the biggest help and support you can provide 😇
Best explanation among the available merge sort explanations on UA-cam
Uff!! finally watched 52min video in 2hour in single sitting 😅 thank you so much for clearing my whole confusion on recursion and merge sort ❤️❤️ god bless you brother!
I literally watched all other youtubers videos..i guess i watched atleast 7 to 8 videos but didnt understood perfectly..but by your 1 video the concept is totally clear to me. ..thanks for this amazing video😍
Best recursion Explaination and this is how a beginner can understand very clearly.
Jazakallah.. I couldn't find a better explaination anywhere
I have to do a presentation in class about this algorithm and I stubled unpon your video trying to understand it better. I have to say, this is one of the best explanations I have ever heard about anything. Great job man, going through all the steps the program go through was REALLY helpful. Have a great day.
This explanation is insane. This is what i was looking for few days. Best dry run ever. I saw so many video they just divided the array and said thats what we have to do but didn't explained the flow . Hatss of brother.
I am glad you liked it! Please do share the video with your friends too!
Now, I have a clear understanding of mergesort. I watch a lot of merge sort videos, but this clears all my doubts.
I'm glad to hear this from you Manas, please share and support my channel ✌️
Buddy, you made it very easy to understand. Never seen such a simplified dry run for merge sort! Keep going!
Always returning when I need a refresher on merge sort. Thanks again! I hope you continue to upload.
The effort that you give to explain each and every line is of GOD LEVEL. THANKS A LOT
Thanks Gargi 🙏🤩
best explanation of merge sort.....now i have got clear understanding of merge sort
thanks for this help
Even a noob can understand merge sort from this video. Keep doing the good work brother 🙏
this is by far the best explanation, i was confused with the recursion and this video helped me
Man .. this Dry code helps a lot. and clear everything. Love u man. I was searching for this kind of video and you have the best one indeed. please keep it up you are helping so many students
This is the best video I've seen about this algorithm! Thanks for posting.
I had to take 2 naps to complete this video, but glad I understood everything soooo well, Thank you soooo muchh!
Damn thats a lot of napping in between but its great that you understood it regardless of the breaks 😇
Tanmay: "Make sure to keep your phones aside."
Me watching this on phone:
'Error 401'.
Lol 😂
Woww I have no words.... this is a master class, Thank you.
Sir,,
Dil ❤️ se like kiya....
thank you..... for this wonderful explaination.....
I know , clicking on the ads is how much required
, so I always click on the ads that come in your videos....
Thats really great to know buddy🙏 Please support me by sharing the videos and our channel with your friends too. Thats the biggest help and support you can provide 😇
@@SimpleSnippets I will surely support and promote your channel....
don't worry.... I will be glad by supporting you....
don't worry...I will refer your channel in every social network sites.....
Very much helpful. THANKS for making it easy for us.
One like isn't enough for this.
Superb explanations.
Thank you so much 😀
Thank you so much!!! This is exactly what I was looking for. I had seen many implementations of Merge Sort, but I had not understood how it was actually manipulating the array, and now I have a clear idea of what is actually happening. I wish you the best!
Glad it was helpful!
Dude I was suffering just cause of this merge function..... for the past 3 days Or so...... You're a life saver bro...
A grand salute to u brother for an efficient explanation.........Time Complexity Of Understanding- (n log n) same as merge sort.
Tanmay sir , its an overwhelming moment for me , as i was trying to understand this from a long time and this was the video which made me understand the dry run of the code, tysm sir..
Thank You So Much Sir for such a wonderful explanation. I was very confused while doing the dry run of the merge sort. Now, after watching your video, I have no doubt regarding merge sort. You have made a premium content.
My tutor, thank you so much for helping me to fully understand this algorithm. I bought a course online, I don't want to name the site but the tutor could not explain like you did. Trust me your channel is worth sharing and I will share it on my Social media with friends. God bless you!
Thank you so much Albert. I'm very happy to hear this from you buddy. 😊 My tutorials are free for everyone. Please share them with everyone you know. That's the biggest support ✌️
@@SimpleSnippets the pleasure is truly mine!
Wow litrally wow What a explanation!!! This is the best explanation .Thank You very much Sirg
This video is the best I’ve seen finally !!! You are a blessing thanks
Thanks a lot Sir. Because of merge sort I hated recursion a lot. Despite knowing how recursion works, I failed to figure that out for merge sort. But today you made me love the concept of recursion.
One of the best recursion explanations on this platform. And Merge Sort algorithm explanation was 🔥🔥🔥
Glad you think so! Thanks bro, please do share the videos & our channel with your friends too. Thats the biggest help and support you can give back to this channel! 😇
It's really helpful for the people who want to know about the merge sort.. thank you
Bro thank you so much whenever i get stuck in any coding problem you are my go to channel thank you so much god bless
Amazingly explained. Thank you so much
You give the best and smallest array that explain every piece of code
Thanks a lot 🙏
the best explanation ever.
such a premium content, you just deeply explained the concept. thankyou sir.
Most welcome Himanshu. I'm glad you liked the quality of the content 😊❤️
Thank You Very much . Finally understood this concept . May God bless U.
Hats off!
This is the best explanation on UA-cam.
Thanks.
Happy to hear this from you :-)
this is the best explanation ive ever come across
thanks a mill to u 👏👏👏
Thank you 🙏
Much appreciated.... Hat's off to your patience level....👏👏👏👏 Thank you so much for this detailed explanation
great video, you really explained this well. The walk through and step by step repetitiveness of your explaining really made this as easy as it could be to understand.
best video on merge sort ever the explain is too good.
You helped me to gain my confidence in DSA bro....Love you a lot
So much detailed explanation of the recursive functions! Badly wanted them: Thanks!
Thank you very much. A step by step explanation on what the computer does in this code which is very helpful to me and to many people. I cant thank you enough. Hope you make more videos
really appreciate your way of teaching,
hats off
thank you so much for a detailed dry run of the code
Thank you sir,finally I found the explanation of recursively part
For the last two days, I was stuck in the merge sort. I watched many videos but the merge algorithm was not clear to me. Finally, I found your video and the dry run of each level helped to understand the complete merge sort algo clearly. Thank you so much for your effort. We are much obliged to you, bro.
Thank you so much for such wonderful feedback :-)
Have watched many videos for understanding the Merge and recursion concept and finally found the right one 👍🏻
Great to hear this Dinesh! Check out the DSA playlist for more. I think you will like it!
you are just unbelievably good keep up and thank you
vow... perfect teaching... I am a basic learner of cpp, but ur way of teaching makes me get more interested in cpp
man you saved my life, thank you so much.
thankyou so much to to make such detail working of merge sort from last 2 days i was not understanding the merge sort working , but now i found your video and literally it cleared all my doubts, thankyou very much.....
Very happy to hear such a wonderful feedback from you 🙏❤️ please do share the video and channel with your friends too. That's the biggest support you can give back 😊
best explanation in youtube i would recommend it to my colleagues , thank you very much
Thank you for the positive feedback. Glad you liked my explanation and thank you so much for sharing it with your colleagues!
Best explanation on the recursion part
Thankyou very much
How merge sort work is very difficult to understand but you are ❤️❤️❤️❤️
best explanation of merge sort
PERFECTION ,that's what this channel is .......
The way you teach is second to none 💯🔥💯🔥
KEEP IT UP !!
Dayum son 🔥❤️ thanks bro 😊 this is too big compliment for me 🙏 Means a lot 😊✌️
Best explanation!!!
Thank you so much Tanmay
This video was amazing !!!.. Easy explanation, Thank You
Best explanation, after searching for many videos , I finally understood the concept behind merge sort algorithm, step by step❤️🙏
Glad to hear that
Love you man, this video helped me in understanding merge with recusion. 💯% satisfied and 💯% recommended
insane bro...practically insane.Keep up the good work and thanks a lott
Thanks, will do!
I assure you I have watched lots of videos to understand the flow of execution :D and this is simply the best one, thank you bro !
u saved me like hell .....thank u very much
Thanks for making merge sort so easier to understand. Thanks a lot!!!!😊
Glad it was helpful!
great explaination as i anot from IT background and new to this ALGOrithm..thanks a lot and keep up the good work
Great explanation.... I haven't seen this much deep explanation of recursion on youtube or on any other platform... Well done
Wtf 53 mins have already passed... Whoa!!! This is the best explanation of MERGE SORT out there. Thanks a ton, buddy :)
love it man ,i got the idea of solving within first 15min of ur video .Great man great work.
Thats amazing bro! Please support me by sharing the videos and our channel with your friends too. Thats the biggest help and support you can provide 😇
Thank you so much sir for this helpful video. now I could clear my concept of merge sort which was very confused for me.
Thanks a lot again.
Amazing explanation! Thank you very much!!
thankyou so much sir to make me clear this concept in a simple way
Bro you are awesome .Hats off to your teaching skills. ❤
No Wonder software developers an engineers are paid a lot of money, you guys are wicked smart. Best explanation ever
Thank you so much buddy. It would mean a lot if you could please share our channel and videos with your friends too ✌
You‘re doing gods work right there! I‘m getting closer to my Algorithms and Datastructures exam and I was struggling so hard with the recursion. I do understand the MS-algorithm now. After this video I will watch your vid regarding the quick sort algorithm. Thank you from Germany.
Happy to know my video helped you! Keep growing!
amazing and really well explained.
even after explaining, I know how much struggle it takes to edit n all to create a masterpiece like this
Glad it was helpful! And yes it takes a lot of time to make these videos!
Great Video Sir !! Excellent Explanation
Thank you so much, sir, for this wonderful explanation.
Hi bro, Your Tutorial and the way of explaining everything is amazing. I really liked you Dry Run explanation it was so easy and transparent to go with the algorithm step by step. Keep it up and Hope, more interesting and exciting videos with better explanation will come soon, I am eagerly waiting for your videos. Thank you😊
Thank you so much bro😊 this was such a great feedback. And yes when it comes to data structures and algorithms, the best way to understand is to dry run each step & maybe even do it visually with diagrams. That's how we understand exactly what's going on behind the scenes. Also yes more videos coming soon ✌️ please do share the videos with your friends too ✌️😊
Well said
Thank you For simple explanation ... I really enjoyed this video
Glad you enjoyed it! Please support me by sharing the videos and our channel with your friends too. Thats the biggest help and support you can provide 😇
Amazing video. Wow. This really helped me understand what's happening at each step and level. Flawless explanation. Thank you
Thanks Mike! Glad you liked it 😁
This is beautifully explained
My youtube feed consists only of 2 tanmay - Tanmay Sakpal and Tanmay Bhatt. Both are legends.
Aare bhai bhai 🙏❤️ thank you so much 😊
Thank you so much for making this video, Its absolutely superb.
no one can explain it better than explained by you.these videos are quite amazing.....best channel
Thank you so much 😀