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

preview_player
Показать описание
String encoding and decoding are widely used in encryption algorithms. This is often used to send encrypted messages. Hence, they make up good programming problems as well. In this particular problems you are given an encoded string, and we have to figure out the actual string. Watch the video to see a visual example of how the decoding works making it easier to follow and understand. All of this with a pseudo code.

Chapters:
00:00 - Intro
00:45 - Problem statement and description
02:41 - Logic to decode the given string
05:35 - Finding an optimal solution to decode the string
10:57 - Pseudo code to decode strings
13:31 - Final Thoughts

📚 Links to topics I talk about in the video:

📖 Reference Books:

🎥 My Recording Gear:

💻 Get Social 💻

#leetcode #programming #interview
Рекомендации по теме
Комментарии
Автор

There is a comment issue in your pseudocode...The third condition says if there is "[". It should be "]"

ananyadas
Автор

You seem like a friend with whom everyone wants to spend more time. Nice explanation btw.

unknownman
Автор

Your explanations were clear and easy to follow, and the animations and examples you provided really helped solidify my understanding of the problem.

rhythmbhandari
Автор

I smile, when i see that a Q. has been covered by you. Thank you sir.

shachisinghal
Автор

After watching the video I had to work on it myself and i finally figured the code. Thanx for the video <3

Sawlf
Автор

wow nikhil, you explained so well, far better than many of the paid courses, loved your teaching skills.

shwetagupta
Автор

What an amazing explanation sir, thank you so much ❤️

sukanyaghosh
Автор

Your logic explaination is best, keep making such videos :)

prathameshpawar
Автор

Hey Nikhil, Thank you Man, You explain things in very easy way, keep it up

sonicserenity
Автор

You were phenomenal. Hats off sirrr!!!

cgtwtjp
Автор

I am a big fan of your teaching Skills

vineetkumar
Автор

thank u so so much for the explanation

helloworld
Автор

Thank you sir.Very handy approch and explanation.

pratibhaverma
Автор

you are my new fav instructor after sumeet malik, keep making more videos regularly!
thanks alot.

MrRahulmalik
Автор

Commendable explanation sir!! I just can say one line - Why fear when Nikhil Lohia is here.

shubhammanecr
Автор

Very well explained I don't understand why their is less like to video

motivationalquotes
Автор

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?

MsProtestante
Автор

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

sakibx
Автор

This solution doesn't work if the integer has more than one digit. e.g: 11[ab2[c]de].

phucphamthanh
Автор

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

ridj