Distinct Subsequences | Leetcode 115 | Live coding session

preview_player
Показать описание
Here is the solution to "Distinct Subsequences" leetcode question. Hope you have a great time going through it.

1) 0:00 Explaining the problem out loud
2) 1:10 Algorithm walkthrough
3) 2:00 Solution approach
4) 18:00 Coding

For discussion/feedback

PS : Please increase the speed to 1.25X

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

Thanks a bunch! dp seemed hard but no more, very well explained.

rimjhimmoitra
Автор

Very well explained keep it up mahn!!!

sajan
Автор

what is the intuition behind the process?

aarindey
Автор

bro, we don't need the filling of the whole table, we need how you do come up with DP states in match and mismatch case ?.. that thinking we need..please explain like that. and using int is not passing the solution

kabilanm
Автор

Bro, I know how to solve such questions using recursion TopDown approach, but how to memoize it doesnt come naturally to me.
Nevertheless your video cleared my doubt how to do it using BottomUp. Thanks!

guptagaurav
Автор

I am getting runtime error due to int overflow but the ques mentions the answer would fit in 32 bit integer, any possible error??

kaushalaggarwal
Автор

Where does the question give the hint we have to use DP with 2D array? My first instinct was to use pointers/Sliding window. Is there some key words to identify a DP problem?

bliewhale
welcome to shbcf.ru