Coding Interview Problem - Decode Ways

  Рет қаралды 19,005

Knapsack

Knapsack

Күн бұрын

Пікірлер: 47
@pranjalagarwal42
@pranjalagarwal42 3 жыл бұрын
Single person on KZbin who explained why we are using i-1 + i-2 rest of all are just telling the solution
@dominickdavis1580
@dominickdavis1580 4 жыл бұрын
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
@basedmangoes3379
@basedmangoes3379 4 жыл бұрын
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!
@velakuruday
@velakuruday 9 ай бұрын
Thank you brother. Only you explained why the i-1 + i-2 is valid.
@kairu86
@kairu86 4 жыл бұрын
FINALLY get it. Only video where it clicked. Deserves way more likes.
@aor6956
@aor6956 3 жыл бұрын
True I concur
@Martinnnnnn-e5s
@Martinnnnnn-e5s 3 ай бұрын
After watching like 5 videos about this question finally there's one that i understand. amazing explantion
@alextran8906
@alextran8906 2 жыл бұрын
I think but I could not understand. After watching your lucid video, I understand without thinking, thank you for your diffusive wisdom.
@pandemandar
@pandemandar 2 жыл бұрын
God level explanation.
@AlvaroGarcia-fb6oh
@AlvaroGarcia-fb6oh Жыл бұрын
First video that helped me understand the tabulation solution! Thanks a lot man.
@pinakeekaushik7803
@pinakeekaushik7803 4 жыл бұрын
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.
@KnapsackLabs
@KnapsackLabs 4 жыл бұрын
Thank you! Busy with something right now but will definitely keep uploading in a couple months.
@arpitvaish89
@arpitvaish89 2 жыл бұрын
Finally I understood the solution, tried many videos but this one is best;
@soz824
@soz824 3 жыл бұрын
This video and explanation is incredible. Why are there not more views??
@ganeshmula4508
@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-lz1pg
@MinhNguyen-lz1pg 2 жыл бұрын
Awesome explanation, this should be LC Premium. I feel I got scam paying LC premium when reading the LC solution. Great job!
@meht8
@meht8 4 жыл бұрын
Thanks! Your channel certainly deserves way more attention! - So true - Good work mate...
@KnapsackLabs
@KnapsackLabs 4 жыл бұрын
Thank You!
@gustavoadolfodiazcamilo2462
@gustavoadolfodiazcamilo2462 2 жыл бұрын
Very clear explanation!
@SudeeptaSood
@SudeeptaSood 3 жыл бұрын
thank you! i finally understood the dp subproblems
@raghavsurya4755
@raghavsurya4755 4 жыл бұрын
Man, what an explanation. you are AMAZING! Thank you
@j_noodles
@j_noodles 3 жыл бұрын
Best explanation I've found, thank you so much
@leonardata2671
@leonardata2671 2 жыл бұрын
Amazing explanation that will be forever useful. Thank you
@iamdaddy962
@iamdaddy962 2 жыл бұрын
this video is kickass!!
@rahulshetty9335
@rahulshetty9335 3 жыл бұрын
Great video!!! Could you please recommend some books or study material ?
@tehepicduck101
@tehepicduck101 3 жыл бұрын
wow this was such a good explanation, thank you
@shubhamdhanotia6759
@shubhamdhanotia6759 4 жыл бұрын
Amazingly explained
@tejasghone5118
@tejasghone5118 3 жыл бұрын
Amazing explanation ! Thank you :)
@jaykay88888
@jaykay88888 3 жыл бұрын
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!
@krissh5444
@krissh5444 4 жыл бұрын
Good explanation ! Keep it up
@a_maxed_out_handle_of_30_chars
@a_maxed_out_handle_of_30_chars 11 ай бұрын
so good, thank you :)
@aimee3611
@aimee3611 4 жыл бұрын
Thank you so much! finally got it!
@AbhishekSingh-tz3uv
@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.
@satyarthaprakash9051
@satyarthaprakash9051 4 жыл бұрын
Great Channel. Keep Going !
@natisaver
@natisaver 3 жыл бұрын
how do i get the O(1) space complexity solution?
@IranForeverFree
@IranForeverFree 3 жыл бұрын
if you just keep dpi-1 and dpi-2 in two variables, don't need the rest beyond those
@rajkamalsubramanian9472
@rajkamalsubramanian9472 3 жыл бұрын
how is dp[0] = 1?
@sunginjung3854
@sunginjung3854 4 жыл бұрын
thanks for the great video!
@natisaver
@natisaver 3 жыл бұрын
finally bless u mann!!!!
@rcmarco3281
@rcmarco3281 4 жыл бұрын
excellent
@heejune
@heejune 3 жыл бұрын
Thanks!
@TheIntraFerox
@TheIntraFerox 4 жыл бұрын
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
@matthewbuchholz5251
@matthewbuchholz5251 4 жыл бұрын
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)
@gaganharjai3387
@gaganharjai3387 3 жыл бұрын
thanks for your clean explainations. though this solution does not work for input = "2611055971756562"
@kushsurti2139
@kushsurti2139 2 жыл бұрын
yup although its quite an easy fix:- let num10to19Range = previousNum == 1 && currentNum
@pranjalghimire3690
@pranjalghimire3690 4 жыл бұрын
what if i-1==0 ex 12160012 what happens
@KnapsackLabs
@KnapsackLabs 4 жыл бұрын
The answer for this particular case should be 0.
Coding Interview Problem - Gas Station
12:44
Knapsack
Рет қаралды 22 М.
Coding Interview Problem - Word Break
20:08
Knapsack
Рет қаралды 23 М.
ТЮРЕМЩИК В БОКСЕ! #shorts
00:58
HARD_MMA
Рет қаралды 2,6 МЛН
Disrespect or Respect 💔❤️
00:27
Thiago Productions
Рет қаралды 43 МЛН
Don't underestimate anyone
00:47
奇軒Tricking
Рет қаралды 16 МЛН
Mastering Dynamic Programming - How to solve any interview problem (Part 1)
19:41
Coding Interview Problem - Subarray Sum Equals K
9:22
Knapsack
Рет қаралды 8 М.
UNIQUE PATHS | LEETCODE 62 | PYTHON DFS SOLUTION
11:09
Cracking FAANG
Рет қаралды 473
Coding Unbreakable Encryption in C | One-Time Pad
17:42
HirschDaniel
Рет қаралды 4,4 М.
Coding Interview Problem - Car Fleet
14:39
Knapsack
Рет қаралды 915
ТЮРЕМЩИК В БОКСЕ! #shorts
00:58
HARD_MMA
Рет қаралды 2,6 МЛН