Yes I use a mouse to draw, in case you still don't believe me. Why? Because with a mouse you can artificially lower the DPI, such that I have to move my hand a few inches to move the mouse cursor by a single inch. This means I can be more precise than if i were using a pen.
Big fan of your work. Would like the earlier format without face. A lot of attention goes to your handsome face than looking at the explanation drawings
Hey I really appreciate your consistency on posting videos. Also I like the webcam, now we can see your reaction to the problems as you are explaining them to us. Makes it feel like you're human after all..
Great as usual. I approached it correctly with a sliding window method, but I used slices and I was not using the difference between indices. Great intuition, thanks.
Hey Neetcode I love your channel and love you and you're super handsome but personally I find having camera on leetcode video to be a bit distracting so I prefer no camera. Nothing personal, I can just focus on content better without camera ❤
Today's daily problem question , i was searching this with every possible filter to get a solution video from neetcode 😂 Finally its here... I didn't get (r-l+1) logic in other's code ... now its clear why Thank you
I almost had the solution for this problem and I identified the part where we are missing to count the array [5], but I did not know how to prove how many new subarrays that satisfy the condition we are adding on every correct step. I even went looking for variant formula and combinatorics. Who knew that such a simple observation with the equation is the answer.
I tried to do it with queue instead of sliding window. Despite being O(n) memory solution, the submission passed pretty efficiently. Thanks for O(1) solution. I personally like video with cam included.
the result why we do total_count += (old_windo_elements + new element) is cause new element can bring new set of sub strings where total n elements (window size = n) each can be a source for the sub string including the new element. Took me some time to understand but this should be explained.
I believe the total number of contiguous subarray is not just n^2. It is n + (n-1)+ (n-2) .....+1 = [n*(n+1)]/2 . So for array of size 4 the total number of contiguous subarrays will be 4+3+2+1 = 10 and not n^2 = 16
Another solution We can desfine int nxt[N] such that nxt[i] is the next element to the right not equal to 1 and for each pos i, we can show that the maximum number of jumps is log2(k) which is about 20 jumps int mult=1; int j=i; while(j is not out of the range && mult*a[j]
I understand the solution , but want to know , why we could not use DP here ? , also like Subarray Sum Equals K , why we were not able to use prefixSumDiff to count map ??
It's good to see you, don't get me wrong but it also has got me distracted because I want to focus on what you're doing but at the same time you kinda want to glance to the face that talks
there is no way I would think this solution in 1 go, I might know it will be a sliding window problem but the logic behind right - left + 1 would result to counting the subarray? I wont be able to guess or think of it lol.
Please no face cam bro, I come here to study and seeing anyone's face is not gonna help me to learn more. And I low key respect those who maintains anonymity.
Yes I use a mouse to draw, in case you still don't believe me. Why? Because with a mouse you can artificially lower the DPI, such that I have to move my hand a few inches to move the mouse cursor by a single inch. This means I can be more precise than if i were using a pen.
is your mouse acceleration on?
I dont think so
edit: actually yes it is
what software do you use to draw?
What software do you use for drawing?
i guess Windows Whiteboard or something like that@@varunpenumudi
Really happy to see you here again!🎉
Big fan of your work. Would like the earlier format without face. A lot of attention goes to your handsome face than looking at the explanation drawings
Woah, I said the same thing.
Yes I felt the same thing. Glad you shouted this out XD
Hey I really appreciate your consistency on posting videos. Also I like the webcam, now we can see your reaction to the problems as you are explaining them to us. Makes it feel like you're human after all..
i have been watching your channel for a while now, you are helped me a lot with learning dsa . keep the camera on . i like it this way
I prefer videos with face. It's good seeing you explaining . Big fan, been following you since 1 and a half years.
Great as usual.
I approached it correctly with a sliding window method, but I used slices and I was not using the difference between indices. Great intuition, thanks.
I’d prefer no cam, just to be able to focus better, especially since there is a disparity in light
Hey Neetcode I love your channel and love you and you're super handsome but personally I find having camera on leetcode video to be a bit distracting so I prefer no camera. Nothing personal, I can just focus on content better without camera ❤
Yeah , agree to that
Same here too. Love your content ❤
Bro, your consistency level is off the roof. I’m literally finding it hard to understand why you still leetcoding you already got it all
Hey NeetCode, I like the camera view!
NEETly explained! Thank you so much :D
def numSubarrayProductLessThanK(self, nums: List[int], k: int) -> int:
res = 0
p1, p2 = 0, 0
currentProd = 1
while p2
For loop is better, sometimes you still forget to increment p2 , most might not , just in case! You never know
@@Akhillbj I agree. Will keep this in mind.
Why l
Facecam is great addition. It provides classroom feeling and easy to understand with facial gesture
Great explanation as always. Thank you
Today's daily problem question ,
i was searching this with every possible filter to get a solution video from neetcode 😂
Finally its here...
I didn't get (r-l+1) logic in other's code ...
now its clear why
Thank you
I almost had the solution for this problem and I identified the part where we are missing to count the array [5], but I did not know how to prove how many new subarrays that satisfy the condition we are adding on every correct step. I even went looking for variant formula and combinatorics. Who knew that such a simple observation with the equation is the answer.
W NeetCode as always. I don't think you have ever missed once.
I tried to do it with queue instead of sliding window. Despite being O(n) memory solution, the submission passed pretty efficiently. Thanks for O(1) solution. I personally like video with cam included.
I was struggling with this problem couple of weeks ago and was upset to know that you didn't have video on it.
Hey NeetCode, your content is great. It would be better if you increase the audio.
how to handle the code if the array includes negative numbers as well?
thank you for your explanation :D
W man, W Webcam I would love to see this I was just doing this question !!
very helpful your videos are...
I was gonna do the daily today and just saw your upload. I guess ill be back here in 1 hour. 😅
Interested in seeing how the feedback for cam-on videos will be!
will this work for negative values too?
cam or no cam it doesn't bother me :) thank you for your work
I like the face cam, keep up the good work.
the result why we do total_count += (old_windo_elements + new element) is cause new element can bring new set of sub strings where total n elements (window size = n) each can be a source for the sub string including the new element.
Took me some time to understand but this should be explained.
I believe the total number of contiguous subarray is not just n^2. It is n + (n-1)+ (n-2) .....+1 = [n*(n+1)]/2 . So for array of size 4 the total number of contiguous subarrays will be 4+3+2+1 = 10 and not n^2 = 16
Thank you!
Hey, Neet love your videos man, would love to see the video more focused on the solution, a lot of attention goes on to your handsome face :D
Solved it!!
I think there is an issue - if l = r and item at nums[l] >= k; res will still count 1? (r-l+1) (0 + 0 + 1)
Another solution
We can desfine int nxt[N] such that nxt[i] is the next element to the right not equal to 1
and for each pos i, we can show that the maximum number of jumps is log2(k) which is about 20 jumps
int mult=1;
int j=i;
while(j is not out of the range && mult*a[j]
The facecam makes the video feel more personable. I can see how it can be distracting, but I think it brings in more value than it takes away.
I understand the solution , but want to know , why we could not use DP here ? , also like Subarray Sum Equals K , why we were not able to use prefixSumDiff to count map ??
bro keep doing the daily challenges
with face cam op!
Nice
I definetly like the videos with face cam!
WE LOVE THE CAM ON!
It's good to see you, don't get me wrong but it also has got me distracted because I want to focus on what you're doing but at the same time you kinda want to glance to the face that talks
Java Solution
class Solution {
public int numSubarrayProductLessThanK(int[] nums, int k) {
int prev = 1;
int rc = 0, i = 0;
for (int j=0;j
there is no way I would think this solution in 1 go, I might know it will be a sliding window problem but the logic behind right - left + 1 would result to counting the subarray? I wont be able to guess or think of it lol.
they just asked it in a friends interview at Linkedin and i could not pass more than 15 test cases. The struggle is real
No camera preffered!
Keep camera on in story or other videos
Binary search is very hard to think about
god damnit I was a gnat's c*nt hair away from a working solution. Thanks for the vid, bro
🎉🎉🎉🎉🎉
Without facecam. Feel it can be too distracting
better with camera
I like having the camera on, I feel like you do a better job explaining your throught process with it on.
I prefer with cam
Hhh , i did the exact same code only difference i used p instead of product
i was shocked that I couldn't find a solution this morning in your channel. But now its here, probably some race condition.
Like the facecam
I cant see your bag on the floor, so no point in keeping camera :P
i love you
you look so cute bro 🥰
Face cam is good
sorry you're too handsome it's distracting me
Please no face cam bro, I come here to study and seeing anyone's face is not gonna help me to learn more. And I low key respect those who maintains anonymity.
It’s better to have your face on
Definitely dont like the face cam. Just because it takes up screen space and serves absolutely no purpose.
Are you Indian
No offense to you, but I'd prefer videos without a face cam
I like it but your jawline makes you look so handsome that you distract me 😍
no face please