Single person on KZbin who explained why we are using i-1 + i-2 rest of all are just telling the solution
@dominickdavis15804 жыл бұрын
idk how companies expect me to do this shit is under 30 min. Thank you though.... I've been trying to understand this all day and this is the video that made it click
@basedmangoes33794 жыл бұрын
insane explanation. i can you tell you truly understand the problem and is not just a regurgitation of a working LC solution found online... thanks!
@velakuruday9 ай бұрын
Thank you brother. Only you explained why the i-1 + i-2 is valid.
@kairu864 жыл бұрын
FINALLY get it. Only video where it clicked. Deserves way more likes.
@aor69563 жыл бұрын
True I concur
@Martinnnnnn-e5s3 ай бұрын
After watching like 5 videos about this question finally there's one that i understand. amazing explantion
@alextran89062 жыл бұрын
I think but I could not understand. After watching your lucid video, I understand without thinking, thank you for your diffusive wisdom.
@pandemandar2 жыл бұрын
God level explanation.
@AlvaroGarcia-fb6oh Жыл бұрын
First video that helped me understand the tabulation solution! Thanks a lot man.
@pinakeekaushik78034 жыл бұрын
Man please dont stop making these videos, the intution you give to solve the problem is amazing. Upload frequently and your channel will grow soon.
@KnapsackLabs4 жыл бұрын
Thank you! Busy with something right now but will definitely keep uploading in a couple months.
@arpitvaish892 жыл бұрын
Finally I understood the solution, tried many videos but this one is best;
@soz8243 жыл бұрын
This video and explanation is incredible. Why are there not more views??
@ganeshmula4508 Жыл бұрын
Really thanks a lot, i have watched so many vudeos in youtube but didn't understand, but finally you given good explainatiin for this question❤️🙏
@MinhNguyen-lz1pg2 жыл бұрын
Awesome explanation, this should be LC Premium. I feel I got scam paying LC premium when reading the LC solution. Great job!
@meht84 жыл бұрын
Thanks! Your channel certainly deserves way more attention! - So true - Good work mate...
@KnapsackLabs4 жыл бұрын
Thank You!
@gustavoadolfodiazcamilo24622 жыл бұрын
Very clear explanation!
@SudeeptaSood3 жыл бұрын
thank you! i finally understood the dp subproblems
@raghavsurya47554 жыл бұрын
Man, what an explanation. you are AMAZING! Thank you
@j_noodles3 жыл бұрын
Best explanation I've found, thank you so much
@leonardata26712 жыл бұрын
Amazing explanation that will be forever useful. Thank you
@iamdaddy9622 жыл бұрын
this video is kickass!!
@rahulshetty93353 жыл бұрын
Great video!!! Could you please recommend some books or study material ?
@tehepicduck1013 жыл бұрын
wow this was such a good explanation, thank you
@shubhamdhanotia67594 жыл бұрын
Amazingly explained
@tejasghone51183 жыл бұрын
Amazing explanation ! Thank you :)
@jaykay888883 жыл бұрын
Thank you so much for this amazing video!!! I really appreciate 🙏 It does really help me understand this problem clearly. Please do more videos like this!
@krissh54444 жыл бұрын
Good explanation ! Keep it up
@a_maxed_out_handle_of_30_chars11 ай бұрын
so good, thank you :)
@aimee36114 жыл бұрын
Thank you so much! finally got it!
@AbhishekSingh-tz3uv Жыл бұрын
I have watched a number of tutorials for this one, understood your approach only. Though wrote my implementation of it and it seems a bit different.
@satyarthaprakash90514 жыл бұрын
Great Channel. Keep Going !
@natisaver3 жыл бұрын
how do i get the O(1) space complexity solution?
@IranForeverFree3 жыл бұрын
if you just keep dpi-1 and dpi-2 in two variables, don't need the rest beyond those
@rajkamalsubramanian94723 жыл бұрын
how is dp[0] = 1?
@sunginjung38544 жыл бұрын
thanks for the great video!
@natisaver3 жыл бұрын
finally bless u mann!!!!
@rcmarco32814 жыл бұрын
excellent
@heejune3 жыл бұрын
Thanks!
@TheIntraFerox4 жыл бұрын
I’m 95% there. But I’m stuck with this case: 1201. I am thinking only 1 valid decode could be made of this correct? Like 1 | 20 | 1 But I am having hard time understand how the code deals with this
@matthewbuchholz52514 жыл бұрын
Case 1: take one digit --> 1 Case 2: take two digits --> 12 In case 2, the next digit will be a 0 which is invalid so this does not count. In case 1, you move along to 2 and repeat as below: Case 1: take one digit --> 2 Case 2: take two digits --> 20 In case 1, the next digit is a 0 which is invalid so this does not count. In case 2, you move along to 1 and repeat as below: Case 1: take one digit --> 1 Case 2: take two digits --> reached end of string You must take case 1. The next index will be out of bounds and you are done. Your DP array will look like [1 1 1 1 1], i.e. you can only take one path to get to the end, no addition occurs (or in recursive terms you get a linear path where each possible alternative path leads to a dead end i.e. a leaf)
@gaganharjai33873 жыл бұрын
thanks for your clean explainations. though this solution does not work for input = "2611055971756562"
@kushsurti21392 жыл бұрын
yup although its quite an easy fix:- let num10to19Range = previousNum == 1 && currentNum