We hope you all are enjoying our videos!!! Don't forget to leave a comment!!! Please like the video to support us!!! Questions you might like: ✅✅✅[ Tree Data Structure ] : kzbin.info/aero/PLJtzaiEpVo2zx-rCqLMmcFEpZw1UpGWls ✅✅✅[ Graphs Data Structure ] : kzbin.info/aero/PLJtzaiEpVo2xg89cZzZCHqX03a1Vb6w7C ✅✅✅[ December Leetcoding Challenge ] : kzbin.info/aero/PLJtzaiEpVo2xo8OdPZxrpybGR8FmzZpCA ✅✅✅[ November Leetcoding Challenge ] : kzbin.info/aero/PLJtzaiEpVo2yMYz5RPH6pfB0wNnwWsK7e ✅✅✅[ August Leetcoding Challenge ] : kzbin.info/aero/PLJtzaiEpVo2xu4h0gYQzvOMboclK_pZMe ✅✅✅July Leetcoding challenges: kzbin.info/aero/PLJtzaiEpVo2wrUwkvexbC-vbUqVIy7qC- ✅✅✅June Leetcoding challenges: kzbin.info/aero/PLJtzaiEpVo2xIfpptnCvUtKrUcod2zAKG ✅✅✅May Leetcoding challenges: kzbin.info/aero/PLJtzaiEpVo2wRmUCq96zsUwOVD6p66K9e ✅✅✅Cracking the Coding Interview - Unique String: kzbin.info/aero/PLJtzaiEpVo2xXf4LZb3y_BopOnLC1L4mE Struggling in a question?? Leave in a comment and we will make a video!!!🙂🙂🙂
@Marvin-om7iu2 жыл бұрын
I watched several videos and this was the best explanation I seen (I followed the prefix sum approach). Thank you!
@palashvij79354 жыл бұрын
To be honest,I love your content. Please keep up the good work 😀. Your video presentation is by far the best.
@AlgorithmsMadeEasy4 жыл бұрын
Thanks !! We are glad you like it !!!
@akashverma_83434 жыл бұрын
Thanks for providing everyday leetcode solutions
@AlgorithmsMadeEasy4 жыл бұрын
👍 Happy coding !!
@shivamd233 жыл бұрын
Nice Solution 😊😊😊😊😊
@AlgorithmsMadeEasy3 жыл бұрын
Glad you like it !!
@AdityaKumar-rs5jn3 жыл бұрын
Thanks for the awesome explanation.
@AlgorithmsMadeEasy3 жыл бұрын
Most welcome!! 😍😍
@anirudhhasinghpanwar6824 жыл бұрын
i am still stuck at containskey part is that a new method you created i keep getting error for " no member named 'containsKey' in 'std::unordered_map'" (using c++)
@ComputerScienceSimplified4 жыл бұрын
Awesome video, keep up the incredible work! :)
@AlgorithmsMadeEasy4 жыл бұрын
Thanks !!!
@weaponkid11212 жыл бұрын
please use better examples in the future. the example for the first solution didn't show the concept very well because the subarray was only of length 1, i.e. [20]
@satraprathore53498 ай бұрын
Does the sliding window work for -ve numbers?
@AkshayKumar-xh2ob3 жыл бұрын
The explanation is good but you have not given the intuition behind the first soln.
@PensivePortraits4 жыл бұрын
Great content! Thanks a lot ...
@AlgorithmsMadeEasy4 жыл бұрын
Thanks
@hariprasadg1234 жыл бұрын
can you please explain why are you setting target = -x? because before the code when you explain you don't seem to mention that..
@AlgorithmsMadeEasy4 жыл бұрын
you can set it to 0 and then, add another step to update target to sum-x. I am doing it to skip calculation of sum-x by already setting target to -x.
@bharathkalyans2 жыл бұрын
Nice
@rads-jv1le4 жыл бұрын
Why initiializing map to (0,-1). Please explain this
@AlgorithmsMadeEasy4 жыл бұрын
0,-1 says that the at index -1, the sum is 0. This is done so that we get the start of subarray in cases it starts from 0th index.
@abhishekprasad2654 жыл бұрын
can u please explain what does for(int i : nums) means?
@AlgorithmsMadeEasy4 жыл бұрын
It means, for each int i in nums do the following.
@abhishekprasad2654 жыл бұрын
@@AlgorithmsMadeEasy so we are adding i to target by this loop
@javidasgarov4 жыл бұрын
@@abhishekprasad265 You are adding each number from the array to target, as been said in the video you need sum - target. So this is the sum of all the number in the array, then (-target)