Median of Two Sorted Arrays | PART-1 | Brute Force | Better Approach | Google | Apple | Leetcode - 4

iPad PDF Notes - github.com/MAZHARMIK/Intervie...
Part-2 (Binary Search) - • Median of Two Sorted A...
This is the 60th Video on our Arrays (1-D & 2-D) Playlist.
In this video we will try to solve a very very famous array Problem - Median of Two Sorted Arrays (Leetcode-4).
I will explain the intuition so easily that you will never forget and start seeing this as cakewalk EASYYY.
We will do live coding after explanation and see if we are able to pass all the test cases.
Problem Name : Median of Two Sorted Arrays
Company Tags : Google, Microsoft, Apple, Zenefits, Yahoo, Adobe, Dropbox
My solutions on Github : github.com/MAZHARMIK/Intervie...
Leetcode Link : leetcode.com/problems/median-...
My DP Concepts Playlist : • Roadmap for DP | How t...
My Graph Concepts Playlist : • Graph Concepts & Qns -...
My GitHub Repo for interview preparation : github.com/MAZHARMIK/Intervie...
Subscribe to my channel : / @codestorywithmik
Instagram : / codestorywithmik
Facebook : / 100090524295846
Twitter : / cswithmik
╔═╦╗╔╦╗╔═╦═╦╦╦╦╗╔═╗
║╚╣║║║╚╣╚╣╔╣╔╣║╚╣═╣
╠╗║╚╝║║╠╗║╚╣║║║║║═╣
╚═╩══╩═╩═╩═╩╝╚╩═╩═╝
#coding #helpajobseeker #easyrecipes #leetcode #leetcodequestionandanswers #leetcodesolution #leetcodedailychallenge #leetcodequestions #leetcodechallenge #hindi #india #coding #helpajobseeker #easyrecipes #leetcode #leetcodequestionandanswers #leetcodesolution #leetcodedailychallenge#leetcodequestions #leetcodechallenge #hindi #india #hindiexplanation #hindiexplained #easyexplaination #interview#interviewtips #interviewpreparation #interview_ds_algo #hinglish #github #design #data #google #video #instagram #facebook

