liked this video? Click here / @codebix1096 problem :- practice.geeks... code :- github.com/luc...
Пікірлер: 66
@anktrj4 жыл бұрын
I saw 10 videos on this . . . every one just filled the dp table but you helped me see the overlapping subproblem. Thanks man.
@kbhanuprakash95302 жыл бұрын
True
@RahulVerma-x1k6 ай бұрын
correct, everywhere they r explaining tabulation
@ujjwalshrivastava-xs5lxАй бұрын
Yeah
@csalgo73454 жыл бұрын
You're the Guru of recursion and a very valuable resource to learn from. Please keep up the great work that you're doing!
@codebix10964 жыл бұрын
Thanks, will do!
@Abhishek-Khelge3 жыл бұрын
@@codebix1096 Seriously idea is so clear and easy to understand.
@AnandKumar-kz3ls2 жыл бұрын
well done bro just sick and tired of youtubers uploading tabular solution and playlist and kids commenting in comment section you're god of dp and this video proves if you know recursion well and never ever heard of dp before you can solved almost any solution
@imajt5 Жыл бұрын
Thanks for the explanation, but the cases are like 1. If matched, then we will take the max of three cases - fn(i-1, j-1, count + 1), fn(i-1, j, 0) and fn(i, j-1, 0) Bcz there can be case like "pbax " and "pbpbax" this string, so even though string is matching we cannot ignore the other cases 2. If not match, then we have only two case - fn(i-1, j, 0) and fn(i, j-1, 0)
@shaulendrakumar6314 Жыл бұрын
bro can you pls give the correct code of this?
@shaulendrakumar6314 Жыл бұрын
pls bro can you send??
@imajt5 Жыл бұрын
@Shaulendra bhai de dunga baad me...ab dekhna padega
@ADNANAHMED-eo5xx3 жыл бұрын
First video I saw on your channel, what an indepth tutorial
@MDEMANURRAHAMAN-4 ай бұрын
Best Explanations Indeed ❤
@theuntoldtree2 жыл бұрын
Guys share this channel, let's support his hardwork , he deserves.
@adityajoshi8578 Жыл бұрын
this is the only video that helped me ...! gr8 explanation and content
@kanishkanand15553 жыл бұрын
this is o(n^3) because this problem lacks suboptimal structure , but finding longest common suffix of the prefixes takes just o(n^2) and is far more easy to code and implement.
@betabias2 жыл бұрын
can you please elaborate what suboptimal structure is, or any reference link for the same?
@jatinkumar44104 жыл бұрын
Thank you sir...your explanation is very clear!
@pawanpandey23 жыл бұрын
You are pro bro in explaining recursion!!
@codebix10963 жыл бұрын
Thank you. Follow our linkedin page for regular updates www.linkedin.com/company/codebix/?viewAsMember=true
@judgebot7353 Жыл бұрын
very nice keep going. This is absolute gold content
@SouravGhosh-pb5nm3 жыл бұрын
Thanks for such a crisp and nice explanation.
@codebix10963 жыл бұрын
You are welcome !
@kushalappaca53242 жыл бұрын
Great way of explaining..
@nishthavan37643 жыл бұрын
One Ques though How will string PBAN AND PPBAN Work ?? Longest common is 4 but you it is 3 because P will be removed and BAN and PBAN will be left. I think code is right but explanation is a little wrong there will always be 3 call when we are on current node to account for the problem I just mentioned but there will be 2 calls in the case when not matching but when matching there will be 3 calls.
@TarunKumar-cn6in2 жыл бұрын
Crystal clean explanation ..
@rituraj60563 жыл бұрын
tnks a lot sir,u really feeled about recursion tree
@codebix10963 жыл бұрын
Thank you. Follow our linkedin page for regular updates www.linkedin.com/company/codebix/?viewAsMember=true
@pratikjadon1468 Жыл бұрын
This solution getting wrong answer in GFG longest common Substring ? Also why we are checking the all three condition even when character of both strings are equal ? plz tell im alot confused
@mayankbadika3101 Жыл бұрын
Excellent explanation . Keep it up :)
@advik83872 жыл бұрын
I think while explaining you forgot one thing, for prsq and pprs - even though the first chars are same, it will still go through diff1 and diff2, because there is a possibility that a longer substring could result from that, the code is correct, but the explanation and recursion map misses this. the ans is 3, but according to explanation it's 1.
@vanshsehgal94752 жыл бұрын
Yeah I noticed that thing!!
@shaulendrakumar6314 Жыл бұрын
bro can you pls share the corrected code??
@mtoheed10852 жыл бұрын
what the powerful videos...really bomb man
@anonymous1090610 ай бұрын
loved it
@sanjayjoshi88073 жыл бұрын
c++ solution same like yours giving TLE on GFG can you help in this sir !!
@ankitparashar87303 жыл бұрын
Haa🙄
@AvikNayak_2 жыл бұрын
only bottom-up approach is getting accepted.
@varsha42604 жыл бұрын
Sir,you should have put a else statement if the characters are equal ,then we don't have to split it into two parts and just return the same till that part.
@HimanshuKumar-hm4wv3 жыл бұрын
great explanation sir
@anktrj4 жыл бұрын
Also there's one request can you explain how this overlapping subproblem can be visualized in iterative DP technique
@theuntoldtree2 жыл бұрын
sir difference vaale case ko else m ku nhi rkha?
@AnandKumar-kz3ls2 жыл бұрын
aabc , abc this test case will fail
@vikramshukla64362 жыл бұрын
Key banate waqt beech mein koi bhi string daalna necessary hain kya ?
@pragneshamadavadi2267 Жыл бұрын
worth watching content !! Understood
@nikhilgoyal83403 жыл бұрын
Badiya samjhaya bhai
@pratikjadon1468 Жыл бұрын
if s[i] == s2[j] then we are checking with 1 + (i-1,j-1) but why the other two recursive condition not in else block . I mean to say if two characters are equal then we use if condtion but we are also executing the (i-1,j) and (i,j-1) even if s[i[ == s2[j] regardless of if condition.
@vinayjangra1401 Жыл бұрын
yess, because unlike longest commong subsequence here we are not sure that if the first char matches then it would be our opmtimal answer or not, lets say abcde and afcde, here both first char matches , if we just put that statement in if else it means we are including this 'a' in our final answer but final answer will be cde, cde, which has no 'a'(first char). hope you got it
@utkarshchauhan58272 жыл бұрын
U r Excellent
@Ankit.yt_885 Жыл бұрын
Well done!
@Ajji_stories122 жыл бұрын
super
@anktrj4 жыл бұрын
And What if some asks me to find out the complexity of the memoization. How to do that? Should I just check the pattern by building the decision tree which can be messy
@toomuchpoop4503 жыл бұрын
when its a 2d dp its usually n^2
@raunakkumar6144 Жыл бұрын
its 3 d dp
@priyanshuplays9457Ай бұрын
Bro it is giving tle on gfg :(
@InderjitSingh-sh9ve2 жыл бұрын
Cpp solution bhi diya kro please
@samsingh435 ай бұрын
Wrong s1 = pobox s2 = boxax
@suyashsingh43382 жыл бұрын
Still Gives TLE on GFG
@anirudh65493 жыл бұрын
TLE
@varsha42604 жыл бұрын
Sir your memoized solution is getting time limit exceeded on leetcode
@soumyadiptabanerjee82563 жыл бұрын
memoization here is a n^3 approach. Go for dp.
@DMDRPBHU3 жыл бұрын
W aaaaaah
@codebix10963 жыл бұрын
Thank you. Follow our linkedin page for regular updates www.linkedin.com/company/codebix/?viewAsMember=true