Hey.. I landed an offer for a Senior Frontend Developer position last week.. All thanks to your super useful videos.. thanks a ton.. U keep going n i wish u reach great heights
thanks for the input. I was thinking about that but , lot of the audience is new to algo so for them I thought of giving little bit clarity. I am in the process of making the video for O(log(m+n)) and space complexity O(1) . Will release that next.
At 8:31 shouldn't his return statement be totalArray.length%2, not totalArray%2, because we want to see if the array length is odd or even for the ternary operator? I'm not a high level coder by any means, i need confirmation cause I keep getting a different answer other than 2.5. Thank You in ADV.
You are right. I think I made a mistake in hurry. it should be totalArray.length%2. I am surprised that you are the first one to point this out. Thank you!
Sir, I'm not sure why the multiple 'while' loop approach? The first one - the Brute force one - felt far more easier and it's so much more easier with JS.
You can also do it in one loop however for a video like this its easier to show whats going on in two multiple loops. I think complexity remain the same , its just code is bit more readable for novice.
Thanks :) for your efforts for providing such type of easily understandable content. I go through a lot of content on RUclips but my finding get completed when I found your channel. In my life all the front-end knowledge and all the interviews which I cleared was because of your efforts. Thanks a lot!!! keep going (y) ...Best Wishes!!!
The brute force method has an error -> it's supposed to be : return middle % 2 !== 0 ? (totalArray[middle] + totalArray[middle -1]) / 2 : totalArray[middle]
If I understand it correctly You do not have to merged full m+n length array. You just have to determined what is on floor((m+n)/2) position and return it value (or for even length return (floor((m+n)/2)+floor((m+n+1)/2))/2) )
How is this an O(log(m+n)) solution? Instead this is a O(m+n) solution! You will have to find the median of the 2 arrays without creating a single sorted array in order to achieve O(log(m+n))
Your solution is O(N + M) but in question they what O(log(N+M))
I will create another video for lo(n+n) I was going to do it but then I thought lot of people need bit more linear way.
It would be great if you make a video on Heap data structure.
Please it's a request.
@@Techsithtube yes your solution is easy for beginners, thank you upload more videos
But as per the question, space complexity required was o(log(m+n)) but you did it in o(m+n)
I am going to create another video to cover o(log(m+n) ) the video was bit longer so I am going to split into two.
Hey.. I landed an offer for a Senior Frontend Developer position last week.. All thanks to your super useful videos.. thanks a ton.. U keep going n i wish u reach great heights
Great. Congratulations! I wish you best luck on your new endeavor. keep on learning!
new technique I learned...thanks :)
Great vid!
Love your explanation technique...
Please don't stop ... just continue this series as long as possible & I will keep commenting ,like & share ON.THANX A TON SIR
Don't worry! I will keep making such videos. Thanks for watching!
I looked your code and the complexity of the merged approach is also O(Max(M,N)), not log(m+n)
yes that is true
Really nice explanation .... Keep sharing knowledge with us...👍
I will try my best
@@Techsithtube is the second solution provided not O(m+n) ? I think u shud also provide explanation on time complexity.
Thanks... really helpful
Nice
Thanks for watching!
tbh, you only need to while i+j
thanks for the input. I was thinking about that but , lot of the audience is new to algo so for them I thought of giving little bit clarity. I am in the process of making the video for O(log(m+n)) and space complexity O(1) . Will release that next.
Merging takes O(m + n)... log (n + m) is a lot harder than this...
I will create another video for lo(n+n) I was going to do it but then I thought lot of people need bit more linear way.
@@Techsithtube figure it out yet?
are you only gonna cover the frequent questions?
At 8:31 shouldn't his return statement be totalArray.length%2, not totalArray%2, because we want to see if the array length is odd or even for the ternary operator? I'm not a high level coder by any means, i need confirmation cause I keep getting a different answer other than 2.5. Thank You in ADV.
You are right. I think I made a mistake in hurry. it should be totalArray.length%2. I am surprised that you are the first one to point this out. Thank you!
Sir.. Do u have another channel..in the name of InterviewNest??
Sir, I'm not sure why the multiple 'while' loop approach? The first one - the Brute force one - felt far more easier and it's so much more easier with JS.
You can also do it in one loop however for a video like this its easier to show whats going on in two multiple loops. I think complexity remain the same , its just code is bit more readable for novice.
Got it! Thanks for the reply.
Thanks :) for your efforts for providing such type of easily understandable content. I go through a lot of content on RUclips but my finding get completed when I found your channel. In my life all the front-end knowledge and all the interviews which I cleared was because of your efforts.
Thanks a lot!!!
keep going (y) ...Best Wishes!!!
❤️❤️❤️❤️❤️❤️❤️
last time i was this early you teached react
I am also planning for making more react videos. this is in plans. Thanks for watching!
@@Techsithtube but continued to coding as well, I request you
The brute force method has an error -> it's supposed to be :
return middle % 2 !== 0
? (totalArray[middle] + totalArray[middle -1]) / 2
: totalArray[middle]
I just started on js and found your channel. It really helps thanks a ton. 👍🏻
Please share more leetcode problem
Himanshu, my plan is to make more such videos. thanks.
@@Techsithtube please try to upload at least one leetcode problem in a week.
@techsith please upload more leetcode problem
Hi Sir, Please provide more solutions in javascript, it's really helpful
The solution is not correct in terms of time complexity. In video it is O(m+n), whereas task requires O(log(m+n))
If I understand it correctly You do not have to merged full m+n length array. You just have to determined what is on floor((m+n)/2) position and return it value (or for even length return (floor((m+n)/2)+floor((m+n+1)/2))/2) )
2+4/2 is not 3. You're missing parenthesis.
its not part of the code. I was just explaining the logic . So didnt have to make it perfect. :)
This is not the leetcode solution because its asking to solve with O(log(m+n)), not O(m+n). Sorry, but you got incorrect answer.
How is this an O(log(m+n)) solution? Instead this is a O(m+n) solution! You will have to find the median of the 2 arrays without creating a single sorted array in order to achieve O(log(m+n))
Completed Waste my time watching O(N + M) solution