139. Word Break | JavaScript + Recursion+ Memoization

preview_player
Показать описание
This is a nice example of how we can utilize recursion and memoization to help solve a problem. We will evolve a brute force solution and then make it better with memoization.

pop quiz! do you know the time complexity of this?

If you do please note it below in the comment section.

Super Hint: Java 6 vs Java 7 .. there is a difference :).

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

We want you to make videos, pls... The way you are explaining is priceless...

user_at
Автор

‘The all idea of memoization is that we don’t need to repeat a step we did in the past’.

Great explanation, I appreciate your efforts!

adimizrahi
Автор

Great video. Love your explanations because you go over the thinking process. Not just the solution, but how you would intuitively arrive there.

YeetYeetYe
Автор

I see a very good teacher in you Thanks for the video. The overlapping subproblem identification is tricky unless we have the right test case and you made it easy for me to visualize. I think you should continue making videos as you can teach well that'll help your channel grow.

prapulkrishna
Автор

sir can you plz put the code in the discription for better practice

rajbannasa
Автор

I didn't understand the guessW parameter. It is not being used.

leongrin
Автор

He has a recursion on the word "right, right, right"? Repeat word "right" until the end of the video, lol )
3 times for 6 sek. 7:20 - 7:26

nikitashcherbina
Автор

Just a head's up, prior to 15 minutes, since you zoomed into the code input side, we couldn't see you or where you were pointing to outside of it

Shiruken
Автор

the code seem to be too small to see. its hard to follow. please increase the size next time

TiffanyNg
Автор

Hi ThinkFWD, can you please share how did you come up with the idea that it's a recursive/DP problem cuz when I looked at the given examples, I thought it's a sliding window problem & my sliding window code even worked for the given examples.

This is stressing me out that I can't identify the type of algo to use unless it's apparent.

ninehoursful
Автор

I am not sure this passes the test case

["aaaa", "aaa"]

ara_now
Автор

Very good explanation. The time complexity would be 2^n as if we have 4 char then it will call 16 times recursively. Though memoization avoid certain calls still it is 2^n. Some videos you keep white board session. Please continue that.

venkateshdec
join shbcf.ru