Regular Expression Matching - Dynamic Programming Top-Down Memoization - Leetcode 10

preview_player
Показать описание


0:00 - Read the problem
3:55 - Drawing Solution
19:00 - Coding Solution

leetcode 10

#regular #expression #python

Disclosure: Some of the links above may be affiliate links, from which I may earn a small commission.
Рекомендации по теме
Комментарии
Автор

I can't thank enough for this video! Even after spending nearly 3 hours on various videos showing direct DP (bottom-up) solution, and countless posts in Discuss section with no clear explanation, I could not understand how the formulae are derived. But.... this is gem of a video and probably the only video on Youtube explaining the Top-Down approach.

In fact, it is better to try Top-Down approach in interviews. Directly trying to attack a problem with DP formula can lead to disasters. If the interviewer is not dumb expecting a specific answer involving DP, he/she/they should be okay with Top-Down+Memoization approach.

Thanks again! Keep making such amazing videos.

sudheerk
Автор

If I crack my FB interviews it's only going to be because of this channel. Keep up the "NEET" work :)

parambole
Автор

To be honest, I never would have even guessed that this is a Dynamic Programming problem. Once you started explaining the decision tree, it ALL made sense. Thanks for teaching me something new!

jimwu
Автор

I really appreciate how clean your code was and was so easy to understand

chinmaym
Автор

OMG, the question looked so tough, but you made it soo easy !! Another awesome explanation. Great fan of your NEET coding style :)

dollyvishwakarma
Автор

The clearest explanation I've seen!!! You are awesome :)

xinchenyi
Автор

This is a fabulous and thorough explanation. The decision tree explanation and visual for the asterisk was what did it for me. Thank you!

michaeldunlap
Автор

Great explanation! I really like how you easily added memoization to the brute force algorithm. Other DP solutions were SO complicated. This explanation was perfect.

autoot
Автор

Simply mind-blowing explanation, you made it so simple!! Thanks you! Please keep up the good work!

arpanbanejee
Автор

BEST EXPLANATIONS ARE HERE :)
Thank you so much for these quality videos!

AbanoubAsaad-YT
Автор

I was struggling a lot with this question. Your video cleared my doubts. Thanks for sharing!

buttercup
Автор

Great explanation! You explained the algorithm very clearly. I'm not even Python guy, but I still liked your video!

hakoHiyo
Автор

You make this question easy to udnerstand. Thank you for all your amazing solutions!!

yukselpolatakbyk
Автор

great explanation the vibe of ur videos is relaxing!

kanwarkajla
Автор

If someone didn't get the cache part, try printing out the (i, j) pairs with the following example: text="aaabaaa" and pattern = "a*b*a*".
If you take a careful look, since we are backtracking, there are cases where we check the same (i, j) pairs. And that's why caching helps.

TheRetrobek
Автор

I really appreciate your explanation, so clean, so logical!

ruizhu
Автор

What a brilliant solution and in-depth explanation for this seriously hard problem !!! WOW .... Thank you !!!!

vdyb
Автор

Thanks alot for helping me understand the issue, I was doing the bottom up and solution was failing in leetcode on last 2 test cases. After watching this video I understood we need to do bound check on index "i" - stupid of me missing such a basic thing. Now solution worked

santoshr
Автор

This explanation makes the whole process clean and simple.

podkxrd
Автор

Thanks Hokage for explaining it really well.Seen a lot of videos where people directly start drawing table.Will memoized soln be enough for an interview or do we have to give a bottom up soln too??

Iamnoone