Love the fact that it was actually a long explanation cause you did a great job at teaching the example at hand.
@RohitKumar-vb7gt4 жыл бұрын
if anyone listen you carefully ,then easily understand...really very good explanation... bro try to upload more video(leetcode) as much as possible...
@charismatic15164 жыл бұрын
Nice explanation! However, in the code, shouldn't line 10 be nums [i - 1] instead of nums [i]? Prefix sum is sum of all elem to left of current elem (at i). That is also the reason we check for i != 0, since there is nothing to left of 0, so we cannot do nums [0 - 1] and so we assume prefix sum = 0 in that case.
@DeGoya2 жыл бұрын
depends on the requirements and constraints. Here it considers everything left from nums[0] as 0, as well as everything right from nums[nums.length - 1]
@sakshamkumarmishra2 жыл бұрын
This logic also works fine int sum=0; for(int i=0;i
@raginibhayana83052 жыл бұрын
Thank you so much and for also showing your mistakes, it helps us understand better
@Rizz_trader8 ай бұрын
that line " iam the king of mistakes"🤣🤣🤣🤣
@nandiniverma52737 ай бұрын
No dude , no mess at all thanks if the video is still longer bt you conveyed it nicely to people.
@ishaila20792 жыл бұрын
Thanks dude, you explained very well
@nandiniverma52737 ай бұрын
You are amazing leetcoder nick.
@nihardabhi56222 жыл бұрын
6:56 we respect your efforts !! love you bro !! we respect you
@truptiraut67534 жыл бұрын
You are the best leetcoder ever...your solutions are amazing with really good explanation!
@tamimshams7676 Жыл бұрын
Yo Man - You are doing great and one of the best leetCoder
@kavyabanka4482 Жыл бұрын
I love your way of teaching Nick Love from India💙
@RahulSoni-br1qd Жыл бұрын
it's more like a stand up dude ! 😂 but worth it
@nihardabhi56222 жыл бұрын
you are my ideal person !!!
@rayprusia47534 жыл бұрын
I never make mistakes, which is why watch your videos.... Just kiddin' great explanation. Thanks.
@srijitdebsarma3451 Жыл бұрын
You are the best😍😌
@dincerbeken57612 жыл бұрын
Your explanations are the best and I love you bruh (much better than neetcode), but coming directly to the total sum may be not so intuitive, was not for me. I first solved it with left to right and right to left loops. Then to remove the extra space, I came up with the total sum.
@guptashashwat2 жыл бұрын
thnx,
@ashishthakur9983 Жыл бұрын
🔥🔥🔥
@lifeofme3172 Жыл бұрын
I wasted 3 hrs in this problem. Trying to solve this