Watched 5-6 different videos, no one explained it better than you. Great examples as well. Thanks a lot
finally after going over chatpgpt, 4-5 videos and the editorial of Leetcode in vain i finally understood why not sliding window, or set. Thank you!
I just paused the video because I couldn't get this off my head: How come some people like Minmer are so devoted, so nice and politely helping people pursue a life changing career. If he wanted to do this just for money, he sure could earn more as a SDE. I feel guilty for not having this devotion and enthusiasm.
This is the best explanation for this question that I've come across. The dry run walk through finally made sense to me and I appreciate you explaining why a hash-map is needed over the hash-set.
These videos are super helpful. Really like how you discuss the trade offs between different techniques. One golden problem that’s strikes a lot of debates is Top k Frequent elements. Never fully understood how to explain it. Would be really helpful if you can cover it! Thanks for the good work.
Thank you for making this video long to take the time to explain this in detail. This problem has been melting my brain the last couple days. I subscribed and look forward to watching more of your videos
@Coding with Minmer i was asked the second variant in meta phone screening , thanks for your videos .
Holy Shit I just got the second variant and solved it without watching this video or doing it ooff guess practice does pay off, watched many thanks Minmer!
Thanks so much for all of these videos! Currently preparing for the Meta phone screen and having the variants is super helpful 💪 One question, do you have a list of common variants/follow ups outside of the videos themselves? I see your comments on leetcode when I'm looking for variants so I figure you might have a more complete list elsewhere. No worries if not, I'll definitely be watching upcoming videos anyway!
This is a very good problem and explanation. Like many I also attempted to use a sliding window and learned a lot when it failed. I think another cool variant is to return the actual subarrays instead of just the count.
i always find the example in your video is very important to reveal edge cases. When you prepare you solution, how did you come up with your example array? do you have to do multiple tries to get the right example? of course, i know you have to know the edge cases first to be able to come up with a good example that's representative enough... For me, it's hard to come up with an example within a tight time, especially in an interview....
Great!
Hey Minmer! Do Meta interviewers have a gauge on how difficult the question they gave you was? For example would they be a little bit more lenient on Accounts Merge? I thought I saw you mention that on a Reddit post.
In variant 3 if i have to calculate how many such subarrays are there , we need to then start the ith pointer on every index and try sliding window from each index right ?
Great video!! thanks for making them!! For the positive variant, before checking your code solution I came up with this one, that I think it works, but I'm not 100% sure since the sliding windows was new to me, any thoughts? def sub_sums_positive(nums: list[int], k: int) -> bool: L,R = 0,0 aux = 0 while L < len(nums) and R < len(nums): aux += nums[R] if aux == k: return True if aux < k: R+=1 elif aux > k: aux -= nums[L] aux -= nums[R] L+=1 return False Thank you again!!
Would the sliding window method get you the count as well?
why are we checking compliment subarray?? If we have a curr prefix sum a subarray of X, and we know we need subarray of K, then if we have a compliment subarray of X - K, then we found a valid subarray. ??? why
for the second variant you dont need to sort the array?
@oliveroliver5437