Lecture35: Merge Sort using Recursion | Day-5 | 10 Day Recursion Challenge

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 พ.ย. 2024

ความคิดเห็น • 501

  • @virisharma7752
    @virisharma7752 2 ปีที่แล้ว +249

    more than learning DSA I am learning to be consistent even during hardships through your videos. Praying for your recovery, Get well soon bhaiya💫

    • @snipper6683
      @snipper6683 2 ปีที่แล้ว +11

      i also bro consitents mean love bhaiya
      iam in 1st year i want dsa complete in 1st year with love bhaiya!

  • @PiyushSharma-uv3jd
    @PiyushSharma-uv3jd ปีที่แล้ว +46

    This vedio is not a lecture...its just sir coding for himself...no explanation like other lectures.

    • @Aryan_33345
      @Aryan_33345 8 หลายเดือนก่อน +6

      if you watch it with focus you will get it

    • @004-andhaleaniketajit4
      @004-andhaleaniketajit4 7 หลายเดือนก่อน +2

      🍌

    • @ShivansuBisht
      @ShivansuBisht 3 หลายเดือนก่อน +2

      bro your video spelling is wrong

    • @ShivansuBisht
      @ShivansuBisht 3 หลายเดือนก่อน

      @@Aryan_33345 problem solver

  • @samyaknagrale9566
    @samyaknagrale9566 2 ปีที่แล้ว +121

    12:04 Bhaiya, (s+e)/2 can overflow when both s and e have maximum possible value of integer i.e. 2^31-1.
    This will result in wrong answer.
    So to optimise this, we write-
    int mid= start + (end - start)/2 to handle such edge cases.
    Thank you Bhaiya ki aap itni achi series bana rahe hai!!!

    • @anurag_gautam00
      @anurag_gautam00 ปีที่แล้ว +3

      yess!!

    • @JohnWickea
      @JohnWickea ปีที่แล้ว +3

      lol kimds , everyone knows that

    • @SatyamSingh-rq2iy
      @SatyamSingh-rq2iy ปีที่แล้ว +2

      baap ko mat shikha ....wo sab padha chuke h babu

    • @taranmahajan6495
      @taranmahajan6495 9 หลายเดือนก่อน +9

      @@SatyamSingh-rq2iy isme itna toxic hone ki zarurat thodi h , vo in general bs bol rha for public awareness

  • @satyajitpal4145
    @satyajitpal4145 2 ปีที่แล้ว +277

    If we use (start + end )/2 then it may happen that the sum will exceed the limit of integer hence we should use start + (end-start)/2

    • @CodeHelp
      @CodeHelp  2 ปีที่แล้ว +130

      great

    • @utkarshgautam1940
      @utkarshgautam1940 2 ปีที่แล้ว +6

      bro why we have created aaraay dynamicaaly ,we can also create it statically

    • @rohitshrirame2378
      @rohitshrirame2378 2 ปีที่แล้ว +37

      @@utkarshgautam1940 yes we can also create it statically but it is mentioned by bhaiyya in earlier videos that whenever we dont know incoming size of the array....... creating array statically might give error if it exceed stack memory, so this is a bad practice....but in dynamic memory allocation it has plenty of memory...so no need to worry about size.
      this could would work fine when we know incoming size of arrays. But in online judge test cases if array size exceed stack memory then it will lead to prob.so better declare dynamically in some cases.

    • @utkarshgautam1940
      @utkarshgautam1940 2 ปีที่แล้ว +2

      @@rohitshrirame2378 thnks bro ,now I got it

    • @rameshmalhotra9525
      @rameshmalhotra9525 2 ปีที่แล้ว

      th-cam.com/video/tAQIKe0UGH4/w-d-xo.html

  • @anuragpandey8165
    @anuragpandey8165 2 ปีที่แล้ว +32

    12:03 : Problem: (s+e)/2 can result into interger overflow for edge test cases. To avoid this we use s + ((e-s)/2).

  • @aryan5035
    @aryan5035 2 ปีที่แล้ว +12

    This channel is becoming the best on TH-cam

  • @VivekKumar-fr9nz
    @VivekKumar-fr9nz 2 ปีที่แล้ว +83

    can you please explain merge sort with dry run. Im not getting mergesort function part.

  • @dharmeshpanchal713
    @dharmeshpanchal713 2 ปีที่แล้ว +13

    I know recursion before but this Video series help me to understand the basics of recursion. Wow !!!!!! Amazing explanation.

    • @whitewalker3365
      @whitewalker3365 2 ปีที่แล้ว

      kha se ho bhi job kr te ho ya coding seekh rhe ho

  • @divyagupta6854
    @divyagupta6854 2 ปีที่แล้ว +1

    Apart from the content of course, I really like your way of teaching, like har baat ko ek kahani bata rahe aise karke explain karte, "Maine aapko bola ki aaj hum merge sort padhne wale hain, to aapne bola, kya hota hai merge sort ka matlab", aise type, bahut badhiya tareeka.

  • @aryakumarjaiswal2059
    @aryakumarjaiswal2059 2 ปีที่แล้ว +10

    Thanks A Lot Bhaiya!!Suffering since 3months,Recursion ke problems ko solve karne ka bahut aacha trick Bataya
    Aapne.Thank you bhaiya for such a Awsome Content..Stay safe stay Healthy

  • @umangsachdeva9920
    @umangsachdeva9920 2 ปีที่แล้ว +44

    Attendance marked👍👍
    No dropped a single video till now🤗🤗
    Placement leke hi manege❤️❤️🙏

    • @fakegmail3051
      @fakegmail3051 2 ปีที่แล้ว +1

      umang bhaii 10 mahine ho gaye kaha hoo app thoda batiaye 😊

    • @Akash-yr2if
      @Akash-yr2if ปีที่แล้ว

      Ho gaya Placement

    • @fakegmail3051
      @fakegmail3051 ปีที่แล้ว

      Company?

    • @Aryan-lk5lh
      @Aryan-lk5lh 8 หลายเดือนก่อน

      😂

    • @aamir4684
      @aamir4684 4 หลายเดือนก่อน

      ​@@fakegmail3051Bhai aap kis year mein ho??

  • @Roshanhoro123
    @Roshanhoro123 2 ปีที่แล้ว +2

    Bht badi help kr rhe ho bhaiya jiska ehsaan kabhi chuka nhi paege.. aap itna mehnat krte ho isse hume motivation milta hai ki humko bhi aur mehnat krni hai....love you bhaiya.... God bless you❤️

  • @priyasharma3549
    @priyasharma3549 2 ปีที่แล้ว +14

    instead of(s+e)/2 we have to use s+(e-s)/2..
    done with the video today.Thank you so much bhaiya❤✌

    • @feagy
      @feagy 11 หลายเดือนก่อน

      use (s+e)>>1;

    • @AviSanX
      @AviSanX 5 หลายเดือนก่อน

      @@feagy yup, this looks more efficient, it uses bitwise right shift operator to get the mid since right shifting by 1 divides the number by 2👍

  • @Josuke217
    @Josuke217 6 หลายเดือนก่อน +4

    Binary search (lec 12-15) , lecture 20(merge two arrays) and lecture 29(DMA) are prerequisites for this particular lecture.

  • @shivanshvish4879
    @shivanshvish4879 2 ปีที่แล้ว +44

    It's difficult to understand for me as an ECE student. But I have come a long way and took significant days to reach this point. I can't just leave now. You teach very precisely but for me, it takes longer time to understand each concept than those of CSE. I will try my best to move forward.

    • @roshangupta629
      @roshangupta629 2 ปีที่แล้ว +16

      Bro CSE students don't have extra brain , so don't think like that , I am also an Electronics student , so belief in yourself and let's give our best.

    • @vaibhavnayak3416
      @vaibhavnayak3416 2 ปีที่แล้ว +13

      bruh!.
      programming is nothing to do with your degree. If you are struggling then you need practice. Recursion is a hard topic compared to others. So it will take time.

    • @rameshmalhotra9525
      @rameshmalhotra9525 2 ปีที่แล้ว

      th-cam.com/video/tAQIKe0UGH4/w-d-xo.html

    • @Aryan-wl7mc
      @Aryan-wl7mc ปีที่แล้ว +3

      So now did you complete all the playlist??? it's been 6 months since you left the comment here. I am just curious

    • @falconop9730
      @falconop9730 ปีที่แล้ว +1

      ​@@Aryan-wl7mchave you completed? It's been 6months

  • @shivanshisharma3718
    @shivanshisharma3718 2 ปีที่แล้ว +4

    Present bhaiya
    Best series on u tube
    Consistency level is 👍👍
    Get well soon bhaiya

  • @TechUprise-by-Jyoti
    @TechUprise-by-Jyoti 2 ปีที่แล้ว +10

    Present bhaiya😊
    Thank you so much bhaiya ❤️
    Hope your health will be better super soon 🥰

  • @rachit_joshi
    @rachit_joshi ปีที่แล้ว

    Thank You So Much BHRAATA SHREE !!!!!!
    Ram Ram bhai saareya ne aaj hai humare recursion 10 day challenge ka paachva din h or hum padhne beth chuke hain full josh ke saath.

  • @AkashYadav-di6kd
    @AkashYadav-di6kd 9 หลายเดือนก่อน +1

    Bhaiya ki chalaki waali trick:
    (s + e) / 2 //it can lead integer overflow, means that after adding s and e we may get this much bigger value that cannot be stored in int.
    So let's do Chalaki
    s + (e - s)/2 //another way of writing the above formula.

  • @codingcouch
    @codingcouch 2 ปีที่แล้ว +28

    The effort that ur putting to create the videos is really commendable, Thank u for All the hardwork, stay safe and get better soon!

  • @manishvijay6794
    @manishvijay6794 2 ปีที่แล้ว

    ek case m handle kr lunga or baki ka recursion smbhal lega ye step aa gaya smjh bhaiya 💫💫💫💥💥💥

  • @kailashdaata8610
    @kailashdaata8610 2 ปีที่แล้ว +7

    Thanks for providing such quality content and consistent. Ye concept thoda fast ho gya.

  • @abhyaskanaujia3862
    @abhyaskanaujia3862 2 ปีที่แล้ว +3

    11:57 If both start and end are very large then adding them can result in an interger overflow. So, to solve this we can do `start + (end - start) >> 1`

  • @amanjindal2754
    @amanjindal2754 2 ปีที่แล้ว

    Aap bhai jordaar pdhane wale k bhi baap ho 👍 🤩🙏🏼
    A lots of love 🙏🏼

  • @ritik8879
    @ritik8879 2 ปีที่แล้ว +1

    ur video is teaching dsa as well as how to be consistent . get well soon bhaiya

  • @tarunsingh7826
    @tarunsingh7826 2 ปีที่แล้ว +1

    Bhaiya far better than paid course OP

  • @vijaiganeshh1346
    @vijaiganeshh1346 8 หลายเดือนก่อน +10

    😓Sir i know recursion and i understood ur algorithm but mergeSort(arr,s,mid) and mergeSort(arr,mid+1,e) how are these sorting left and right parts i dont get it somebody plz explain friends

    • @faizansari3503
      @faizansari3503 5 หลายเดือนก่อน

      In first call we are sorting the left part and in second call we are sorting the right part, dry run the code you will understand

  • @sanketh768
    @sanketh768 8 หลายเดือนก่อน +3

    Smoothly skipped the paid promotion quickly 😊

  • @professionalshahbaz8655
    @professionalshahbaz8655 ปีที่แล้ว

    Thank you so much sir complete semester smjh ni aya aj kr liya hai subha exam hai mera thank so much for saving me ab bht achy sy smjh agya. I'm consistently following your DSA playlist

  • @Ronak_
    @Ronak_ ปีที่แล้ว

    Bhaiya mujhe Recursion ka topic aaj tk samajh hi nhi aaya tha....but....2 video Sraddha Didi ki or baki video aapki dekhne ke baad Recursion ka topic mere liye chhutkiyo ka khel reh gya hai...❤ Thanks bhaiya ❤

  • @kanikaaapan9996
    @kanikaaapan9996 2 ปีที่แล้ว +7

    Great content taught by great teacher!! You are justifying the channel name as helping many students .😊

  • @I_Anupam_Pandey
    @I_Anupam_Pandey 2 ปีที่แล้ว +4

    Lecture 35 attendance thank you for this amazing course

  • @sagarsharma8953
    @sagarsharma8953 2 ปีที่แล้ว +1

    Hello ji kaise ho saare
    This is love babbar ❤️
    Welcome to channel codehelp
    Bhaiya ye line hi Mera motivation h ek energy level humesa peak pr

  • @adarsh6109
    @adarsh6109 2 ปีที่แล้ว +1

    Bhaiya, (s+e)/2 can overflow when both s and e have maximum possible value of integer i.e. 2^31-1.
    This will result in wrong answer.
    So to optimise this, we write-
    int mid= start + (end - start)/2 to handle such edge cases.
    Thank you Bhaiya ki aap itni achi series bana rahe hai!!!

  • @abhay.1926
    @abhay.1926 2 ปีที่แล้ว +1

    Get well soon bhaiya
    Jaldi thik ho jao aap ♥️♥️

  • @dishantgupta9986
    @dishantgupta9986 ปีที่แล้ว

    sir, your videos are great and i reached at 35th lecture with consistency....thankyou very much babbar sir ji for creating such content

  • @satveersaini1099
    @satveersaini1099 2 ปีที่แล้ว +4

    Thanks bhaiya for consistency 🥳🥳
    Attendance marked 💯💯💯

  • @abhaysingh8121
    @abhaysingh8121 ปีที่แล้ว +1

    Only because of your teaching style I have interest in coding.
    Thank you bhaiya ❤

  • @I_Anupam_Pandey
    @I_Anupam_Pandey 2 ปีที่แล้ว +2

    12:04 (s+e) more than range of interest then it throw error
    To avoid use mid=s+(e-s)/2

  • @jogindrasingh6139
    @jogindrasingh6139 2 ปีที่แล้ว +2

    If we use (start + end )/2 then it may happen that the sum will exceed the limit of integer hence we should use start + (end-start)/2 means in your language (code phat jayega)

  • @mgfactors3510
    @mgfactors3510 2 ปีที่แล้ว +1

    What a consistency
    ❤🧡💛💚💙💜🖤🤍🤎

  • @sujaysarkar2602
    @sujaysarkar2602 ปีที่แล้ว +4

    #include
    using namespace std;
    void selection(int arr[],int n){
    //base case
    if(n ==0 || n==1){
    return;
    }
    int minindex=0;
    for(int i=1;i

  • @radhikakhandelwal4047
    @radhikakhandelwal4047 2 ปีที่แล้ว +1

    Present Bhaiya!
    Take care of your health too!

  • @parassetia4964
    @parassetia4964 2 ปีที่แล้ว +1

    bhaiya mn first..mmn first
    consistent with day 5😎
    praying for your good health

  • @sanskarsoni9551
    @sanskarsoni9551 2 ปีที่แล้ว +9

    Inversion Count :
    #include
    using namespace std;
    int merge(int *arr, int s, int e){

    int mid = s+(e-s)/2;
    int inv = 0;

    int len1 = mid-s+1;
    int len2 = e-mid;

    int *first = new int[len1];
    int *second = new int[len2];
    int mainIndex = s;
    for(int i=0; i

    • @whatsnext7778
      @whatsnext7778 2 ปีที่แล้ว

      bhai change kaha par h??? if we see code of merge sort

    • @ganeshvhatkar9040
      @ganeshvhatkar9040 ปีที่แล้ว

      Great work Brother !!!

  • @9852963775aaa
    @9852963775aaa 2 ปีที่แล้ว +1

    bhaiya aap great ho the amount of dedication you are putting in the videos mai agar thoda dedication aur laga doon to shayad kuch badhiya ho jaye>>>>>>thankyou so much bhaiya>>>>

  • @chad._life
    @chad._life ปีที่แล้ว

    class Solution {
    public:
    void merge(vector& nums1, int m, vector& nums2, int n) {
    for (int j = 0, i = m; j

  • @fit_tubes_365
    @fit_tubes_365 หลายเดือนก่อน

    Lecture 07: 14-09-2024
    Lecture 08: 15-09-2024
    Lecture 10: 18-09-2024
    Lecture 12: 18-09-2024
    Lecture 13: 18-09-2024
    Lecture 14: 21-09-2024
    Lecture 15: 23-09-2024
    Lecture 16: 24-09-2024
    Lecture 17: 24-09-2024
    Lecture 18: 24-09-2024
    Lecture 19: 26-09-2024
    Lecture 20: 26-09-2024
    Lecture 21: 27-09-2024
    Lecture 22: 01-10-2024
    Lecture 23: 03-10-2024
    Lecture 24: 04-10-2024
    Lecture 25: 05-10-2024
    Lecture 26: 07-10-2024
    Lecture 27: 08-10-2024
    Lecture 28: 09-10-2024
    Lecture 29: 10-10-2024
    Lecture 30: 11-10-2024
    Lecture 31: 11-10-2024
    Lecture 32: 11-10-2024
    Lecture 33: 13-10-2024
    Lecture 34: 14-10-2024
    Lecture 35: 16-10-2024

  • @riteshjaiswal3939
    @riteshjaiswal3939 2 ปีที่แล้ว +4

    Start + (end-start/2) should be replaced by ((start+end) /2) bcz the sum of these can also exceed it's limit..

  • @vanshikasoni6950
    @vanshikasoni6950 หลายเดือนก่อน +1

    MergeSort with pointers.
    void merge(vector &arr, int low, int mid, int high){
    vector temp;
    int left = low;
    int right = mid +1;
    while(left

  • @nihalshah6708
    @nihalshah6708 2 ปีที่แล้ว +1

    the gadbad in mid=(s+e)/2 is because if s and e are big integers then it will create problem in time complexity............USE mid=s+(e-s)/2; and there it will go easy.☺☺☺☺☺☺☺☺☺☺

  • @whitewalker7750
    @whitewalker7750 ปีที่แล้ว

    def merge(arr,s,e):
    inv_count = 0
    mid = s+(e-s)//2
    len1 = mid-s+1
    len2 = e-mid
    l1 =[]
    l2 =[]
    k = s
    for i in range(len1):
    l1.append(arr[k])
    k+=1
    k = mid+1
    for i in range(len2):
    l2.append(arr[k])
    k+=1
    i=j=0
    k=s
    while(i

  • @randomavghuman
    @randomavghuman 9 หลายเดือนก่อน +2

    solved inversion count
    int merge(int *arr, int start, int end, int& cumulative_count) {
    int count = 0;
    int mid = start + (end - start) / 2;
    int len1 = mid - start + 1;
    int len2 = end - mid;
    int *first = new int[len1];
    int *second = new int[len2];
    int mainarrayindex = start;
    for (int i = 0; i < len1; i++) {
    first[i] = arr[start + i];
    }
    for (int i = 0; i < len2; i++) {
    second[i] = arr[mid + 1 + i];
    }
    int index1 = 0;
    int index2 = 0;
    while (index1 < len1 && index2 < len2) {
    if (first[index1] = end)
    return;
    int mid = start + (end - start) / 2;
    linears(arr, start, mid, cumulative_count);
    linears(arr, mid + 1, end, cumulative_count);
    int answer = merge(arr, start, end, cumulative_count);
    cout

  • @sakshamkumar-je8lj
    @sakshamkumar-je8lj 11 หลายเดือนก่อน +1

    if i take,mid=(s+e)/2 i that case the value of the mid will be out of range of the number that is 2^-31 to 2^31
    So to solve this problem using this formula--------> e+(s-e)/2

  • @AbdulRehman-mg6kg
    @AbdulRehman-mg6kg 2 ปีที่แล้ว +19

    For those who didn't get how to merge two sorted arrays, kindly watch lecture no. 20

    • @MayankSharma08
      @MayankSharma08 ปีที่แล้ว +8

      but i didnt get how these two arrays sorted before merging

    • @anurag_gautam00
      @anurag_gautam00 ปีที่แล้ว

      thanks bhai

    • @SachinGoswami-d7i
      @SachinGoswami-d7i ปีที่แล้ว

      @@MayankSharma08 we send the address of the first element in the array

  • @saurabhdeshmukhsurya4247
    @saurabhdeshmukhsurya4247 10 หลายเดือนก่อน +1

    we can use s + (e-s)/2 instead of (s+e)/2 because s+e may go out of integer range

  • @anjalikaithal7243
    @anjalikaithal7243 2 ปีที่แล้ว +2

    Homework is done bhaiya-Inversion count. Thanks for your consistency.

  • @sanchiagarwal4909
    @sanchiagarwal4909 2 ปีที่แล้ว +1

    Josh++🔥✅
    Mazaa aa gaya merge sort padhke using recursion🙌🏻🤩

    • @whitewalker3365
      @whitewalker3365 2 ปีที่แล้ว

      without using recursion kha se padha

    • @sanchiagarwal4909
      @sanchiagarwal4909 2 ปีที่แล้ว

      @@whitewalker3365 Merge sort is done using recursion in the video.. lol have you watched the video?

    • @whitewalker3365
      @whitewalker3365 2 ปีที่แล้ว

      @@sanchiagarwal4909 yeah are your working in any company or just learning programming ✌️

  • @vigneshv7632
    @vigneshv7632 2 ปีที่แล้ว +4

    I sticked until last minute. I am liking it. Let's keep the josh high🔥

  • @tnishachaudhary6231
    @tnishachaudhary6231 2 ปีที่แล้ว +2

    Thank You Bhaiya!
    Mine Search and Sort lec about to complete....... Finally Such a relief ❤❤

  • @kartikkumaryadav1141
    @kartikkumaryadav1141 2 ปีที่แล้ว +1

    Bhaiya one of the very nice recursion series

  • @nandiniverma5273
    @nandiniverma5273 2 ปีที่แล้ว +1

    Bhot Mazedaar explanation !!! ❤️

  • @BabyGirk
    @BabyGirk 5 หลายเดือนก่อน

    Bahiya coding mujhe ati nhi hai utni.per apna aise padhay hai ki lagta hai kuch toh kar skata hu thanks

  • @satyamgupta7073
    @satyamgupta7073 2 ปีที่แล้ว

    Present bhaiya. Hum bus apka hi wait kr rhe the

  • @andrewbeef8758
    @andrewbeef8758 ปีที่แล้ว

    the main difficulty for me was to finding base case ; end you cleared it ; THANKS BHAIYAA

  • @679_prince8
    @679_prince8 ปีที่แล้ว

    bhaiya aapke content k aapas shayd hi koii hoga 💯

  • @sagarsharma7671
    @sagarsharma7671 2 ปีที่แล้ว +5

    Bhaiya ye wale topic pe ek aur video bnao bhot zyada ache se smjh nhi aaya ye merge sort

  • @main_karan
    @main_karan 10 หลายเดือนก่อน

    Now... It's look like coding is interesting ❤

  • @utkarshgautam1940
    @utkarshgautam1940 2 ปีที่แล้ว +2

    why we have created the array dynamically?? we can create it statically like this arr1[len1],arr2[len2]

  • @_the__hash_24
    @_the__hash_24 ปีที่แล้ว

    I liked your all videos bro . This is the one of the best platform on you tube for coding ❤❤.

  • @shubhamverma5347
    @shubhamverma5347 2 ปีที่แล้ว +1

    jab ham mid=(s+e)/2 use karte hai to jab int 2 ki power 31 hoga to int ki range se bahar ho jayega isiliye ham mid=s+(e-s)/2 use use krte hai thank you bhaiya

  • @rissshabhkushwaha
    @rissshabhkushwaha 2 ปีที่แล้ว +1

    Hoping for your fast recovery 🥰

  • @yashchauhan7221
    @yashchauhan7221 2 ปีที่แล้ว +1

    Attendance Done Jai Ho🔥

  • @nothing351.-
    @nothing351.- ปีที่แล้ว +45

    I don't understand merge sort. I understand all your other videos but I didn't get this one.

    • @sabyasachikarmakar8598
      @sabyasachikarmakar8598 5 หลายเดือนก่อน +1

      Watch 3 more time

    • @wonabe9799
      @wonabe9799 5 หลายเดือนก่อน

      Dry run and watch animation explaination of merge sort

    • @Deepanshutyagi-q2m
      @Deepanshutyagi-q2m 5 หลายเดือนก่อน

      Bhai mna ek bar ma he samj lia kya meri placement ho sakti ha

    • @yuitakano9152
      @yuitakano9152 4 หลายเดือนก่อน +1

      @@Deepanshutyagi-q2m lnd smjh aya hai terko kuch

    • @piyushjaiswal5582
      @piyushjaiswal5582 4 หลายเดือนก่อน +1

      See recursion , how it works and solve merge two sorted arrays problem then you should be fine

  • @Mr.Hbk_Minimee
    @Mr.Hbk_Minimee 2 ปีที่แล้ว +3

    bhaiya you are doing good and doing soo much for us thankyou for such a quality content.

  • @Ace-y9e
    @Ace-y9e 4 หลายเดือนก่อน

    jo important hai ussi ko hagg diyaa...wahaa sir ji

  • @abdxlive
    @abdxlive 3 หลายเดือนก่อน +1

    lecture 35 to be rewatched again 😅

  • @hirithik
    @hirithik 2 ปีที่แล้ว +5

    #PYTHON CODE
    def merge_sort(array):
    #Agar array sirf 1 element ka hai tab
    if (len(array)

  • @musicclub1862
    @musicclub1862 5 หลายเดือนก่อน

    Mid=start+(end-start)/2 use kro because we know integer ka range -2raise to powe 31 to 2 raise to power 31 minus 1 if we use mid=start+end/2 then integer ka range sa bahar chla jyggg

  • @ajaykushwaha-0108
    @ajaykushwaha-0108 ปีที่แล้ว

    thank you bhaiya samajh aa raha hai bas ye wali video repeat karunga

  • @pranjalyadav6005
    @pranjalyadav6005 ปีที่แล้ว +1

    if we implement (s+e)/2 then, there sum can go out of integer value so better to use: s+(e-s)/2;

  • @swarupmahata9717
    @swarupmahata9717 2 ปีที่แล้ว +1

    Happy Teachers Day Sir🙏

  • @RohitRana-tz2lr
    @RohitRana-tz2lr 2 ปีที่แล้ว +1

    Thank bhaiya for all of your efforts

  • @ankushladani496
    @ankushladani496 2 ปีที่แล้ว +2

    (S+e)/2 me badi value ke liye problem create krega isliye ham s + (e-s)/2 use krte he

  • @atharvachaudhari6462
    @atharvachaudhari6462 2 ปีที่แล้ว +1

    marking attendance tbh i havent understand the code part of vdo that much

  • @Name-f9v1n
    @Name-f9v1n หลายเดือนก่อน +1

    Ye lecture thora upar upar se chala gaya😢 koi nahi pehle khud try karunga or agar phir bhe nahi howa to wapas se dekhunga complete to kerna hai kisi bhe haal m

  • @uncertain3839
    @uncertain3839 2 ปีที่แล้ว

    Present Bhaiya🙋‍♂️🙋‍♂️

  • @lovebabbarfan8989
    @lovebabbarfan8989 2 ปีที่แล้ว +2

    Commenting for better reach #dsa #lovebabbar

  • @sahilanand30
    @sahilanand30 2 ปีที่แล้ว +2

    To the point explanation 👏

  • @anmolgupta7585
    @anmolgupta7585 2 ปีที่แล้ว +4

    How are the two parts of array being sorted by using mergesort recursive call

  • @yashbhawsar8347
    @yashbhawsar8347 2 ปีที่แล้ว

    Ajay Raj bhiya video editing 👌👌👌

  • @adityarana3722
    @adityarana3722 5 หลายเดือนก่อน +7

    Watch striver's video for merge sort for pseduocode

    • @consumeraverage8649
      @consumeraverage8649 28 วันที่ผ่านมา

      can you show the link ?? what is the name of the channel ?

  • @createhistorywithab5054
    @createhistorywithab5054 ปีที่แล้ว

    Bhaiya we couldn't take mid equal s+e because it may happen sum is greater then integer limit cause overflow problem therefore we take s + (e-s)/2 in place of (s+e)/2

  • @patelrajkumarnareshkumar8156
    @patelrajkumarnareshkumar8156 2 ปีที่แล้ว

    As usual marking Present Bhaiya.

  • @bhaskardwarka9767
    @bhaskardwarka9767 2 ปีที่แล้ว +1

    S+(E-S)/2,AS s+e/2 will exceed the limit of integer.

  • @kaustubhpathak
    @kaustubhpathak ปีที่แล้ว

    It's very intresting to learn from your videos !!

  • @anishbarnwal5676
    @anishbarnwal5676 ปีที่แล้ว +1

    Thankyou bhaiya for this amazing lecture🔥❤️

  • @avibirla9863
    @avibirla9863 2 ปีที่แล้ว +1

    s+(e-s)/2 ....or else int limit overflow hone k chances or code fhat jaaega ♥️♥️

  • @mokshmehan7695
    @mokshmehan7695 10 หลายเดือนก่อน

    Great lecture sir, thankyou so much.

  • @ParvezKhan-mj7yt
    @ParvezKhan-mj7yt 5 วันที่ผ่านมา

    It was little difficult.. But bro did his best