Merge Sort Algorithm | How Merge Sort Works (Example Diagram) | Part - 1 | Sorting Algorithms - DSA

  Рет қаралды 102,174

Simple Snippets

Simple Snippets

4 жыл бұрын

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.tech/merge-sor...
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.tech/
Simple Snippets on Facebook -
/ simplesnippets
Simple Snippets on Instagram -
/ simplesnippets
Simple Snippets on Twitter -
/ simplesnippet
Simple Snippets Google Plus Page -
plus.google.com/+SimpleSnippets
Simple Snippets email ID -
simplesnippetsinfo@gmail.com
For More Technology News, Latest Updates and Blog articles visit our Official Website - simplesnippets.tech/
#mergesort #sortingalogrithms #dsa #divideandconcquer #algorithms

Пікірлер: 476
@sayansadhukhan9692
@sayansadhukhan9692 4 жыл бұрын
Best explaination of the recursion part..... haven't seen this much detailed explanation for recursion in any other KZfaq video
@SimpleSnippets
@SimpleSnippets 3 жыл бұрын
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 😇
@sakshamdwivedi2527
@sakshamdwivedi2527 2 жыл бұрын
You are true bro ...
@BrettPenza
@BrettPenza 2 жыл бұрын
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.
@AnkammaRaoJ
@AnkammaRaoJ Жыл бұрын
100% TRUE NO BODY EXPLAINED ABOUT RECURSION EXPECT YOU
@afrozanjum5086
@afrozanjum5086 2 жыл бұрын
Such a premium content. Even expensive courses are not upto this level. Keep up the good work man!
@gorrepatimadhu6025
@gorrepatimadhu6025 3 жыл бұрын
U have talent in such a way that even a beginner can understand the concept so clearly.Thank you so much.God Bless💯☺️
@SimpleSnippets
@SimpleSnippets 3 жыл бұрын
Thanks a lot 😊 It would mean a lot if you could please share our channel and videos with your friends too ✌
@gorrepatimadhu6025
@gorrepatimadhu6025 3 жыл бұрын
@@SimpleSnippets Sure Bro!! I have a small request please make more videos on file handling and exception handling in c++
@tusharyadav2839
@tusharyadav2839 4 жыл бұрын
Tanmay: "Make sure to keep your phones aside." Me watching this on phone: 'Error 401'.
@SimpleSnippets
@SimpleSnippets 4 жыл бұрын
Lol 😂
@lobstermaster9515
@lobstermaster9515 2 ай бұрын
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.
@souravnaik6355
@souravnaik6355 3 жыл бұрын
Even a noob can understand merge sort from this video. Keep doing the good work brother 🙏
@albertdavidbangura7271
@albertdavidbangura7271 2 жыл бұрын
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❤️
@ajaypathak2214
@ajaypathak2214 3 жыл бұрын
After watching 2-3 tutorials on same topic it wasn't cleared but now it's cleared thanks for such a great explanation.
@shapind
@shapind 4 жыл бұрын
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!
@rachitvaghani4468
@rachitvaghani4468 Жыл бұрын
Buddy, you made it very easy to understand. Never seen such a simplified dry run for merge sort! Keep going!
@muhammadikramah1092
@muhammadikramah1092 2 ай бұрын
Very Explained and in-depth solution of Merge Sort Algorithm ! Thank You Very Much !
@mubashir9659
@mubashir9659 2 жыл бұрын
Jazakallah.. I couldn't find a better explaination anywhere
@hariprabhu4682
@hariprabhu4682 2 жыл бұрын
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😍
@yashsonawane905
@yashsonawane905 2 жыл бұрын
Wtf 53 mins have already passed... Whoa!!! This is the best explanation of MERGE SORT out there. Thanks a ton, buddy :)
@shubhamsaurabh8412
@shubhamsaurabh8412 3 жыл бұрын
A grand salute to u brother for an efficient explanation.........Time Complexity Of Understanding- (n log n) same as merge sort.
@rayyanamir8560
@rayyanamir8560 Жыл бұрын
I've searched all merge sort videos on youtube, but could not find a better one. Best recursion explanation ever.
@DineshKumar-lq2ck
@DineshKumar-lq2ck 3 жыл бұрын
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.
@SimpleSnippets
@SimpleSnippets 3 жыл бұрын
Glad it helped! Thanks for such a wonderful feedback Dinesh. Means a lot. Please support me by sharing the videos with your friends too!
@gargikar1355
@gargikar1355 2 жыл бұрын
The effort that you give to explain each and every line is of GOD LEVEL. THANKS A LOT
@SimpleSnippets
@SimpleSnippets 2 жыл бұрын
Thanks Gargi 🙏🤩
@fernandosalas4885
@fernandosalas4885 3 жыл бұрын
Woww I have no words.... this is a master class, Thank you.
@andrecavallin7535
@andrecavallin7535 2 жыл бұрын
Amazing explanation! Thank you very much!!
@arpanpaul6910
@arpanpaul6910 3 жыл бұрын
So much detailed explanation of the recursive functions! Badly wanted them: Thanks!
@sudipc9880
@sudipc9880 3 жыл бұрын
Best recursion Explaination and this is how a beginner can understand very clearly.
@Isaac-dv6po
@Isaac-dv6po 2 жыл бұрын
This video is the best I’ve seen finally !!! You are a blessing thanks
@vaishnavipamulapati9920
@vaishnavipamulapati9920 2 жыл бұрын
thank you so much for a detailed dry run of the code
@jaisha_tariq4815
@jaisha_tariq4815 2 жыл бұрын
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.
@groovyrabbit8309
@groovyrabbit8309 2 жыл бұрын
This is the best video I've seen about this algorithm! Thanks for posting.
@raycosmos
@raycosmos 2 жыл бұрын
Literally the best video on the internet for merge sort. Amazing!!!!
@anirudhgoud9380
@anirudhgoud9380 2 жыл бұрын
Amazingly explained. Thank you so much
@jayap8355
@jayap8355 2 жыл бұрын
Best explanation!!! Thank you so much Tanmay
@pushpenbikashgoala5326
@pushpenbikashgoala5326 2 жыл бұрын
Best explanation among the available merge sort explanations on KZfaq
@heisen7695
@heisen7695 2 жыл бұрын
really appreciate your way of teaching, hats off
@Pr3kashSingh
@Pr3kashSingh 2 жыл бұрын
Thank You Very much . Finally understood this concept . May God bless U.
@uttareshwargaikwad8564
@uttareshwargaikwad8564 2 жыл бұрын
Tysm Sir the way you teach is just amazing.
@rabiulrabi9933
@rabiulrabi9933 2 жыл бұрын
This video was amazing !!!.. Easy explanation, Thank You
@genuinegirl4977
@genuinegirl4977 Жыл бұрын
Very much helpful. THANKS for making it easy for us.
@md.yasinarafathpiyal2217
@md.yasinarafathpiyal2217 2 жыл бұрын
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
@saddamal-azab7154
@saddamal-azab7154 2 жыл бұрын
You give the best and smallest array that explain every piece of code Thanks a lot 🙏
@hey_chuck3931
@hey_chuck3931 2 жыл бұрын
Thank you for this excellent explanation!
@elirhm5926
@elirhm5926 Жыл бұрын
man you saved my life, thank you so much.
@-VISHWAJEET_CHAVAN
@-VISHWAJEET_CHAVAN 2 жыл бұрын
best explanation of merge sort.....now i have got clear understanding of merge sort thanks for this help
@nitismita1035
@nitismita1035 2 жыл бұрын
Brilliant work, thank u Sir ❤. Love you
@naine7th33
@naine7th33 Жыл бұрын
this is by far the best explanation, i was confused with the recursion and this video helped me
@deepaksingh-si1rk
@deepaksingh-si1rk Жыл бұрын
best video on merge sort ever the explain is too good.
@sdloopproject6693
@sdloopproject6693 2 жыл бұрын
the best explanation ever.
@30secondsEmotions
@30secondsEmotions 4 жыл бұрын
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....
@SimpleSnippets
@SimpleSnippets 4 жыл бұрын
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 😇
@30secondsEmotions
@30secondsEmotions 4 жыл бұрын
@@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.....
@dhonddevameya2362
@dhonddevameya2362 3 жыл бұрын
You helped me to gain my confidence in DSA bro....Love you a lot
@shivamvashisth9740
@shivamvashisth9740 2 жыл бұрын
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.
@SimpleSnippets
@SimpleSnippets 2 жыл бұрын
Thanks Shivam. Really glad to see such genuine appreciation and feedback♥️😊
@rayyanamir8560
@rayyanamir8560 Жыл бұрын
yes. you are right
@AnkitKumarUEE
@AnkitKumarUEE 3 жыл бұрын
Great Video Sir !! Excellent Explanation
@dtalmood
@dtalmood 2 жыл бұрын
Thank you so much for making this video, Its absolutely superb.
@omarrojouleh8592
@omarrojouleh8592 Жыл бұрын
you are just unbelievably good keep up and thank you
@femi_alogba
@femi_alogba 2 жыл бұрын
This is beautifully explained
@sMKUMARSAISKLM
@sMKUMARSAISKLM 2 жыл бұрын
Thank you so much, sir, for this wonderful explanation.
@nagamanidangeti4848
@nagamanidangeti4848 Жыл бұрын
It's really helpful for the people who want to know about the merge sort.. thank you
@yaboiiprettyeyez
@yaboiiprettyeyez 3 жыл бұрын
Thank you very much for explaining this way! I appreciate you walking through the algorithm it very helped me to understand it at a fundamental level. Not enough quality content like this that i've found. I'm going to try it by hand myself now :)
@jedininja3603
@jedininja3603 3 жыл бұрын
No Wonder software developers an engineers are paid a lot of money, you guys are wicked smart. Best explanation ever
@SimpleSnippets
@SimpleSnippets 3 жыл бұрын
Thank you so much buddy. It would mean a lot if you could please share our channel and videos with your friends too ✌
@umar1551
@umar1551 2 жыл бұрын
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
@apoorvashrivastava8873
@apoorvashrivastava8873 2 жыл бұрын
best explanation of merge sort
@manasupadhyay266
@manasupadhyay266 4 жыл бұрын
Now, I have a clear understanding of mergesort. I watch a lot of merge sort videos, but this clears all my doubts.
@SimpleSnippets
@SimpleSnippets 4 жыл бұрын
I'm glad to hear this from you Manas, please share and support my channel ✌️
@brandonlind5700
@brandonlind5700 Жыл бұрын
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.
@saisiva7606
@saisiva7606 2 жыл бұрын
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!
@rayyanamir8560
@rayyanamir8560 2 жыл бұрын
*better than university professor
@SimpleSnippets
@SimpleSnippets 8 ай бұрын
Great to hear!
@your-Space
@your-Space 3 жыл бұрын
One like isn't enough for this. Superb explanations.
@SimpleSnippets
@SimpleSnippets 3 жыл бұрын
Thank you so much 😀
@roshanmayer
@roshanmayer 3 жыл бұрын
wow this is an amazing explanation, thank you very much
@rushikeshwani1417
@rushikeshwani1417 3 жыл бұрын
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..
@johnnybloom100
@johnnybloom100 Жыл бұрын
Great video, thank you!
@deepvoyager01
@deepvoyager01 Жыл бұрын
Love you man, this video helped me in understanding merge with recusion. 💯% satisfied and 💯% recommended
@6112arjun
@6112arjun 2 жыл бұрын
Thanks a lot , Tanmay sir
@iqbalhossain9370
@iqbalhossain9370 3 жыл бұрын
awesome explanation with detail. love you brother ❤️❤️
@ganeshKiD
@ganeshKiD 2 жыл бұрын
Wow litrally wow What a explanation!!! This is the best explanation .Thank You very much Sirg
@gokulnaathb2627
@gokulnaathb2627 2 жыл бұрын
This was amazing!!! Thank you so much, bhaiya, great efforts🙏💝
@vertika.5257
@vertika.5257 Жыл бұрын
good efforts !! , thanku ,smjh aa gya !
@aadeshjadhav3646
@aadeshjadhav3646 3 жыл бұрын
Great explanation.... I haven't seen this much deep explanation of recursion on youtube or on any other platform... Well done
@Everydayshorts913
@Everydayshorts913 2 жыл бұрын
i appretiate your efforts... thank you soo much
@sunitagarg1039
@sunitagarg1039 Жыл бұрын
you are a gem!
@NeerajSharma-yr8rv
@NeerajSharma-yr8rv 3 жыл бұрын
Wonderfully explained
@michaelgonzales8045
@michaelgonzales8045 Жыл бұрын
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
@swagatadas5121
@swagatadas5121 2 жыл бұрын
This is excellent explanation just wow 🔥
@yashyadav7927
@yashyadav7927 2 жыл бұрын
great explaination as i anot from IT background and new to this ALGOrithm..thanks a lot and keep up the good work
@prashantdiwakar9221
@prashantdiwakar9221 2 жыл бұрын
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.
@devinpowers1365
@devinpowers1365 2 жыл бұрын
I finally get recursion! thank you!!!!!
@rayvinlai7268
@rayvinlai7268 Жыл бұрын
Thank you sir,finally I found the explanation of recursively part
@Entertainment__360D
@Entertainment__360D Жыл бұрын
thankyou so much sir to make me clear this concept in a simple way
@tsepomkwebu5577
@tsepomkwebu5577 7 ай бұрын
Thanks for your time and effort 😃
@iantheodorejesalva8170
@iantheodorejesalva8170 3 жыл бұрын
So much effort in explaining the method, very appreciated man learned a lot from you
@puneethbs4151
@puneethbs4151 4 жыл бұрын
No words to say , i think some people have kind of special gift, if they explain everyone will understand . You are one of them
@SimpleSnippets
@SimpleSnippets 4 жыл бұрын
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 😇
@jamesnash9675
@jamesnash9675 2 жыл бұрын
you are the best...
@ayakhalife7721
@ayakhalife7721 2 ай бұрын
just what i was looking for thank you for your efforts👏
@aymansaleh1988
@aymansaleh1988 2 жыл бұрын
THan you very much realy the best explaination
@manishbaghel6091
@manishbaghel6091 3 жыл бұрын
I had a hard time understanding this concept for quite a while. But this video alone cleared them all and I think this 53 minte session was totally worth it .thanks for such awesome explanation and the hard work. Peace ☮️
@3111992akshay
@3111992akshay Жыл бұрын
If possible please make video on Backtracking or String combination. Thanks in advance. Love you Bro. I never ever seen in my life this kind of explanation on youtube. Only one line for you and you hardwork *Hats off to you* 👏 💐
@krishnaverma671
@krishnaverma671 2 жыл бұрын
Bro you are awesome .Hats off to your teaching skills. ❤
@wajeehayasin6419
@wajeehayasin6419 3 жыл бұрын
Highly recommended video wowwwwww
@swathiau4682
@swathiau4682 2 жыл бұрын
Much appreciated.... Hat's off to your patience level....👏👏👏👏 Thank you so much for this detailed explanation
@masumali8356
@masumali8356 Жыл бұрын
You are the best.....masum
@winniemumbi9607
@winniemumbi9607 2 жыл бұрын
Great stuff!!
@shriharshbankapur9666
@shriharshbankapur9666 2 жыл бұрын
Thank u sir, this was really helpful
@obinemeluemmanuel4712
@obinemeluemmanuel4712 3 жыл бұрын
This is very nice. I have spent days trying to unravel this mergesort. You have really explained it very well. Thanks bro
@cem9927
@cem9927 2 жыл бұрын
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 !
@SushilKumar-lf6vh
@SushilKumar-lf6vh 3 жыл бұрын
brother the way u explained it was fantastic 😊😊
@vcrohithutagonna2105
@vcrohithutagonna2105 3 жыл бұрын
Great man, nice work.....I'll do share it at my college group
@toufiqelahi1894
@toufiqelahi1894 3 жыл бұрын
man keep it up.......very well explained.....
Неприятная Встреча На Мосту - Полярная звезда #shorts
00:59
Полярная звезда - Kuzey Yıldızı
Рет қаралды 7 МЛН
Khóa ly biệt
01:00
Đào Nguyễn Ánh - Hữu Hưng
Рет қаралды 21 МЛН
когда повзрослела // EVA mash
00:40
EVA mash
Рет қаралды 3,6 МЛН
Luck Decides My Future Again 🍀🍀🍀 #katebrush #shorts
00:19
Kate Brush
Рет қаралды 8 МЛН
3 Types of Algorithms Every Programmer Needs to Know
13:12
ForrestKnight
Рет қаралды 455 М.
I gave 127 interviews. Top 5 Algorithms they asked me.
8:36
Sahil & Sarra
Рет қаралды 611 М.
Merge Sort Algorithm in Java - Full Tutorial with Source
23:02
Coding with John
Рет қаралды 170 М.
Неприятная Встреча На Мосту - Полярная звезда #shorts
00:59
Полярная звезда - Kuzey Yıldızı
Рет қаралды 7 МЛН