Пікірлер: 58

  • @dhairyachauhan6622
    @dhairyachauhan662210 ай бұрын

    the best part of this video is we can actually think that binary search can be applied after seeing your approach.

  • @codestorywithMIK

    @codestorywithMIK

    10 ай бұрын

    So glad to hear ❤️🙏😇 Part-2 coming now. Uploaded almost 🙏🙏🙏

  • @somakbhuti9501
    @somakbhuti950120 күн бұрын

    UNDERRATED CHANNEL

  • @codestorywithMIK
    @codestorywithMIK10 ай бұрын

    iPad PDF Notes - github.com/MAZHARMIK/Interview_DS_Algo/blob/master/iPad%20PDF%20Notes/Leetcode-4-Median%20of%20Two%20Sorted%20Arrays(Binary%20Search).pdf Part-2 (Binary Search) - kzread.info/dash/bejne/aaJ1pNODc6izpbw.html Hi guys, just to let you know, we can stop our traversal as soon as we get our element1 and element2 😊 Thank you ❤❤

  • @shahrohit01

    @shahrohit01

    10 ай бұрын

    Time : O(m+n) and space O(1) class Solution { public: double findMedianSortedArrays(vector& nums1, vector& nums2) { int m = nums1.size(); int n = nums2.size(); int i = 0, j = 0, k = 0; int left = INT_MIN, right = INT_MIN; while(i < m && j < n && k

  • @Bhavisshyya
    @Bhavisshyya10 ай бұрын

    what an easy approach, easy and intuitive. Better then cuts approach.

  • @codestorywithMIK

    @codestorywithMIK

    10 ай бұрын

    😇🙏❤️

  • @MohitKumar-zh9en
    @MohitKumar-zh9en10 ай бұрын

    much waited video

  • @Alokankit627
    @Alokankit6272 ай бұрын

    he explained this in such a good way that i can't explain in words.

  • @Thriftinghai
    @Thriftinghai10 ай бұрын

    I didn't know about the O(1) space approach. love you sir ❣

  • @souravjoshi2293
    @souravjoshi229310 ай бұрын

    Just loved the O(1) space intuition. Thanks a lot

  • @wearevacationuncoverers
    @wearevacationuncoverers10 ай бұрын

    No once can teach like you bro. Thank you so much. I was able to get the O(1) space approach on my own but the implementation was not clean like yours. Thank you

  • @AlishaKhan-ww3io
    @AlishaKhan-ww3io10 ай бұрын

    Awesome and crystal clear explanation 🔥🔥

  • @09avishkargaikwad71
    @09avishkargaikwad7110 ай бұрын

    Next level explanation : Waiting for O(m+n) solution And also eagerly waiting for leetcode contest solution video @codestorywithMIK

  • @codestorywithMIK

    @codestorywithMIK

    10 ай бұрын

    Uploaded kzread.info/dash/bejne/aaJ1pNODc6izpbw.htmlsi=DM7ufi1xy_xG0qJV 😇🙏❤️

  • @Mritunjay2802
    @Mritunjay280210 ай бұрын

    nice explanation ❤❤

  • @HealthyOm
    @HealthyOm10 ай бұрын

    Regular viewers ❤❤❤❤

  • @TechWithSaumya
    @TechWithSaumya3 ай бұрын

    Well explained

  • @harshmishra7890
    @harshmishra789010 ай бұрын

    Finally

  • @ugcwithaddi
    @ugcwithaddi10 ай бұрын

    King 👑

  • @nagmakhan3165
    @nagmakhan31659 ай бұрын

    Great 👍

  • @umeshbisht1054
    @umeshbisht105410 ай бұрын

    Thanku bhaiya ❤

  • @codestorywithMIK

    @codestorywithMIK

    10 ай бұрын

    Thank you 😇🙏

  • @xiaoshen194
    @xiaoshen19410 ай бұрын

    Follow up : mode of 2 sorted arrays 💀😹😹

  • @tutuimam3381
    @tutuimam338110 ай бұрын

    Amazing❤❤❤

  • @VishooVerma
    @VishooVerma10 ай бұрын

    great work bro

  • @codestorywithMIK

    @codestorywithMIK

    10 ай бұрын

    Thank you so much ❤️🙏😇

  • @rahulsati5819
    @rahulsati58195 ай бұрын

    fab😍

  • @AmanSingh-cq6yi
    @AmanSingh-cq6yi7 ай бұрын

    #explanation top notch

  • @codestorywithMIK

    @codestorywithMIK

    7 ай бұрын

    Thank you so much 😇🙏

  • @mohithadiyal6083
    @mohithadiyal608310 ай бұрын

    Again the best explanation

  • @codestorywithMIK

    @codestorywithMIK

    10 ай бұрын

    Thank you 😇🙏❤️

  • @bloggerayush8550
    @bloggerayush85502 ай бұрын

    Mazhar bro, if possible please add time stamp in your videos, the length of the videos are very long. So that we can go to directly at a particular time. Otherwise your content is top-notch bro

  • @codestorywithMIK

    @codestorywithMIK

    2 ай бұрын

    Sure thing ❤️❤️❤️ Actually in old videos i didn’t add the time stamps. In new videos i have started to add time stamps in long videos. Let me start adding them in my old videos too in my free times ❤️

  • @codeandtalk6
    @codeandtalk610 ай бұрын

    ❤❤❤

  • @Ayush-rb4wy
    @Ayush-rb4wy10 ай бұрын

    very awesome explaination

  • @codestorywithMIK

    @codestorywithMIK

    10 ай бұрын

    Thank you 😇

  • @dayashankarlakhotia4943
    @dayashankarlakhotia494310 ай бұрын

    good explanation understood 👍

  • @codestorywithMIK

    @codestorywithMIK

    10 ай бұрын

    Glad it helped 😇🙏❤️

  • @suryakantshukla4137
    @suryakantshukla413710 ай бұрын

    Please post the optimal solution video.

  • @codestorywithMIK

    @codestorywithMIK

    10 ай бұрын

    Yep will be uploaded after 1-2 hour. Just finished with office and returned home . Sorry for the delay today 🙏😇❤️

  • @Tejaswi-xd4re
    @Tejaswi-xd4re10 ай бұрын

    Sir can we expect ur sde sheet to come this weekend??

  • @codestorywithMIK

    @codestorywithMIK

    10 ай бұрын

    Yes

  • @GeneralistDev
    @GeneralistDev10 ай бұрын

    waiting for part 2

  • @codestorywithMIK

    @codestorywithMIK

    10 ай бұрын

    Yes, being uploaded now 🙏😇 Got delayed due to office

  • @rajkrishanmahajan2373
    @rajkrishanmahajan237310 ай бұрын

    this hard question i solve within 5 min but space o(m+n)😅😆😆

  • @dishamandal5792
    @dishamandal57924 ай бұрын

    Can someone post the link of array playlist?

  • @codestorywithMIK

    @codestorywithMIK

    4 ай бұрын

    kzread.info/head/PLpIkg8OmuX-K6A0sEPFxOSJh4_AjCGAFf&si=5M6jSrM9FJ7DDFXR ❤️❤️🙏🙏

  • @anushkathakur6531
    @anushkathakur653110 ай бұрын

    Bhaiya Aisa nhi kar sakte ki jaise hi required index tak k pahuch Jaye uske baad comparison band karde...

  • @codestorywithMIK

    @codestorywithMIK

    10 ай бұрын

    I was waiting for someone to say that. You can definitely stop the traversal as soon as you get both of idx1 and idx2 . Brilliant observation 👍🏻👍🏻👍🏻

  • @ashutosh61290
    @ashutosh6129010 ай бұрын

    29:58 yaha pe aapne code ko shi kaise kiya?? i mean wo aage likha gya tha toh use line pe kaise laye?? kon se key ko press kiye😅😅

  • @RiyazParve
    @RiyazParve10 ай бұрын

    Kitne baje tak aayega part 2?

  • @codestorywithMIK

    @codestorywithMIK

    10 ай бұрын

    Yep already there 🙏😇❤️ kzread.info/dash/bejne/aaJ1pNODc6izpbw.htmlsi=DM7ufi1xy_xG0qJV

  • @RiyazParve

    @RiyazParve

    10 ай бұрын

    @@codestorywithMIK thanks 😊 🙏

  • @jayeshagrawal4623
    @jayeshagrawal462310 ай бұрын

    Part 2 ???

  • @codestorywithMIK

    @codestorywithMIK

    10 ай бұрын

    Being uploaded now. Just got delayed due to office

  • @surajsidar2294
    @surajsidar22942 ай бұрын

    When nums1 and nums2 have equal elements This case was ignored in your code nums1 = [0,0] nums2 = [0,0]

  • @bhartipatel7833
    @bhartipatel783310 ай бұрын

    Itne asan question ko hard ki category me kyu daal diya 🥲

Келесі