Subarray Sum Equals K - Prefix Sums - Leetcode 560 - Python

  Рет қаралды 219,053

NeetCode

NeetCode

Күн бұрын

Пікірлер: 235
@beeramrahulreddy11
@beeramrahulreddy11 3 жыл бұрын
u forgot to add 2,1 to the hashmap
@TobiasWheaton
@TobiasWheaton 3 жыл бұрын
Good catch, i was thinking about that too bc its easier to see the pattern if its consistent on when u add (even if its not needed for this example)
@prasad9012
@prasad9012 2 жыл бұрын
I just spent like 10 minutes rewinding and forwarding the video trying to understand why 2 wasn't added. Thankfully, I found your comment now.
@dopark1027
@dopark1027 2 жыл бұрын
Actually, it is just not {2:1}. He forgot to add the current sum to the hash table when it is not found in the table.
@amritkumar8876
@amritkumar8876 2 жыл бұрын
Yup .. I was also thinking about that ..
@pwnweb5734
@pwnweb5734 2 жыл бұрын
haha yeep. my OCD went brrrr... I was like wheres the 2 :P ..
@suvajitchakrabarty
@suvajitchakrabarty 9 ай бұрын
If you are having difficulty understanding this or wrapping your head around the solution, maybe this might be a good way to think about it. The question asks how many subarray sum equals to k. For a subarray to sum to k, you need a subarray, as in a part of the array from index 'a' to index 'b' to have a sum equal to k. But when we reach any index 'b', we obviously do not know, if there was a subarray from index 'a' to index 'b' equal to k. However we do have the sums from 0 to index 'a' in our hash map, because we have been storing all sums starting from index '0' to every single index till now, and the count of them as the value of the key. Now obviously sum_0_to_a + sum_a_to_b = total sum so far (curSum). If we go to the original ask, which is we need a prefix that is sum_a_to_b to be equal to k. For that to hold true, replace sum_a_to_b with 'k'. Hence, sum_0_to_a + k = curSum. Hence curSum - k = sum_0_to_a. And then since we have been storing all possible values of sum_0_to_a so far in the hashmap, curSum - k must exist in the hashmap as a key, and we can simply add the value from the hashmap to add number of prefixes from 0 to any index which equalled to curSum - k .
@meraki___
@meraki___ Ай бұрын
Bro this comment is better than the video lmao. Thanks a lot for the explanation.
@dhairyakhara783
@dhairyakhara783 9 күн бұрын
You made the problem 1000 times easier to understand. Thank you sir!
@dishade7094
@dishade7094 8 күн бұрын
Thanks for the perfect summary. Awesome bro !
@kimstuart7989
@kimstuart7989 Жыл бұрын
You know I remember first learning CompSci, I thought the specific algorithm concepts (BFS, DFS, Dijkstra, etc.) were the hard ones to learn. Now that I am more experiences, I realize that the what I thought then were 'basic' data structures, i.e. arrays, strings, etc. are actually the harder ones to make sure you understand because those concepts has many dedicated algorithms to them, such as Kadane, prefix/suffix array, KMP etc. that you need to know to truly understand that data structure. So while I glossed over arrays because I knew their functions, I am now revisiting to make sure I understand the algorithms embedded in them. Learning truly never does stop!
@fatcat22able
@fatcat22able Жыл бұрын
Honestly same here. I figured that arrays would be relatively simple, and they are simple on the surface, but there are so many algorithms and different types of problems that involve them that it feels like they're an entire rabbit hole unto themselves.
@servantofthelord8147
@servantofthelord8147 4 ай бұрын
Facts man
@davidnwaekwu9019
@davidnwaekwu9019 2 ай бұрын
factssss, at a point i thought smth is wrong with the way i think .
@Question418
@Question418 3 жыл бұрын
I like your attempt to explain it, even though I don't fully understand it. I appreciate it.
@codetrooper9279
@codetrooper9279 Жыл бұрын
U should
@ToastFrench24
@ToastFrench24 3 ай бұрын
lmao
@apoorvwatsky
@apoorvwatsky 2 жыл бұрын
1:55 I needed to hear that, I wanted to know why sliding window won't guarantee correct answer for these constraints. That cleared it up.
@EchoZeeDot
@EchoZeeDot 3 жыл бұрын
Thanks, NeetCode for these solutions and explanations, It would be really helpful to make a video about general techniques that you use to solve these problems... Because we wan to know how to approcah these kinds of problems by ourselves. Thanks again.
@mangalegends
@mangalegends 2 жыл бұрын
I'm still trying to wrap my head around this EDIT: Came back a few weeks later and it makes 100% sense to me now
@OusmanBah-f8v
@OusmanBah-f8v 2 ай бұрын
Me right here
@josembass
@josembass 3 жыл бұрын
Great explanation. How are we supposed to come up with a solution like this in 30m without having seen it before!
@darshana5254
@darshana5254 2 жыл бұрын
We cannot. These are classic problems asked during interviews. Whoever come across this problem would easily solve it. Other would go with bruteforce approach which doesn't work on interviews.
@scionOfIkshvaku1
@scionOfIkshvaku1 2 жыл бұрын
@@darshana5254 thanks bro, you’ve raised a very important point. Only if one has encountered such problems, only then will he be able to solve the problem cuz he knows how to optimum approach.
@mobaisi13
@mobaisi13 2 жыл бұрын
That's the neat part. You don't.
@vineethsai1575
@vineethsai1575 2 жыл бұрын
I got this question in the interview and I did not know the optimal solution. However I was able to produce the n^2 solution quickly and the interviewer started giving me hints to use Hashmap to reduce it to O(N). I scrambled here and there but was able to talk about the "repeated work" being done and how I could use hashmap to save the work. In the end I was not able to code it up. Interviewer still passed me though.
@calebmitcler8760
@calebmitcler8760 2 жыл бұрын
@@vineethsai1575 what company
@scottloewke5199
@scottloewke5199 2 жыл бұрын
Good explanation and, fortunately, the omission of the [key = 2, count = 1] map entry did not affect the result. However, it would be good if NeetCode could add text at that part in the video to make it clear what happened.
@AndreiSokolov-k7j
@AndreiSokolov-k7j 8 ай бұрын
It's not about a bug in the code, it's about a bug in the video. 9:55 Here you should have added key 2 and value 1 to the hashmap and that's it.
@CliffordFajardo
@CliffordFajardo 3 жыл бұрын
Initially I thought it was a sliding window problem, Trying to wrap my head around this ...patience, time...ahhh. Thanks for the video!
@ziomalZparafii
@ziomalZparafii 2 жыл бұрын
I thought about it as a sliding window problem until I found out there can be negative values. If we would only have positive ones, you would increment right pointer while sum is less than k, then increment left while sume is more than k. That would be my approach (not tested).
@aleksandr_t
@aleksandr_t Жыл бұрын
@@ziomalZparafii the main problem behind sliding window approach is some edge cases. For example: [1,-1,0], k = 0 If we will use two pointers approach (or dynamic sliding window), then we will return 2 instead of 3. 1) sum=1, count=0, left=0, right=0 2) sum=0, count=1, left=1, right=1 3) sum=0, count=2, left=2, right=2
@ziomalZparafii
@ziomalZparafii Жыл бұрын
@@aleksandr_t you have a negative value in your array. Read my comment once again :-)
@matom2473
@matom2473 8 ай бұрын
in a real interview we can not make this mistake, it will take you 20 mins to find out sliding window will not work
@RuslanZinovyev
@RuslanZinovyev 5 ай бұрын
@@ziomalZparafii you still can use a sliding window with negative numbers, it depends on requirements and edge cases, so your first comment is not entirely accurate.
@timzhang6651
@timzhang6651 3 жыл бұрын
Well explained, and it takes effort to make a video as good as this. Thank you!
@darkwhite2247
@darkwhite2247 10 ай бұрын
08:21 - i have no idea how we are supposed to figure out during the coding interview that (0,1) has to be added into the hashmap by default. How is anyone solving this without memorizing during interviews? May be i'm dumb to not understand this even though the instructor is explaining it. Please help me understand the intution behind adding (0,1) in hashmap by default.
@AndreiSokolov-k7j
@AndreiSokolov-k7j 8 ай бұрын
bcs if you find that n-k = 0 means that you dont need to remove anything so basically it be 0, 1 by default
@arunraman6630
@arunraman6630 2 жыл бұрын
A slightly cleaner solution using a defaultdict class Solution: def subarraySum(self, nums: List[int], k: int) -> int: prefixSums = defaultdict(int, { 0 : 1 }) curSum = 0 res = 0 for n in nums: curSum += n res += prefixSums[curSum - k] prefixSums[curSum] += 1 return res
@user-wx8hn3ng6b
@user-wx8hn3ng6b Ай бұрын
It's a good combination of two sum and prefix sum. And the intuition should be: 1. subarray sum -> prefix 2. equals k -> two sum The only difference is it's 'b - a = k' instead of 'b + a = k', and you just need to calculate the 'a' differently.
@Adam-tz6gk
@Adam-tz6gk 2 ай бұрын
This is by far the best explanation in the web for this problem, thank you so much NeetCode!
@edwardteach2
@edwardteach2 2 жыл бұрын
Another way to think about why we would set our key value to {0:1} instead of memorizing, is to think what if that single element, itself is the target. For example: input = [1, 1, 4] , k = 4 occur = { 0: 1 } By just eyeballing, you'll see the output is 1, since the last element is a 4. When we iterate through the input, we'll do input[2] - k (4 - 4) = 0. Do we have a 0 in our hashmap/dictionary? Yes we do, it's value is 1.
@alvjou
@alvjou 2 жыл бұрын
except in this scenario wouldn't we be doing currSum - k (6 - 2) = 2, and we would be looking up the value for 2 in our hash map, which would be 1. I think your scenario only works if the single element that is the target is the first element in the input.
@X3Maverick
@X3Maverick 5 ай бұрын
00:40 The brute force approach is O(n^3), not O(n^2). There are ~n^2 subarrays but summing a subarray is O(n).
@spacetime_wanderer
@spacetime_wanderer 11 күн бұрын
It is n^3 if you calculate sum from 0 to n everytime. It is n^2 if you maintain a sum variable for the innerloop and simply add num[i] to it.
@Wes-Tyler
@Wes-Tyler 2 жыл бұрын
You explained it so perfectly that I didn't even need to see the code to be able to code it myself :) thank you!!
@uzzwalpreetkaur3374
@uzzwalpreetkaur3374 6 ай бұрын
I understood this explanation! Thanks!! I was trying with sliding window technique first and getting the wrong answer until I realised that we can have negative numbers. This is indeed is a neat.
@tempregex8520
@tempregex8520 2 жыл бұрын
i appreciated you explaining this. But, it would have been more helpful(esp to people like me) where you would have taken the time to explain more about the use of HashMap for maintaining prefixSum -> Count to me it felt like the explanation went "too fast" as soon as you discussed the brute force solution.But, in any case a great attempt indeed.
@unwarysage05w32
@unwarysage05w32 2 жыл бұрын
This is a way better explanation than leetcode premium’s explanation thank you!
@smonkey001
@smonkey001 2 жыл бұрын
Godlike explanation to a looked easy problem. Hats off my man
@dharmvtiwari6286
@dharmvtiwari6286 8 ай бұрын
There is another edge case for adding 0->1in the starting , which is if the. nums[0] is 0. This intuition is quite tricky but great explanation.
@roman-berezkin
@roman-berezkin 2 ай бұрын
Absolutely love this guy, not lessons but a masterpiece!
@daylansit4537
@daylansit4537 2 жыл бұрын
By far the best explanation to this problem
@quirkyquester
@quirkyquester 2 ай бұрын
just gotta keep practicing! Thank you Neetcode for making all these amazing videos!
@cranos666
@cranos666 3 жыл бұрын
Crazy good explanation. Subscribed. Thank you man !
@lakcai4063
@lakcai4063 Жыл бұрын
This is probably the best explanation of this question on KZbin
@mukeshmanral1327
@mukeshmanral1327 3 ай бұрын
what a great explanation , saw many videos, amazing explanation of intuition.
@benk2451
@benk2451 11 ай бұрын
Very well explained! Thank you so much!
@almasabdrazak5089
@almasabdrazak5089 3 жыл бұрын
so what you are saying is we have a map that shows how many ways we can come up with given sum so for sum 0 we can come up with 2 sequences, but these sequences have to be contiguous , how to prove that 0 has 2 only if we pop up contiguous elements from current sum ?
@MP-ny3ep
@MP-ny3ep Жыл бұрын
Hands down the best coding youtube channel
@Thewowhahahawow
@Thewowhahahawow 3 жыл бұрын
What a god of prefix sums. Great vid!
@soanonso
@soanonso 2 жыл бұрын
Really good explanation. Thanks.
@chenhaibin2010
@chenhaibin2010 2 жыл бұрын
brilliant trick of adding a prefix 0 to count no prefix situation instead of another if statement
@Mohith7548
@Mohith7548 2 жыл бұрын
I don't know why it works, but still works! ;) Everytime I have to revisit the solution before interview. ;(
@SonGoku-lc1sb
@SonGoku-lc1sb 2 жыл бұрын
Perfect explaination. The best one on youtube so far
@sgetti4dinner
@sgetti4dinner 5 ай бұрын
I see some confusion on why we initialize prefixSum = {0:1}, and that's because we can always produce 0 by taking no elements from our array (e.g. []). This works out nicely when we run into a subarray that has a sum == k, because sum - k = 0. Then the question we ask at this moment is "is there a prefix-subarray I can take away from my current subarray sum that also equals 0?" The answer is yes, because I can takeaway no elements from my current subarray and the current subarray sum will still equal k.
@emekaobasi4765
@emekaobasi4765 2 жыл бұрын
why do we add to the hashMap after checking for diff? Can we add to the hashMap after checking for diff?
@jameszhang9422
@jameszhang9422 9 ай бұрын
Very clear explanation! Even better on the second watch lol.
@thndesmondsaid
@thndesmondsaid 3 ай бұрын
the idea that we're expected to come up with this solution on the fly in an interview is bonkers to me
@meylyssa3666
@meylyssa3666 8 ай бұрын
thank you so much for you clear explanations!
@Nahwka
@Nahwka Ай бұрын
Believe it or not this was the entire solution that actually killed me 😂
@nivethanyogarajah1493
@nivethanyogarajah1493 7 ай бұрын
Very nice explanation!
@hwang1607
@hwang1607 3 ай бұрын
great solution thank you
@celinlu7274
@celinlu7274 2 жыл бұрын
Your video is much better than the video in leetcode solution. Thank you.
@GdeVseSvobodnyeNiki
@GdeVseSvobodnyeNiki 2 жыл бұрын
Finally a great explanation what hashmap actually represents! Got the essentials of the algorithm on the first watch of this video, but was banging my head against the wall trying to figure it out on leetcode.
@itspete2444
@itspete2444 8 ай бұрын
Why are array and string problems 10x harder than graph, matrix and dp???
@kaushik.aryan04
@kaushik.aryan04 8 ай бұрын
yeah atleast graph matrix dp follow a single type of questions these are like so different from each other
@phebos2228
@phebos2228 2 жыл бұрын
Bless you, O savior from heavens above!!
@edwardteach2
@edwardteach2 2 жыл бұрын
My python implementation: class Solution(object): def subarraySum(self, nums, k): """ :type nums: List[int] :type k: int :rtype: int """ occur = collections.defaultdict(int) occur[0] = 1 count = 0 cur_sum = 0 for n in nums: cur_sum += n if cur_sum - k in occur: count += occur[cur_sum-k] occur[cur_sum] += 1 return count
@michelleyang1881
@michelleyang1881 2 жыл бұрын
really clear explanation. Thank you!
@zj82119
@zj82119 3 жыл бұрын
nice explanation with good diagram. really helpful.
@fengliu975
@fengliu975 2 жыл бұрын
Did this problem but used an array to keep track of the running totals then reversed it... used a deque after but wow is deque slow and memory intensive
@xmnemonic
@xmnemonic Жыл бұрын
Added more comments, explanation, changed diff to prevSum which I think makes it easier to understand: class Solution: def subarraySum(self, nums: List[int], k: int) -> int: kCount = 0 curSum = 0 prefixSums = {0:1} for n in nums: curSum += n # We are at curSum, but we want to know how many sum = k # have occurred. k = curSum - prevSum, use the prefixSums # hashmap to determine how many prevSums occurred. Each # one represents a potential subarray that could be # subtracted to reach sum = k. prevSum = curSum - k kCount += prefixSums.get(prevSum, 0) # Update prefixSums AFTER we have gotten the kCount for # this curSum. We ensure that kCount considers only # prevSums prior to this iteration. Including this sum # potentially doublecounts the n of this iteration, # using the n in both curSum and prevSum. prefixSums[curSum] = 1 + prefixSums.get(curSum,0) return kCount
@MinhNguyen-lz1pg
@MinhNguyen-lz1pg 2 жыл бұрын
Great Solution! Just want to leave a comment and a slight change in hashmap. If you don't want to have a base case, just make sure to add 1 to the count when you see curr_sum == k class Solution: def subarraySum(self, nums: List[int], k: int) -> int: curr_sum = 0 count = 0 sum_to_count = collections.defaultdict(int) for n in nums: curr_sum += n if curr_sum == k: count += 1 count += sum_to_count[curr_sum - k] sum_to_count[curr_sum] += 1 return count
@АлександрПетровский-м3з
@АлександрПетровский-м3з Жыл бұрын
Very nice & clear. TY!
@thegod3500
@thegod3500 Жыл бұрын
Finally some decent explanation of this magic
@kirillzlobin7135
@kirillzlobin7135 10 ай бұрын
Can it be considered as a dynamic programming solution?
@dipeshbhardwaj1747
@dipeshbhardwaj1747 2 жыл бұрын
Hi @NeetCode. I am not able to understand the part where you say. we need to add the prefix sum to Hashmap simultaneously. even if are maintaining the Hashmap first. we can still get count of prefix - k and prefix = k.
@anandmehrotra6170
@anandmehrotra6170 2 жыл бұрын
Take this example: [1]; k = 0. Without adding first your prefix sum array would be: 0->1 and 1->1. Now you will compute prefixSum-k for each key. 0 - 0 = 0, You say you have a match(which is just the empty prefix). Now you compute 1- 0 = 1, you check your map and the value exists, so you return a count of 2. That is why the update needs to happen simultaneously. So, that you can check the subarray between some starting index "i" and current index "k"(excluding k). Hope this makes sense.
@ShivangiSingh-wc3gk
@ShivangiSingh-wc3gk 2 жыл бұрын
Thank you so much!! Amazing walkthrough
@Obligedcartoon
@Obligedcartoon 2 жыл бұрын
This is a LC hard imo, gawd damn!
@NeetCode
@NeetCode 2 жыл бұрын
Agree, it's definitely more difficult than some actual hard problems.
@mikhassik
@mikhassik Жыл бұрын
Neetcode's videos are usually the ones that drive it home
@hoatruong2474
@hoatruong2474 2 жыл бұрын
Very informative man. Keep up the good work.
@razisyed9481
@razisyed9481 2 жыл бұрын
Amazing explanation--thank you!
@lakshyadhawan800
@lakshyadhawan800 3 ай бұрын
nice explaination
@AmolGautam
@AmolGautam Жыл бұрын
Thank you so much for this.
@slayerzerg
@slayerzerg 2 жыл бұрын
get() is unnecessary can just add to hashmap regularly. this drawing analysis is goated though!!!
@anastasiiafilippova5212
@anastasiiafilippova5212 Ай бұрын
Brute force is n**3 not n**2 as stated. n**2 for all possible subarrays and n for the sum
@vinethasuresh3488
@vinethasuresh3488 Жыл бұрын
Thanks for this video sir , it helped a lot.
@NeetCode
@NeetCode Жыл бұрын
Happy to help!
@odelyaholiday9519
@odelyaholiday9519 Жыл бұрын
It's easier to use defaultdict instead of the .get
@divyanshmishra5121
@divyanshmishra5121 Жыл бұрын
I have a doubt. If the array is 6,4,3 and k is 9. we find that sum till n is 13 and 13-k ie 13-9=4 is present in the array so that will get counted but in reality it is wrong as it is not a subarray is we dont pick contiguous element. please explain
@ngndnd
@ngndnd Жыл бұрын
i think im just dumb af bc i still dont understand it
@definitesquare
@definitesquare Ай бұрын
Thank you neet bhai
@orellavie6233
@orellavie6233 2 жыл бұрын
I am not sure, but take an example where the array is [-1,1,-1] and k>0(e.g., 2). The result would be 1, since after the 1 is covered, and then we went into the -1 again, the result will be 1, and that's not true (should be 0). Am I missing something? I think the results should be added only if the cursum is >=k
@itachijonin
@itachijonin 2 жыл бұрын
really good explanation. my one nit is that you should make your code more pythonic (camel-casing?!)
@vatsalsharma5791
@vatsalsharma5791 3 жыл бұрын
Awesome explanation❤️ Can you plz solve Count submatrices with all ones?
@cbverma2k
@cbverma2k 2 жыл бұрын
Super like and well explained
@m04d10y1996
@m04d10y1996 2 жыл бұрын
Why did you initialised your dictionary before hand with (0:1)
@arifinrahman6
@arifinrahman6 2 ай бұрын
amazing explanation :)
@siriussem2
@siriussem2 Жыл бұрын
yey first real english guide!
@oscarchan5684
@oscarchan5684 2 жыл бұрын
Thank you for such a clear explanation!!!👍🙏
@AbhishekJaiswal24
@AbhishekJaiswal24 2 жыл бұрын
Thanks neetcode !!!
@shaon6996
@shaon6996 2 жыл бұрын
Great explanation!
@vishalanthony1529
@vishalanthony1529 Ай бұрын
This is one of those rare videos of Neetcode where I could not really understand what he is trying to convey
@shrimpo6416
@shrimpo6416 2 жыл бұрын
great explanation!!!
@jameszhang9422
@jameszhang9422 2 жыл бұрын
Thank you for the great video!
@nemesis_rc
@nemesis_rc 3 жыл бұрын
Your channel is really underrated man 😢
@TokyoXtreme
@TokyoXtreme 3 жыл бұрын
Truth.
@juliewiner5287
@juliewiner5287 2 жыл бұрын
but how do you know the difference will be contigous with the current sum ?
@nguessaneric9830
@nguessaneric9830 2 жыл бұрын
Because you substract a prefix, you don't select element in your window
@ygwg6145
@ygwg6145 Жыл бұрын
It appears easier to use hash table cum->deque[index]. It did pass all the tests.
@chilly2171
@chilly2171 2 жыл бұрын
9:04, shouldn't it be 3 instead of -3? since you need to add 3 to 0 to form K.
@nemesis_rc
@nemesis_rc 3 жыл бұрын
Explained well 👍
@aadil4236
@aadil4236 2 жыл бұрын
10:02 Why didn't we add 2 as a prefix there? Was that a mistake on your part? I'm confused.
@andrewsowell3088
@andrewsowell3088 2 жыл бұрын
Yep, should have been added
@asdfasyakitori8514
@asdfasyakitori8514 Жыл бұрын
Great video
@LogicLoop8
@LogicLoop8 4 ай бұрын
Why doesn't sliding window approach fails here: - Assumption: adding an element to increase and removing an element to decrease any sum is valid only if all elements are non-negative. - removing negative elements increases total sum and vice versa, hence breaks tests containing negative number - not suitable approach for this problem
@ryanc7840
@ryanc7840 2 жыл бұрын
Thank U. A huge kudos!
@NeetCode
@NeetCode 2 жыл бұрын
Glad it helped!
@gorilla4870
@gorilla4870 2 жыл бұрын
Simple problem, but can be quite confusing to explain. You explained it very well Neet. Thanks a lot!
@saul_no
@saul_no Жыл бұрын
I was actually asked this question for a Facebook internship position in 2019.
@dmwhite4787
@dmwhite4787 Жыл бұрын
Did you find the optimal solution in an interview? Had you seen this problem before? If no, did you pass that round?
@immortalized_onion
@immortalized_onion 3 ай бұрын
This reminds me of the two sum solution.
@4r4zzz
@4r4zzz Жыл бұрын
Thanks a lot
@mike0998unstopable
@mike0998unstopable 2 жыл бұрын
Wayyyy less confusing than the explanation on leetcode
Continuous Subarray Sum - Leetcode 523 - Python
14:56
NeetCode
Рет қаралды 71 М.
Top K Frequent Elements - Bucket Sort - Leetcode 347 - Python
13:13
Увеличили моцареллу для @Lorenzo.bagnati
00:48
Кушать Хочу
Рет қаралды 8 МЛН
Real Man relocate to Remote Controlled Car 👨🏻➡️🚙🕹️ #builderc
00:24
Count Subarray sum Equals K | Brute - Better -Optimal
24:09
take U forward
Рет қаралды 335 М.
SUBARRAY SUM EQUALS K | LEETCODE 560 | PYTHON SOLUTION
16:32
Cracking FAANG
Рет қаралды 4,4 М.
Implement Trie (Prefix Tree) - Leetcode 208
18:56
NeetCode
Рет қаралды 212 М.
Sort Colors - Quicksort Partition - Leetcode 75 - Python
15:48
How I would learn Leetcode if I could start over
18:03
NeetCodeIO
Рет қаралды 687 М.
Coin Change - Dynamic Programming Bottom Up - Leetcode 322
19:23
Увеличили моцареллу для @Lorenzo.bagnati
00:48
Кушать Хочу
Рет қаралды 8 МЛН