word break | word break leetcode interviewbit | leetcode 139 | recursive top down dp | september

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


#DP #Recursive #TopDown #WordBreak #Word #LeetCode #InterviewBit #Problem139 #Coding #Programming #Interview #Practice #DataStructure #Algorithm #Java #Preparation #NG #nickode #cct #cook_code_travel #september
Рекомендации по теме
Комментарии
Автор

Amazing. The first simple explanation that does not use DP

leonidaskarnesis
Автор

Great video. Great explanation. Thanks.

abhijitbiradar
Автор

very clean, I didn't really understand the question till watched your video. Thank you!

th
Автор

way better explanation than leetcode premium

ExponentialTransduction
Автор

awesomee solutionn thnk u soo much sir

sharuk
Автор

if you get TLE make sure the map/hashmap line is outside of the method.

jcontradiction
Автор

Why we use map map doesnt alllow duplicate character

navinchainani
Автор

I like the way you first explain the brute force approach and then try to move towards the best case solution.:

swapaher
Автор

Very nicely explained 👍. I have searched so much to get proper explanation until I found you.

kumarshivam
Автор

inside the if cond, shouldn't it be map.put(left) instead of the entire input string 's'

thepardhu
Автор

Sir thank you for the amazing explanation.It is really helpful.

saurabhgupta
Автор

Bro, I watched 10 videos but was not able to understand the DP solution, I was able to come up with recursive one. Your video is crisp yet clear. Thanks man, you are a saviour. subscribed

pressplay
Автор

Great explanation! Dynamic programming can be so confusing if you try to find the most efficient solution at the start. This is so much more clear when you find the recursive problem, see if there are repeating sub problems, and cache the answers to these repeated problems to optimize it.

SM-Drew
Автор

It throws up TLE even after using map for me which is weird..

harshavardhanm
Автор

Sir i have one request that can you please make one video on scatter palindrome. A string is a scatter palindrome if its letters can be rearranged to form a palindrome. We have to determine how many substrings of a given string are scatter palindrome.
example :- given string is "aabb"
output :-9
["a", "aa", "aab", "aabb", "a", "abb", "b", "bb", "b"]
Note:- substrings which are equal but are presesnt at different positions in a string is considered different. example "a" at 0 is considered different from "a" at 1

saurabhgupta
Автор

Complexity Ananlysis
Recursive - TC - O(N * 2^N), SC - O(N)
DP - TC - O(N^3), SC - O(N)

NareshGupta
Автор

Isn't it adding some extra time factor if we are using substring ?

vishalgoel
Автор

11:10 how is space complexity O(1) if you are doing recursive call and there is also a map?

MayankSingh_is_me
Автор

Thank you so much for this video, after spending a day on this problem I finally understood the solution!! Also can anyone pls explain why the tc of bruteforce approach is exponential and is it 2^n?

rohandsouza
Автор

Thanks for the great explanation! Really helpful, just wondering how should this problem approached if we do it bottom-up? I am still a bit iffy between these two.

lany
welcome to shbcf.ru