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
the best part of this video is we can actually think that binary search can be applied after seeing your approach.
@codestorywithMIK
10 ай бұрын
So glad to hear ❤️🙏😇 Part-2 coming now. Uploaded almost 🙏🙏🙏
UNDERRATED CHANNEL
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
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
what an easy approach, easy and intuitive. Better then cuts approach.
@codestorywithMIK
10 ай бұрын
😇🙏❤️
much waited video
he explained this in such a good way that i can't explain in words.
I didn't know about the O(1) space approach. love you sir ❣
Just loved the O(1) space intuition. Thanks a lot
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
Awesome and crystal clear explanation 🔥🔥
Next level explanation : Waiting for O(m+n) solution And also eagerly waiting for leetcode contest solution video @codestorywithMIK
@codestorywithMIK
10 ай бұрын
Uploaded kzread.info/dash/bejne/aaJ1pNODc6izpbw.htmlsi=DM7ufi1xy_xG0qJV 😇🙏❤️
nice explanation ❤❤
Regular viewers ❤❤❤❤
Well explained
Finally
King 👑
Great 👍
Thanku bhaiya ❤
@codestorywithMIK
10 ай бұрын
Thank you 😇🙏
Follow up : mode of 2 sorted arrays 💀😹😹
Amazing❤❤❤
great work bro
@codestorywithMIK
10 ай бұрын
Thank you so much ❤️🙏😇
fab😍
#explanation top notch
@codestorywithMIK
7 ай бұрын
Thank you so much 😇🙏
Again the best explanation
@codestorywithMIK
10 ай бұрын
Thank you 😇🙏❤️
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
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 ❤️
❤❤❤
very awesome explaination
@codestorywithMIK
10 ай бұрын
Thank you 😇
good explanation understood 👍
@codestorywithMIK
10 ай бұрын
Glad it helped 😇🙏❤️
Please post the optimal solution video.
@codestorywithMIK
10 ай бұрын
Yep will be uploaded after 1-2 hour. Just finished with office and returned home . Sorry for the delay today 🙏😇❤️
Sir can we expect ur sde sheet to come this weekend??
@codestorywithMIK
10 ай бұрын
Yes
waiting for part 2
@codestorywithMIK
10 ай бұрын
Yes, being uploaded now 🙏😇 Got delayed due to office
this hard question i solve within 5 min but space o(m+n)😅😆😆
Can someone post the link of array playlist?
@codestorywithMIK
4 ай бұрын
kzread.info/head/PLpIkg8OmuX-K6A0sEPFxOSJh4_AjCGAFf&si=5M6jSrM9FJ7DDFXR ❤️❤️🙏🙏
Bhaiya Aisa nhi kar sakte ki jaise hi required index tak k pahuch Jaye uske baad comparison band karde...
@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 👍🏻👍🏻👍🏻
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😅😅
Kitne baje tak aayega part 2?
@codestorywithMIK
10 ай бұрын
Yep already there 🙏😇❤️ kzread.info/dash/bejne/aaJ1pNODc6izpbw.htmlsi=DM7ufi1xy_xG0qJV
@RiyazParve
10 ай бұрын
@@codestorywithMIK thanks 😊 🙏
Part 2 ???
@codestorywithMIK
10 ай бұрын
Being uploaded now. Just got delayed due to office
When nums1 and nums2 have equal elements This case was ignored in your code nums1 = [0,0] nums2 = [0,0]
Itne asan question ko hard ki category me kyu daal diya 🥲