7.7 Merge Sort in Data Structure | Sorting Algorithms| DSA Full Course

Поделиться
HTML-код
  • Опубликовано: 16 янв 2025

Комментарии • 1,7 тыс.

  • @reazahmedramim5904
    @reazahmedramim5904 6 месяцев назад +251

    this is for those, who are having the audio sync issue, download the video and then play it, the audio sync issue is actually from the youtube.

    • @abhishikth_777
      @abhishikth_777 6 месяцев назад +40

      The problem is still there even after we downloading it!!

    • @suheelhilal1614
      @suheelhilal1614 6 месяцев назад +7

      @@abhishikth_777 may be he is saying download it using external websites as mp4 and you might have downloaded the video in youtube

    • @abhishikth_777
      @abhishikth_777 6 месяцев назад +9

      @@suheelhilal1614 yess the problem is from youtube after downloading through external website the issue is cleared

    • @Satishdhumpala
      @Satishdhumpala 4 месяца назад +12

      the audio is delayed by 20 seconds , if you choose not download just put audio from mobile watch from laptop

    • @tej6015
      @tej6015 4 месяца назад +1

      it worked. Thank you!!!

  • @takeshiasahi5494
    @takeshiasahi5494 3 года назад +1671

    I may sound stupid but I literally cried when she started explaining the mechanism behind the algo in detain. This shows how bad our universities and colleges are, and the amount of trauma, so carelessly they burden us with. Thanks a lot, ma'am. you are a true legend.

    • @Fnaf-vh9cs
      @Fnaf-vh9cs 3 года назад +79

      waste of time we just need the piece of paper when we go search a job. I learn more from proper people making videos 'RUclips is a gold mine'

    • @gaunikasrivastava7851
      @gaunikasrivastava7851 3 года назад +55

      Jyada ho gaya bro

    • @hope-jh7bv
      @hope-jh7bv 3 года назад +41

      I know man. University makes me depressed 😭

    • @takeshiasahi5494
      @takeshiasahi5494 3 года назад +22

      @@gaunikasrivastava7851 bari naseeb vali ho app didi

    • @nnaa2875
      @nnaa2875 3 года назад +15

      Me too in the selection sort video like why nobody explain the tracing, my teacher just do it so quick and I can't get it at all even when I search in RUclips nobody explains the tracing part and the applying part is so easy like people we know how to replace numbers explain the hard part !!!

  • @vishakp89
    @vishakp89 9 месяцев назад +5

    This is one of the best explanations of merge sort there on the internet. Nobody has had it so comprehensive and detailed like her. kudos!

  • @derekdomnic4485
    @derekdomnic4485 5 лет назад +991

    THIS WAS BY FAR THE BEST EXPLANATION I'VE HEARD MA'AM. TOOOOOOO GOOD. Understood the whole concept by just watching it once. Keep up the good work :)

    • @Snakebloke
      @Snakebloke 4 года назад +4

      A-men, much clearer than any others I've seen.

    • @harjotsingh9894
      @harjotsingh9894 3 года назад +4

      I agree i saw many videos however i struglled while implementing the code.This one cleared all my doubts 36 min video is better than a 6 min animation.

    • @kavitharoyal9722
      @kavitharoyal9722 2 года назад +1

      Ppppp

    • @alexkim8965
      @alexkim8965 Год назад

      How she explains with a simple whiteboard with limited spaces are far superior than 6 min fancy animated videos that leave you with nothing after watching.

    • @aditianuskaghosh172
      @aditianuskaghosh172 11 месяцев назад +1

      Rote raho

  • @adyaandagastyasharma3202
    @adyaandagastyasharma3202 3 года назад +141

    I understood this today. After 13 years of graduation. :) Thanks a ton.

  • @mansi8584
    @mansi8584 3 года назад +64

    i was literally shocked that how much efforts you're putting in one explanation and giving this precious content for freeeeeeee !! your lectures are so so so important for our understanding || thank youuuuu sooooooooo much || please never stop making videos !!

  • @DIJONh100
    @DIJONh100 2 года назад +67

    I used to have a physics teacher who I always told that he was born to teach because he explained concepts so well and made it impossible to not understand. You fall into that category Ma'am. English isn't even your first language and you explained the merge concept beautifully. I understood the pseudo code 100% too. AMAZING work. Thank you, your videos are the only reason I will complete my degree.

  • @AnubhavTalukdar
    @AnubhavTalukdar 5 лет назад +68

    Its rare to see teachers explain each step of a recursive example in such detail. You've explained it right from the beginning to the end taking into account each small step along the way. Amazing mam! People will start noticing your efforts and your channel will grow like anything. Much ❤️

  • @bananapudding4854
    @bananapudding4854 3 года назад +8

    You're the only person I know who can break it down so beautifully. You are a genius!

  • @komuravellyvenky
    @komuravellyvenky 5 лет назад +63

    My fear of sorting algorithms is gone by these series of videos. Thanks for such a wonderful explanation.

  • @muskanyadav2391
    @muskanyadav2391 3 года назад +18

    Greetings ma'am , I have been studying data structures through your videos only and I highly appreciate the efforts that you put in every single video of yours. Must watch for all those who have just started learning DS and are still having a hard time understanding the logic. Then this is it. Big Thanks!

  • @striker_mindset
    @striker_mindset 5 лет назад +397

    Mam,you are going to become one of the top youtubers for CS and IT students
    Keep going
    Best of luck 🤗 from Akarshit Nigam

    • @dpumpzz6014
      @dpumpzz6014 5 лет назад +9

      agreed 100%

    • @bishwajeetpandey1570
      @bishwajeetpandey1570 5 лет назад +1

      Yes keep it up

    • @MTMTrolls
      @MTMTrolls 4 года назад +1

      Yap

    • @an_son_mathew_
      @an_son_mathew_ 4 года назад +1

      Agreed...this was so hard sorting method for me....but now it is easy 😌

    • @NikhilRaj-vz6cq
      @NikhilRaj-vz6cq 3 года назад +2

      @@an_son_mathew_ yeh... Her lectures are far better than most of the other dsa lect. But still don't know why it's not recommended earlier

  • @taha5871
    @taha5871 2 года назад +1

    if someone searches for a video to understand what is really happen when u call the MergeSort function, I think this the best video for you, and nobody can explain it in detail like this
    Thanks so much, your work is appreciated ❤

  • @AmanChauhan-hl2pm
    @AmanChauhan-hl2pm 5 лет назад +210

    Doubt from the starting of semester.
    Now cleared in 30 min before exam ..
    Just by your video.... 😅
    Awesome Ma'am.... 👌🔥🔥

    • @shopeofediting4952
      @shopeofediting4952 4 года назад +1

      mam last line merge sort ki nae smjh araee haa original array mn copy wali 😓

    • @okayomkar
      @okayomkar 4 года назад +1

      @@shopeofediting4952 original array return karega merge function

    • @AbhishekGupta-zw9yi
      @AbhishekGupta-zw9yi 4 года назад +1

      great bro

    • @prakashreddy773
      @prakashreddy773 2 года назад

      ​@@shopeofediting4952 you dont have to copy the elements you can just print the array b[] but if you wanted to do it anyways then this is the code:
      a[n] is the initial array of size n
      and b[n] is the sorted array of size n
      for(int i = 0;i

  • @princeverma-or7nc
    @princeverma-or7nc 3 года назад +89

    Is there is an award for best teacher that goes to you ❤

  • @aastham8782
    @aastham8782 4 года назад +30

    Excellent explanation ma'am. I was so confused about the recursion tree. You literally explained the working so well. Thank you so much.

  • @saideep3047
    @saideep3047 3 года назад +48

    All of you just take a second to appreciate her patience🙏🏻. This is called true passion towards teaching. She is living in her Dharma.

  • @rohitshaw1028
    @rohitshaw1028 5 лет назад +23

    The best explanation I have ever seen, thank you so much mam , you deserves much more subscribers.Thank you very much for this wonderful explanation

  • @bobbymangasha7471
    @bobbymangasha7471 3 года назад +1

    My professor spent the whole class rambling about merge sort and left me confused and with more questions. your explanation felt like cutting a butter with a hot knife, it went straight through my skull and forever etched in my memory. Thank you!

  • @TheHunnycool
    @TheHunnycool 5 лет назад +25

    Your impeccable way of teaching is speechless. Thank You So Much Ma'am for starting this channel. I am really very greatful to you. Please Keep Up the Good Work.

  • @juliusdgenius1
    @juliusdgenius1 Год назад +3

    Since discovering Jenny, anytime I am given any concept in my programming school, I run to find it in Jenny's Lectures, and like clockwork, she delivers superb content. You could tell from how she takes her time to explain a concept that she really wants you to get it. I am hooked!

  • @faizanbaig3952
    @faizanbaig3952 5 лет назад +6

    My secret of success with highly appreciated in such a way that i so far and beyond any other lecturers. simple and very simple way to explain to make understand between all the sorting ways. thankx

  • @audaciouspert1772
    @audaciouspert1772 3 года назад +1

    Unarguably the best example on the entire internet! Thank you!

  • @vivektheachillean
    @vivektheachillean 5 лет назад +18

    So Very Systematically Explained !!
    It simply clears even the iota of doubt one has . Only I would humbly request if you could kindly write down the step by step algorithm of the same as it is generally asked in exams along with the programming code .
    Also Kindly keep on posting more such videos .
    Once again kudos to you for making understand sorting technique so easily.

  • @rafatulalam8677
    @rafatulalam8677 4 года назад +2

    One of the best lectures on Mergesort. I am from Bangladesh and really love the way you explained this complicated topic with ease !

  • @trademoneynothealth
    @trademoneynothealth 5 лет назад +16

    Thanks for making algorithms understand so easily !! Appreciate your work!!

  • @otherme8212
    @otherme8212 4 года назад +1

    Best explanation of merge sort I ever heard in my life ...keep up the work ...world needs teachers like you

  • @gulrezeqbal3048
    @gulrezeqbal3048 5 лет назад +11

    No one has explained like u madam in RUclips Thanks and very soon u will be in top tutor in RUclips and please continue upload videos like competition coding mnc Company 🤩!

  • @RAHULCHOUHAN-ud6tl
    @RAHULCHOUHAN-ud6tl 5 лет назад +6

    what the way of explaination mam....osm, i never cmnt ever but now my heart forced me to cmnt here bcz of many time i studied merge sort and there is some confusion remains, but with the help of your lecture all the confusions are cleared, thanks a lot mam, keep it up mam.

  • @helloak7156
    @helloak7156 3 года назад +1

    For a reason it is one of the best DSA playlist on youtube.

  • @sakibthetech
    @sakibthetech 5 лет назад +6

    The best teaching style.Easily I have understood merge sort from this video.This tutorial is better than others that I have seen.Thanks.

  • @RemmyDev
    @RemmyDev 3 года назад +1

    You are super star taking my mind in the correct direction, and literally we are wasting our time and money in such colleges

  • @nag1914
    @nag1914 2 года назад +5

    i never thought that these algorithms sound this simple. Its not these algorithms simple, its the way you presented it. You just nailed it. i wish i had a teacher like you. sooo fortunate that i came across your channel. while watching this lecture, at the beginning i thot like, i wudnt get this in my mind, but its just matter of 30 mins, and i'm super confident about my class tomorrow. thank you so-much for spreading knowledge for free.

  • @shreya6107
    @shreya6107 2 года назад +2

    The best explanation I have seen for Merge Sort! I finally understood it. Thank you so much ma'am.

  • @sourabhgorai2135
    @sourabhgorai2135 Год назад +1

    i used to face very much problem in doing dry run of recursive function, and some times it is very much difficult, and so far didnt found any teacher to explain the dry run of recursion so thoroughly, and i really appretiate it.

  • @jindagi_ka_safar
    @jindagi_ka_safar 4 года назад +13

    This video explains 'recursion' more than Merge sort itself. Its very useful in understanding 'working of multiple recursion' under the hood. Thanks

  • @Manish-vz4pj
    @Manish-vz4pj Год назад +1

    I had searched the whole internet/youtube/chatgpt but i didnt get the concept behind it , but after watching this video, all my doubts was clear . Thank you so much mam

  • @dominikbaricak9589
    @dominikbaricak9589 8 месяцев назад +326

    Why is this video out of sync with sound?😔

    • @Astablckclover
      @Astablckclover 8 месяцев назад +19

      ikr!! literally its ruining everything

    • @AhmadRaza-is3cq
      @AhmadRaza-is3cq 8 месяцев назад +15

      Yeah I observed the same, for fixing it I decided to sync it from my own but when I downloaded the video from RUclips (to be available in my editing software), I actually observed that there was some issue from RUclips in this video as when watching this video offline the video and audio was synced actually.

    • @pranavahuja6743
      @pranavahuja6743 8 месяцев назад +5

      😭

    • @sandippal8908
      @sandippal8908 8 месяцев назад +4

      Yes , first I think my ph is lagging

    • @arslanlatif2690
      @arslanlatif2690 8 месяцев назад +3

      First download it then watch, it will be synced there

  • @tux008
    @tux008 3 года назад +1

    One of the best explanation of merge sort in RUclips. Clear, crisp and simple 👌👌👌

  • @AbhishekKumar-kt6yp
    @AbhishekKumar-kt6yp 5 лет назад +13

    Thank you mam, thank you for this amazing explanation. And i think, you are the, one of the rare, or may be only one, that's explain it on the board, and that's really cool. 🥰

  • @adityalodhi4023
    @adityalodhi4023 2 года назад +1

    I waited 35 minutes 26 seconds for that smile.............I knew u will give that smile.......TY.

  • @arkaghosh8659
    @arkaghosh8659 Год назад +19

    00:05 Merge sort is a sorting technique that works on the divide and conquer technique.
    02:47 The text discusses dividing a list into sublists and the process of stopping when each sublist has only one element
    08:36 Merge Sort Algorithm
    11:41 Merge sort algorithm divides the array into smaller parts and then merges them
    17:06 Merge sublists from 0 to 2.
    19:19 Merge sorted sub lists to create a final sorted list
    24:17 Comparing and sorting elements into sublists
    26:51 Merge elements of a sub list into a sorted list
    32:17 The given text is a set of instructions for sorting an array using the merge function.
    35:05 Merge sort algorithm explained
    Crafted by Merlin AI.

  • @abir14016
    @abir14016 6 месяцев назад +1

    If someone facing issues with sound with any video in youtube, and then he/she downloads to watch that video, then imagine the quality of the video. Respect mam.

  • @roshni0605
    @roshni0605 Год назад +9

    You're literally the best teacher I have ever come across ❤️ please keep doing the hardwork..we need teachers like you🥺💓

  • @stayhappy7899
    @stayhappy7899 10 месяцев назад

    I am grateful for your clear and effective explanations. As a student pursuing a Bachelor's in Data Science at one of Pakistan's premier IT institutes, I found myself struggling to grasp the concept of merge sort in my current semester's DSA course. However, after discovering your guidance on the RUclips channel led by Mam Jenny, everything became much clearer to me. Thank you for your invaluable assistance

  • @fun-ih5sc
    @fun-ih5sc 5 лет назад +6

    Awesome ma'am.
    from 3 days i was struggling looked a lot of video which skipped this part mergeSort()(

  • @zinabudesta7333
    @zinabudesta7333 2 года назад +1

    Mam, i am from Africa you are best teacher for all Africans Cs students ,this is my opinion Thank You

  • @atul7817
    @atul7817 5 лет назад +9

    Mam one of the best lecture in merge sort example

  • @SuruchiSuman-pj8lz
    @SuruchiSuman-pj8lz Год назад +1

    You are really amazing ma'am!
    I mean the only reason I have been able to understand sorting is only because of you!!! Thank you so much! May god give you good health and prosperity 🙏

  • @gokulakrishnans8066
    @gokulakrishnans8066 4 года назад +4

    Thank you mam for the deep explanation,you are saving many students like me who can't afford to purchase the courses like this.Thank you very much for your effort and hardwork mam.You are great 👏

  • @salimansarihh9
    @salimansarihh9 2 года назад

    Mam, I am big fan of your teaching style, I had watched lots of most watched video on youtube but didn't understand all the code and it was tough to tally or dry run, but after watching your videos, I understood the concepts as well as line by line code. Now I myself can write the code in ones and second try, I am grateful to you. please keep on making lots of tutorials.

  • @r_pradyumannkushwaha8643
    @r_pradyumannkushwaha8643 5 лет назад +4

    Her explanation as calm as her and one thing thanks for such helpful video 👍👍👌👌

  • @gsathyanarayana7366
    @gsathyanarayana7366 3 года назад +1

    One of the wonderful teaching videos I have ever seen in youtube, I could see your passion about teaching. Thank you so much for sharing your knowledge with great explanation. Please keep sharing your knowledge!!

  • @luizdupont8791
    @luizdupont8791 4 года назад +8

    Been to two different schools here in the states and so far your explanation is superb compare to some instructors. Thank you for all your hard work!

  • @whimsicalkins5585
    @whimsicalkins5585 Год назад

    Jenny Mam. Namaste. my heartful thanks for you. I have been taught by you through out this DSA playlist right from the beginning. From learning recursions easily to applying them in quick sort , merge sort, trees and graphs, you have taught me many things in clear, visual way. My respects to you mam. Thanks

  • @rahulkhanna9503
    @rahulkhanna9503 5 лет назад +5

    You are my favorite cs teacher

  • @hirenaswar8104
    @hirenaswar8104 3 года назад +2

    That is best explained video on coding I have ever seen till now thank you ma'am

  • @MuhammadShahbaz-zf7gc
    @MuhammadShahbaz-zf7gc 5 лет назад +6

    making the tree for the call function(s) sequence was great thing ..... clear the concept of MergeSort.

  • @parkmejihyo3770
    @parkmejihyo3770 10 месяцев назад +1

    thanks a lot maam. i saw abdul bari sir's video but he didn't explain the merge process in the same video so I got confused but this is one of the best videos on mergesort since it explains the topic complete.

  • @SenthilKumar-rf3qv
    @SenthilKumar-rf3qv 5 лет назад +4

    I was struggling with the merging part in code... Ur video has cleared my doubts.. thanks for the great teaching madam...

  • @tejprakash8420
    @tejprakash8420 3 года назад +1

    She has explained Recursion so beautiful. Each and every step where the control goes..great work

  • @rsvv196
    @rsvv196 3 года назад +3

    One of the best teacher in RUclips... Habituated to hear ma'am lecture rather than college lecture....my class teacher also refering this channel and teaching us😂😂lol

  • @sakunarai675
    @sakunarai675 Год назад

    Thank you for this exceptional explanation of the Merge Sort algorithm, breaking down complex concepts into easy-to-understand steps.

  • @divyaupadhyay7866
    @divyaupadhyay7866 4 года назад +5

    You are really a great mentor, you explained these concepts so well, thank you for all the efforts you are putting for all of us.

  • @nikhilverma6868
    @nikhilverma6868 2 года назад

    Such a simple explaination , professors literally make it really complex

  • @chhavibajpai176
    @chhavibajpai176 5 лет назад +6

    Ma'am your way of explaining is so unique and makes even complex techniques so easy for us.
    Thankyou so much

    • @rasviibrahim2523
      @rasviibrahim2523 5 лет назад

      please Any One Give Me The Code Please I M Facing Problem In Marge() function

    • @Dynamic_life106
      @Dynamic_life106 3 года назад

      Very nice madam

  • @AbhayKumar-rj3bk
    @AbhayKumar-rj3bk 2 года назад

    Literally don't hv words...
    How beautifully you explained this complex mechanism..
    Smooth like butter...
    Respect and lots of love mam😇😇

  • @harishp2046
    @harishp2046 3 года назад +3

    Stupendous work. Loved it to bits!

  • @antunew0
    @antunew0 Год назад

    I saw lots of videos in this topic, but this one is the best explanation ever!

  • @nagendrakumar1380
    @nagendrakumar1380 5 лет назад +6

    Ma'am you really rock
    You explained it so well 👍
    Your concept was really good
    I liked the way
    Speechless

  • @sivanathanbalasubramanian
    @sivanathanbalasubramanian 3 года назад +1

    I am a software engineer ,revisiting concepts.Your video is very useful,Thank you

  • @fanofstylishstaraa4841
    @fanofstylishstaraa4841 3 года назад +4

    Thank u mam...It's crystal clear as usual 👍🏻👍🏻 U truly deserve a huge gratitude from all of us on ur enormous efforts in order to provide us the quality education ☺️☺️

  • @TheCharmy15
    @TheCharmy15 3 года назад

    thanku maam, you are the best teacher I have ever had, before I came across your videos, I was scared of this subject and all the coding part. Your videos give me confidence to pick up my laptop and write code. I am studying here in New York, and none of the profs are as good as you.

  • @abhisheknikam9506
    @abhisheknikam9506 5 лет назад +5

    Awesome video mam .. keep making such videos on c programming as they are helpful for us when we don't understand it in our colleges. Your explanation is also quite understandable as you explain each and every statement of the program and program logic is also meaningful. Please 🙏 don't stop making videos and carry on mam. Thank you.

  • @srisaisubramanyamdavanam9912
    @srisaisubramanyamdavanam9912 2 года назад +1

    Thanks maam. Explained this sorting method with so ease.
    GOD BLESS YOU

  • @Nikita-hv5jm
    @Nikita-hv5jm 5 лет назад +11

    Thanks a lot mam..Loved this video mam... All my doubts were throughly cleared after watching it.... Mam plzz upload a video on the time complexity of merge and quick sort also as soon as you can.... So that I can give my semester exam well

  • @dishantitaliya1912
    @dishantitaliya1912 Год назад

    Mam you are doing well for those students who's literally doesn't know about anything related to coding. Just keep going mam we all of us always with you.and thank you so much for made so easy as compared to the colleges and universities.

  • @srikanthchebrolu1091
    @srikanthchebrolu1091 3 года назад +11

    Every time class goes on in college ,I don't care because Jenny ma'am with us to explain the thing in deep 😁❤️

  • @wakeelahmad7747
    @wakeelahmad7747 3 года назад

    i can't seen and face there types of algo .. with that tecq .. and efferts mam its fist video in my carier which impress me . that if a teacher want so every studen of it , and other sub make its carrier easy and like a passion not a job . you are the best , Mam and efert with the core of hearts for students ....

  • @aayushitomar2877
    @aayushitomar2877 2 года назад +5

    Thank You Very Much Mam , You taught the concept of Merge sort as well as how recursive calls tae place in divide & conquer VERY WELL.😊

  • @rajattomar7391
    @rajattomar7391 2 года назад

    Wonderful explanation .
    I tried to learn this algorithm from many channels but this is the best explanation.

  • @sikhamulok7721
    @sikhamulok7721 4 года назад +10

    I love you mam 😭😭... You cleared my deep doubt which i was having regarding the recursive part.

  • @shachisinghal8856
    @shachisinghal8856 Год назад

    I watched quick sort from many channels, but finally understood from you. Thanku maam :)

  • @mbh.minhas
    @mbh.minhas 5 лет назад +5

    Thank you ma'am. I've had quiz of mine and you helped a lot. Thank you very much and keep making tutorials like this. And i loved your last expression ba bye 😁

  • @informative180
    @informative180 2 года назад

    the best channel for merge sort explanation.
    thank u so much mam.

  • @debanjanghosh5698
    @debanjanghosh5698 5 лет назад +5

    One of the best lectures in youtube. God bless you mam. 🙏😇

  • @shilpajuneja11
    @shilpajuneja11 10 месяцев назад +1

    Best explanation ever... ❤

  • @honeykpatel
    @honeykpatel 5 лет назад +10

    Awwyeaa!! Thnkyuu so much for this explanation..really great

  • @abdulwadood8327
    @abdulwadood8327 4 года назад +1

    You have solved all my doubts, love you Ma'am from the core my heart.

  • @pratheeshkumar2861
    @pratheeshkumar2861 8 месяцев назад +15

    🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑Audio is miss matched 🛑🛑🛑🛑🛑🛑🛑🛑🛑

  • @manojchoudhary4351
    @manojchoudhary4351 4 года назад

    Mam I was asked the merge sort algorithm in my today's viva, I have watched this video before of my viva, your video has saved me , thanks from bottom of my heart

  • @chetansahu1505
    @chetansahu1505 5 лет назад +20

    Instead of Mid = (lower_limit + higher_limit) /2,
    applying Mid= lower_limit + (higher_limit - lower_limit)/2 will save the code from throwing error such as integer overflow on higher values of N. Though the video and explaination is commendable. :)

    • @millionaireminded4139
      @millionaireminded4139 3 года назад +1

      can u plz explain how it will save from throwing such kind of errors??

    • @chetansahu1505
      @chetansahu1505 3 года назад +10

      @@millionaireminded4139 yeah sure my pleasure.
      Definition of Integer overflow : an integer overflow occurs when an arithmetic operation attempts to create a numeric value that is outside of the range that can be represented with a given number of digits - either higher than the maximum or lower than the minimum representable value (wikipedia)
      So lets assume for an integer variable x the maximum number it can hold be 15 and any number more than 15 allotted to x would lead to integer overflow. now if we take low = 1, high = 9 so mid = (low+high)/2
      and in the worst case low would become 9. low = 9 and high = 9 now
      x = (low+high)/2
      so 9+9 = 18 which is greater than 10 and will lead to integer overflow.( subsequently before 18 divides it by 2 it will throw error cuz 18>15)
      on the other hand
      x = low + (high-low)/2
      x = 9+ (9-1)/2
      x = 9+ (8/2)
      x = 9+ 4
      x = 13
      in each step of operation the value of x always remains under 15.
      This prevents integer overflow error.
      Hope this helps

    • @millionaireminded4139
      @millionaireminded4139 3 года назад +1

      @@chetansahu1505 thank you soo much

    • @telaproluviswanadha3294
      @telaproluviswanadha3294 2 года назад

      @@millionaireminded4139 can you please let us know to which size array B should be initialised ?

    • @chaitanyapandey6240
      @chaitanyapandey6240 2 года назад

      @@telaproluviswanadha3294 same I am stucked with the same issue

  • @ashifahmed3033
    @ashifahmed3033 3 года назад

    i wanted to share that i have been trying to understand the recursive tree of merge sort and unable to .........finally i got encountered to this video and literally its the best .......best of best explanation.
    huge respect for you maa'm

  • @gd7474
    @gd7474 5 лет назад +6

    Hatss off🔥💥..to ur teaching. Mam..please put videos on linked list in c ++...it s a humble request😥🙏🙏🙏

  • @hosteldayswithme
    @hosteldayswithme 11 месяцев назад

    That’s not messy that’s the most clear explanation in the whole yt!!

  • @arvindersingh9863
    @arvindersingh9863 5 лет назад +12

    That recursion's pictorial discription is like preorder traversal

  • @gulshanitsyou
    @gulshanitsyou Год назад

    First apki smile is lovely 💕💕
    ap code ko laptop pe kr ke dikhao ya na dikao per mer dimag me run ho chuka h
    ap ne jis traha se smjhaya me kabhi bhoool bhi nhi paunga .

  • @BhumiJadav-l9m
    @BhumiJadav-l9m 3 месяца назад +3

    How I see lecture..😅
    See 20 second further lecture in the laptop without sound...and listen audio from mobile(starting from o second)...🥰

  • @darineesh.r66
    @darineesh.r66 Месяц назад +3

    Y in merge sort vedio, audio and vedio are not merged

  • @lokomoko3337
    @lokomoko3337 2 года назад

    First time I was able to figure out merge sort after watching this video. Thanks a ton!