Orderly Queue | Leetcode 899
12:34
2 жыл бұрын
Guess the Word | Leetcode 843
19:52
2 жыл бұрын
3Sum Closest | Leetcode 16
15:03
2 жыл бұрын
Path Sum | Leetcode 112 | C++
9:21
2 жыл бұрын
Race Car | Leetcode 818 | C++
30:26
2 жыл бұрын
Add Two Numbers | Leetcode 2 | C++
11:42
Bridge and Torch Puzzle 🔥
4:20
2 жыл бұрын
Пікірлер
@learnerrahat5320
@learnerrahat5320 13 сағат бұрын
best xplanation
@guycohen4403
@guycohen4403 3 күн бұрын
you explain much better then my professor, thank you
@Me-vw8wv
@Me-vw8wv 5 күн бұрын
let me see where i stop i am gonna start this journey
@Sajidkhan-l1i6i
@Sajidkhan-l1i6i 15 күн бұрын
Veri nice
@vivek.tiwary
@vivek.tiwary 20 күн бұрын
what is the intuition behind calculating profit 2 in backward direction ?
@vivek.tiwary
@vivek.tiwary 20 күн бұрын
only solution which explained the state & transition properly, thanks a ton
@pablobear4241
@pablobear4241 28 күн бұрын
Elegant
@daxjoshi7357
@daxjoshi7357 29 күн бұрын
if x != 6, it means secret has exactly x matches with word for next iteration, if we keep the ones that have >= x matches with word, how is that going wrong ?
@rsKayiira
@rsKayiira Ай бұрын
Wow I actually understood this question after going through your solution. Thank you so much
@sumantaroy9379
@sumantaroy9379 Ай бұрын
You can do it better by presenting it more visually, rather than just showing exmaples.
@abhijitkumarsaha8735
@abhijitkumarsaha8735 Ай бұрын
well explained in a very short video.
@rohithbharathi3664
@rohithbharathi3664 Ай бұрын
just adding this if len(combination) > k: return which is missing in the python solution saves a hell lot of time
@s.m.saeedy3490
@s.m.saeedy3490 Ай бұрын
Thanks, Java code is also would be: Arrays.sort(arr); // O(nLogn) for (int i = 0; i < arr.length - 2; i++) { // O(n) int min = i + 1; int max = arr.length - 1; int target = -arr[i]; while (min < max) { // O(n) int sum = arr[min] + arr[max]; if (sum == target) { System.out.println(arr[i] + ", " + arr[min] + ", " + arr[max]); min++; max--; } else if (sum < target) { min++; } else { max--; } }. this code has O(n^2) time complexity! which can be improved by using Hash based collections
@vengalrao5772
@vengalrao5772 Ай бұрын
💥
@abhijitdutta8458
@abhijitdutta8458 Ай бұрын
Great Explanation. Thank you!
@PotlaNagaSaiPrajith
@PotlaNagaSaiPrajith Ай бұрын
solutions bhi batadijiye sir...
@rohanreddymelachervu3498
@rohanreddymelachervu3498 Ай бұрын
Thank you for this video. I could code it up on my own after listening to your detailed explanation :D
@DemonSlayer-vh8uy
@DemonSlayer-vh8uy Ай бұрын
b ut what if ther would be +8 in the example. then you have to take -2 right? or instead of -2 it would be -1, then -6,-1,7.
@abhisheksrivastava4236
@abhisheksrivastava4236 Ай бұрын
class Solution { public: int numDecodings(string s) { int n = s.size(); if (n == 0 || s[0] == '0') return 0; // If the string is empty or starts with '0', it can't be decoded vector<int> dp(n + 1, 0); // dp[i] represents the number of ways to decode s[0:i] dp[0] = 1; // Base case: one way to decode an empty string dp[1] = 1; // One way to decode the string if the first character is valid (non-zero) for (int i = 2; i <= n; i++) { // Check single-digit decode possibility if (s[i - 1] != '0') { dp[i] += dp[i - 1]; } // Check two-digit decode possibility int twoDigit = stoi(s.substr(i - 2, 2)); if (twoDigit >= 10 && twoDigit <= 26) { dp[i] += dp[i - 2]; } } return dp[n]; // Number of ways to decode the full string } };
@karticksharmapro1523
@karticksharmapro1523 Ай бұрын
Backward edge connects between a Parent's parent , Forward edge connects between a Descendant's descendant . ,Tree edge is a connect between a parent And child ,Cross edge is a connect between two children's
@Priyadarshene
@Priyadarshene Ай бұрын
awesome
@avivfriedman
@avivfriedman Ай бұрын
If someone wants a short summary: The idea is to calculate the area between the lines at the two pointers, update the maximum area if the current area is larger, and then move the pointer pointing to the shorter line. By moving the shorter line, you potentially increase the height of the container, as increasing the width alone won't give a better result if one side is short.
@Bannu-mf9wy
@Bannu-mf9wy Ай бұрын
thanks for this wonderful explaination
@rishikapoor3284
@rishikapoor3284 Ай бұрын
sooooooo difficult to understand for a beginner ,its basically for beginners and if u cant make it easy and simple for them to understand then whats the point.
@MaturuVlog
@MaturuVlog 2 ай бұрын
why we are adding line -> curr_sum -= arr[start++]; just if we assign the number to the curr_sum that would be fine right, why we are subtracting the curr_sum with array again? did i miss to understand any logic here?
@BuddiezHotels
@BuddiezHotels 2 ай бұрын
Made it look easy, thanks
@drowmik
@drowmik 2 ай бұрын
Among all the other logic explanations on youtube, this is the best and simple for me. thanks man
@Hillooish
@Hillooish 2 ай бұрын
As a cs student learning C++ and been doing some leetcode problems, this channel looks amazing!
@nandanraj923
@nandanraj923 2 ай бұрын
Not good explanation Actually fast pointer will move first then slow will move.
@Satvikshukla0007
@Satvikshukla0007 2 ай бұрын
I went through many videos. any everyone was missing the initial point which you completed. Thanks.
@yamashanmukhchandra636
@yamashanmukhchandra636 2 ай бұрын
do an o(nlogn) soln
@pritamroy5007
@pritamroy5007 2 ай бұрын
first learn how to speak clearly...next time dont make videos while eating !!!!..
@JesusPlsSaveMe
@JesusPlsSaveMe 2 ай бұрын
Revelation 3:20 Behold, I stand at the door, and knock: if any man hear my voice, and open the door, I will come in to him, and will sup with him, and he with me. HEY THERE 🤗 JESUS IS CALLING YOU TODAY. Turn away from your sins, confess, forsake them and live the victorious life. God bless. Revelation 22:12-14 And, behold, I come quickly; and my reward is with me, to give every man according as his work shall be. I am Alpha and Omega, the beginning and the end, the first and the last. Blessed are they that do his commandments, that they may have right to the tree of life, and may enter in through the gates into the city.
@bodimounika5875
@bodimounika5875 2 ай бұрын
please can you do in java for these questions
@jakesmith6853
@jakesmith6853 2 ай бұрын
Starting my Leetcode journey today. 22-09-24
@desmondodion9046
@desmondodion9046 2 ай бұрын
This is a really good tutorial
@himanshuyadav0600
@himanshuyadav0600 2 ай бұрын
Best Explanation...
@jashwanthgottipati9262
@jashwanthgottipati9262 2 ай бұрын
Thanks for the video.
@amrutaparab4939
@amrutaparab4939 3 ай бұрын
Why random number?
@muddassirtrainingazure
@muddassirtrainingazure 3 ай бұрын
You need to explain how u have arrived to 2*res+head... It's like u have mugged up the solution and has run a simulation of the solution in this video
@anujsingh-ej9vb
@anujsingh-ej9vb 3 ай бұрын
thanks a lot for a very clear explanation.
@SayidOmar-zj8qx
@SayidOmar-zj8qx 3 ай бұрын
Really good explanation, thank you!
@ujucharity604
@ujucharity604 3 ай бұрын
Does this also work for a 2 by 2 or 4 by 4 matrix.. That is, can we always multiply it by 2 regardless of the type of matrix
@biswajitmahanta2450
@biswajitmahanta2450 3 ай бұрын
Awesome clarity between web n app server
@gnaneswarilolugu2323
@gnaneswarilolugu2323 3 ай бұрын
That's a great explanation. Thank you
@faleite_
@faleite_ 3 ай бұрын
Amazing explanation, thanks!
@VishnuManojkumar-i3f
@VishnuManojkumar-i3f 3 ай бұрын
class Solution { public: int maxArea(vector<int>& height) { int left=0; int right=height.size()-1; int max_area=0; while(left<right){ int current_area=(right-left)*min(height[left],height[right]); max_area=max(current_area,max_area); if(height[left]<height[right]){ left++; } else{ right--; } } return max_area; } };
@bananasmileclub5528
@bananasmileclub5528 4 ай бұрын
where is the python code 😭 y u lying like that bro 😭
@roshanbohara8834
@roshanbohara8834 4 ай бұрын
Can we get notes of this ?
@roshanbohara8834
@roshanbohara8834 4 ай бұрын
Useful 🎊 sir