Median of two sorted arrays (Part-2) | O (log(m,n)) | FREE DSA Course in JAVA | Lecture 58

Sdílet
Vložit
  • čas přidán 26. 01. 2023
  • This question has been asked in product-based Companies like Amazon, VMware, Google, and Microsoft.
    The question reads - Find the Median of two sorted arrays with O(log(m,n)) Time complexity.
    In the previous lecture, we solve this question with linear time complexity but in this question, we have to solve it with O log (m,n) complexity.
    To find the median of two sorted arrays we must combine them into one single array with a good approach.
    But in this method, we will compromise with the time complexity given.
    So one thing which is very clear is that we have to use the binary search algorithm for this program.
    Let's see how combining two arrays into one array approach with little changes can give the desired results as asked in this program.
    Subscribe to our channel for regular updates on the dsa course and click on the bell icon to never miss an update from our dsa course.
    Data Structures and Algorithms Free Course (Learn DSA Without Paise) Playlist - • Data Structures And Al...
    For more information, fill this form: forms.gle/8eiUmM92Fx563Aen9
    or call us at 8884881203
    Facebook: / thetapacademy
    Instagram: / tapacademy_online
    Linkedin: / 73820805
    Website: www.thetapacademy.com
    #dsa #datastructures #algorithms #java #programming #coding #coder​

Komentáře • 20

  • @pragyagupta9592
    @pragyagupta9592 Před rokem +5

    Before coming to your video, I have seen 3 videos already with same logic. But the way you have explained the logic makes more sense. Pretty crisp & clear!!! Your video helped me to understood the complexity so easily. Commendable work.

  • @manwinsingh7381
    @manwinsingh7381 Před 10 měsíci +3

    There are lot of youtubers out there who has stuff. But you sir....., I don't really subscribe anyone and you made me subscribe you. Your explanation is so elegant and very easy to understand, and your approach is so unique. Please keep on posting more content so me type of guys will have someone to rely on like you

  • @MunniDivya
    @MunniDivya Před 5 měsíci

    thankyou

  • @mateuszmieckowski2297
    @mateuszmieckowski2297 Před 9 měsíci +1

    Now it is crystal clear! Thank You Sir!

  • @rampathak01
    @rampathak01 Před 6 měsíci

    This is the BEST video on the youtube for this problem.Great Job!!

  • @shivaprasadsanikop3908
    @shivaprasadsanikop3908 Před rokem +3

    really very great explaination... im surprised how the views are comparatively less.. you keep going sir u r really doing great work.!!!

  • @thellaidhinesh8646
    @thellaidhinesh8646 Před rokem +2

    awesome video bro. Initially when i saw this question in leetcode, im not sure, how iam going to solve that. after seeing you vides, its a easy piece of code for me. Thanks a lot, keep the good work going....

  • @Mirniythebest
    @Mirniythebest Před 7 měsíci

    The best explanation! Keep doing what you doing!

  • @rameezalam1968
    @rameezalam1968 Před 11 měsíci

    best explanation in youtube

  • @carefree_ladka
    @carefree_ladka Před 11 měsíci

    Hats off to you for explaining in so deep. Thanks a lot

  • @abhishekdubey9920
    @abhishekdubey9920 Před rokem

    The effort i seen , never seen before

  • @darshnamoorthielumalai3310
    @darshnamoorthielumalai3310 Před 7 měsíci

    You are a gem Man❤❤❤❤❤❤

  • @AccerAspire
    @AccerAspire Před 10 měsíci

    thankyou it helped a lot

  • @harshhwardhanrai3716
    @harshhwardhanrai3716 Před měsícem

    24:09 why we did +1 not understood

  • @BOSS55
    @BOSS55 Před 10 měsíci

    Thanks sir

  • @shubhranshukhatua2881
    @shubhranshukhatua2881 Před 9 měsíci

    great sir

  • @BOSS55
    @BOSS55 Před 10 měsíci

    amezing

  • @user-oc4hl4ih4n
    @user-oc4hl4ih4n Před 5 měsíci

    sir we can simply take two array then merge it and sort it and finding a median is easy why we are using this concept

    • @Palavi_s
      @Palavi_s Před 3 měsíci

      but it will take more time complexty and in case the the arrray length is n number it will consume more time so we use this method to make or to find median in less time