Decode Strings (LeetCode 394) | Full solution with animations and examples | Study Algorithms

  Рет қаралды 29,052

Nikhil Lohia

Nikhil Lohia

Күн бұрын

Пікірлер: 72
@ananyadas3257
@ananyadas3257 Жыл бұрын
There is a comment issue in your pseudocode...The third condition says if there is "[". It should be "]"
@nikoo28
@nikoo28 Жыл бұрын
Thanks for the correction. You are right.
@unknownman1
@unknownman1 Жыл бұрын
You seem like a friend with whom everyone wants to spend more time. Nice explanation btw.
@nikoo28
@nikoo28 Жыл бұрын
this comment is full of warmth..thanks!! 😄
@shachisinghal8856
@shachisinghal8856 11 ай бұрын
I smile, when i see that a Q. has been covered by you. Thank you sir.
@nikoo28
@nikoo28 10 ай бұрын
🤗
@rhythmbhandari8549
@rhythmbhandari8549 Жыл бұрын
Your explanations were clear and easy to follow, and the animations and examples you provided really helped solidify my understanding of the problem.
@priyapriyamadhuri6546
@priyapriyamadhuri6546 2 ай бұрын
Hi nikhil sir, whenever i was searching for any coding questions if you're video is available for a particular question that time i felt so happy , because your videos are really "worth varma worth"😁😁
@S3aw0lf
@S3aw0lf 9 ай бұрын
After watching the video I had to work on it myself and i finally figured the code. Thanx for the video
@shwetagupta8721
@shwetagupta8721 10 ай бұрын
wow nikhil, you explained so well, far better than many of the paid courses, loved your teaching skills.
@shubhammanecr7
@shubhammanecr7 10 ай бұрын
Commendable explanation sir!! I just can say one line - Why fear when Nikhil Lohia is here.
@nikoo28
@nikoo28 9 ай бұрын
🤘
@MrRahulmalik
@MrRahulmalik Жыл бұрын
you are my new fav instructor after sumeet malik, keep making more videos regularly! thanks alot.
@nikoo28
@nikoo28 Жыл бұрын
so happy you feel this way
@prateeksharma1047
@prateeksharma1047 24 күн бұрын
Anybody trying to understand `k = (k * 10) + (c - '0');`. Suppose there is a string like 54[a], we will need to create the number 54 from chars 5 and 4. So the equation helps in creating the correct number.
@vineetkumar2899
@vineetkumar2899 Жыл бұрын
I am a big fan of your teaching Skills
@sonicserenity9498
@sonicserenity9498 8 ай бұрын
Hey Nikhil, Thank you Man, You explain things in very easy way, keep it up
@prathameshpawar985
@prathameshpawar985 Жыл бұрын
Your logic explaination is best , keep making such videos :)
@nikoo28
@nikoo28 Жыл бұрын
trying my best everyday :)
@lalanabiridi8358
@lalanabiridi8358 Жыл бұрын
this man is a goat
@shaiksameer9659
@shaiksameer9659 3 ай бұрын
Your explanation is so clear that I have no need to watch another video on this problem. However Nikhil ,how to solve if the number is more than 9 i..e it may be more than 1 character to ad to the number stack ?
@sukanyaghosh24
@sukanyaghosh24 Жыл бұрын
What an amazing explanation sir, thank you so much ❤️
@motivationalquotes8545
@motivationalquotes8545 Жыл бұрын
Very well explained I don't understand why their is less like to video
@nikoo28
@nikoo28 Жыл бұрын
i dunno either 😂
@anushkakhandelwal-s4c
@anushkakhandelwal-s4c Жыл бұрын
You were phenomenal. Hats off sirrr!!!
@nikoo28
@nikoo28 Жыл бұрын
thanks for your kind words
@pratibhaverma2063
@pratibhaverma2063 10 ай бұрын
Thank you sir.Very handy approch and explanation.
@nikoo28
@nikoo28 10 ай бұрын
You are welcome
@gitansh194
@gitansh194 3 ай бұрын
such a clean explanation .............thanku sir❤❤
@TalhaTabrez7
@TalhaTabrez7 9 ай бұрын
keep up the good work!!
@jatin_9911
@jatin_9911 2 ай бұрын
thank you sir your explanation is great 🔥 🔥
@helloworld4788
@helloworld4788 6 ай бұрын
thank u so so much for the explanation
@iamnoob7593
@iamnoob7593 Жыл бұрын
Brilliant and Intuitve.
@tusharrastogi7490
@tusharrastogi7490 2 жыл бұрын
great explanation :)
@jagan2350
@jagan2350 Жыл бұрын
Your videos are awesome 🔥
@tanyatanya3100
@tanyatanya3100 Жыл бұрын
nice explanation!
@phucpt2k
@phucpt2k Жыл бұрын
This solution doesn't work if the integer has more than one digit. e.g: 11[ab2[c]de].
@nikoo28
@nikoo28 Жыл бұрын
It will work..for your test case the output will be abccdeabccdeabccdeabccdeabccdeabccdeabccdeabccdeabccdeabccdeabccde
@kolawoleabdulrahman
@kolawoleabdulrahman Жыл бұрын
it doesn't work for me as well.
@car_holic1995
@car_holic1995 2 ай бұрын
i wish there was explantion of actual code also..
@abhaykumarsingh3884
@abhaykumarsingh3884 6 ай бұрын
Very good explanation..
@sakibx0218
@sakibx0218 7 ай бұрын
Why we need to add another stack. Since get got first bracket that means if you say stack.peek() you will get the value. Its just waste of memory
@nikoo28
@nikoo28 7 ай бұрын
The space complexity still remains the same O(n)
@prasannavenkkatesh1192
@prasannavenkkatesh1192 6 ай бұрын
do we need 2 stacks?
@ousmanbah10
@ousmanbah10 6 ай бұрын
best explanations
@nikoo28
@nikoo28 5 ай бұрын
Keep watching
@MsProtestante
@MsProtestante Жыл бұрын
Hi! Congrats for your solution! I am struggling to understand this bit of code k = (k * 10) + (c - '0') I print line by line with SYSO but I'm still no able to get it. When printing I get the following : when k = 1 (k * 10): 10 (c - '0'): 1 this is k: 1 Why k = (k * 10) + (c - '0') ends up with 1? As (k * 10) = 10 and (c - '0')= 1 why k is not 11? Could you please kindly clarify it?
@nikoo28
@nikoo28 Жыл бұрын
The value of k = 0, not 1. :) Also when we push in the stack, once again we change it to 0.
@subee128
@subee128 11 ай бұрын
Thank you
@thanhnguyenduy78
@thanhnguyenduy78 Жыл бұрын
nice!!!!!!!!!
@Abhaykumar-lw7nr
@Abhaykumar-lw7nr Ай бұрын
third condition will not right instead of "[" '']"
@dinnydinesh-b5w
@dinnydinesh-b5w Жыл бұрын
you are osm thank you
@11shivamAhir00
@11shivamAhir00 Жыл бұрын
thanks sir
@atharvdeshmukh8192
@atharvdeshmukh8192 Жыл бұрын
how to handle multidigit number?
@nikoo28
@nikoo28 11 ай бұрын
the solution handles a multi-digit number, check the github link in description :)
@deepakffyt2844
@deepakffyt2844 Жыл бұрын
Abhi awaj bahut slow aaa rahi
@acxd
@acxd Жыл бұрын
can you do it using 1 stack!
@iamnoob7593
@iamnoob7593 Жыл бұрын
The solution here is more intutive. I would prefer using 2 stacks.
@kuldeepdiwakar1506
@kuldeepdiwakar1506 11 ай бұрын
Explanation is too simple
@abhishekthakur7578
@abhishekthakur7578 Жыл бұрын
bhai isse accha toh mike mat he laga
@nikoo28
@nikoo28 Жыл бұрын
Fixed those issues in my latest videos…thanks for the feedback :)
@ridj41
@ridj41 5 ай бұрын
the code is very complex and is not easy to understand after watching this video tbh, might have made the soln just like the code
@ArunKumar-yq9rs
@ArunKumar-yq9rs 4 ай бұрын
100[leetcode] what will this give ;)0)
@tech-red24
@tech-red24 8 ай бұрын
bha sound quality bhtttttttttttttttttttttttttt hi gandiiii h ...mic cgange kro phle to aap
@pradyumnakubear8561
@pradyumnakubear8561 23 күн бұрын
Lajawaab
@sapworkshop
@sapworkshop Жыл бұрын
Bro try to speak loudly
@nikoo28
@nikoo28 Жыл бұрын
check my latest videos, if you still find the issue
@avinashmv9686894578
@avinashmv9686894578 4 ай бұрын
Easy to understand. Thank you.
@arpanchakraborty9874
@arpanchakraborty9874 4 ай бұрын
Thank you
Long Nails 💅🏻 #shorts
00:50
Mr DegrEE
Рет қаралды 16 МЛН
The Ultimate Sausage Prank! Watch Their Reactions 😂🌭 #Unexpected
00:17
La La Life Shorts
Рет қаралды 8 МЛН
Farmer narrowly escapes tiger attack
00:20
CTV News
Рет қаралды 11 МЛН
Молодой боец приземлил легенду!
01:02
МИНУС БАЛЛ
Рет қаралды 2,1 МЛН
Decode String - Leetcode 394 - Python
16:26
NeetCode
Рет қаралды 93 М.
How I would learn Leetcode if I could start over
18:03
NeetCodeIO
Рет қаралды 695 М.
LeetCode Decode String Solution Explained - Java
10:52
Nick White
Рет қаралды 59 М.
Decode String 🔥 | Leetcode 394 | Stack
17:33
Ayushi Sharma
Рет қаралды 18 М.
Fast Inverse Square Root - A Quake III Algorithm
20:08
Nemean
Рет қаралды 5 МЛН
Decode the string | Problem of the Day: 11/10/22 | Siddharth Hazra
20:45
GeeksforGeeks Practice
Рет қаралды 3,3 М.
Long Nails 💅🏻 #shorts
00:50
Mr DegrEE
Рет қаралды 16 МЛН