Minimum Operations to Reduce X to Zero | Live Coding with Explanation | Leetcode

  Рет қаралды 6,555

Algorithms Made Easy

Algorithms Made Easy

Күн бұрын

Пікірлер: 28
@AlgorithmsMadeEasy
@AlgorithmsMadeEasy 4 жыл бұрын
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-om7iu
@Marvin-om7iu 2 жыл бұрын
I watched several videos and this was the best explanation I seen (I followed the prefix sum approach). Thank you!
@palashvij7935
@palashvij7935 4 жыл бұрын
To be honest,I love your content. Please keep up the good work 😀. Your video presentation is by far the best.
@AlgorithmsMadeEasy
@AlgorithmsMadeEasy 4 жыл бұрын
Thanks !! We are glad you like it !!!
@akashverma_8343
@akashverma_8343 4 жыл бұрын
Thanks for providing everyday leetcode solutions
@AlgorithmsMadeEasy
@AlgorithmsMadeEasy 4 жыл бұрын
👍 Happy coding !!
@shivamd23
@shivamd23 3 жыл бұрын
Nice Solution 😊😊😊😊😊
@AlgorithmsMadeEasy
@AlgorithmsMadeEasy 3 жыл бұрын
Glad you like it !!
@AdityaKumar-rs5jn
@AdityaKumar-rs5jn 3 жыл бұрын
Thanks for the awesome explanation.
@AlgorithmsMadeEasy
@AlgorithmsMadeEasy 3 жыл бұрын
Most welcome!! 😍😍
@anirudhhasinghpanwar682
@anirudhhasinghpanwar682 4 жыл бұрын
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++)
@ComputerScienceSimplified
@ComputerScienceSimplified 4 жыл бұрын
Awesome video, keep up the incredible work! :)
@AlgorithmsMadeEasy
@AlgorithmsMadeEasy 4 жыл бұрын
Thanks !!!
@weaponkid1121
@weaponkid1121 2 жыл бұрын
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]
@satraprathore5349
@satraprathore5349 8 ай бұрын
Does the sliding window work for -ve numbers?
@AkshayKumar-xh2ob
@AkshayKumar-xh2ob 3 жыл бұрын
The explanation is good but you have not given the intuition behind the first soln.
@PensivePortraits
@PensivePortraits 4 жыл бұрын
Great content! Thanks a lot ...
@AlgorithmsMadeEasy
@AlgorithmsMadeEasy 4 жыл бұрын
Thanks
@hariprasadg123
@hariprasadg123 4 жыл бұрын
can you please explain why are you setting target = -x? because before the code when you explain you don't seem to mention that..
@AlgorithmsMadeEasy
@AlgorithmsMadeEasy 4 жыл бұрын
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.
@bharathkalyans
@bharathkalyans 2 жыл бұрын
Nice
@rads-jv1le
@rads-jv1le 4 жыл бұрын
Why initiializing map to (0,-1). Please explain this
@AlgorithmsMadeEasy
@AlgorithmsMadeEasy 4 жыл бұрын
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.
@abhishekprasad265
@abhishekprasad265 4 жыл бұрын
can u please explain what does for(int i : nums) means?
@AlgorithmsMadeEasy
@AlgorithmsMadeEasy 4 жыл бұрын
It means, for each int i in nums do the following.
@abhishekprasad265
@abhishekprasad265 4 жыл бұрын
@@AlgorithmsMadeEasy so we are adding i to target by this loop
@javidasgarov
@javidasgarov 4 жыл бұрын
@@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)
Minimum Operations to Reduce X to Zero - Leetcode 1658 - Python
14:00
Вопрос Ребром - Джиган
43:52
Gazgolder
Рет қаралды 3,8 МЛН
요즘유행 찍는법
0:34
오마이비키 OMV
Рет қаралды 12 МЛН
Sigma girl VS Sigma Error girl 2  #shorts #sigma
0:27
Jin and Hattie
Рет қаралды 124 МЛН
Prefix and Suffix Search | Live Coding with Explanation | Leetcode - 745
18:46
Algorithms Made Easy
Рет қаралды 10 М.
Pacific Atlantic Water Flow | Live Coding with Explanation | Leetcode - 417
13:32
Binary Tree Cameras | Live Coding with Explanation | Leetcode - 968
13:15
Algorithms Made Easy
Рет қаралды 11 М.
10 Signs Your Software Project Is Heading For FAILURE
17:59
Continuous Delivery
Рет қаралды 34 М.
Path With Minimum Effort | Live Coding with Explanation | Leetcode #1631
16:48
Algorithms Made Easy
Рет қаралды 10 М.
Simplify Path | Live Coding with Explanation | Leetcode - 71
11:08
Algorithms Made Easy
Рет қаралды 10 М.
o3-Mini Fully Tested - Coding, Math, and Logic GENIUS
9:58
Matthew Berman
Рет қаралды 11 М.