@oliveroliver5437

Thank you for putting this together, and I really appreciate the examples you chose and your ability to take the time to walk through them. I've done this problem a few times in the past, and felt pretty confident in it, but I couldn't get it to stick well enough to explain it with confidence. The examples you chose and the walkthrough finally connected the missing links for me. I probably would have been fine if I was given the question in an interview before I watched this vid, but now I know I will do well and having that confidence can really make the difference. 

I've put off watching some of your videos because I've been like, "meh, I pretty much know how to do that already", but now after watching this one I'm definitely going to spend the time to go back and watch the ones I skipped over. 

Thank you!

@hasson2349

Watched 5-6 different videos, no one explained it better than you. Great examples as well. Thanks a lot

@leafylemn

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!

@vahidsaber2582

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.

@kavan1773

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.

@anjulmishra4953

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.

@playfuss

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

@amruthamishra5522

@Coding with Minmer i was asked the second variant in meta phone screening , thanks for your videos .

@ezio2873

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!

@saladtrayend

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!

@shawnallenstrausser715

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.

@tracyshen430

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....

@Ma-g7n-c9v

Great!

@castleridgelabs

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.

@TechieTech-gx2kd

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 ?

@paulcruz161

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!!

@serein123

Would the sliding window method get you the count as well?

@ObtecularPk

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

@RacleandRaHill

for the second variant you dont need to sort the array?