Very well explained .. There will be a day when your channel will have almost all the important questions asked in interview.. and a large number of follower ..Keep working bro.. God bless..😃
Well explained and covered everything. I need your help... Could you please help me from where I can learn dp.. I am lacking in it and usually i am not able to develop recursive equation to solve dp problem. Thanks in advance 😊
I am really bad at dp. but you explain it really nice. BTW your channel has grown a lot, congratulations. The channel was quite new when i joined. Great job.
@@techdose4u I didn't got the idea to use recursion or DP. Firstly convert the two arrays into strings and after that take take one by one from first string and finding the index of that character In the second string. And then I used some conditions which are failing for some testcases. So I thought I did wrong in my approach.
sir , I think there is a mistake in this question . The answer for 2 3 2 and 2 in the cell [3][1] should be 2 but it is one. In my opinion , the correct formula for case where character matches is max(left cell , upper cell) + 1.
I applied longest increasing subsequence technique dp[i] = max(dp[i],dp[j]+1) for all j < i and (j & i) are non intersecting. bool isnotIntersecting(pair& curr_pair,pair& prev_pair) {
how not crossing line property is being maintained in dp solution. we did not did any think to keep the not crossing property or did we do something? would u plz make me understand how not crossing property is maintained ?
Ummm....if you think about an easy approach then you will solve it using recursion. If you have solved enough DP problems then you must have come across LCS or similar problems. This one is very similar as well. You need practice to be able to solve DP. Don't worry. Keep practicing.
It will be one because only 1 element in list 2 and 1 are common. Watch the video carefully. I have explained the cases for intersection. You must be matching 2 4s of list 1 with one 4 of list 2. This is wrong.
It wouldn't have mattered. People who don't actually fully understand concept of LCS could not have solved it. So, telling them it is LCS will never clear the concept. You knew because you understood LCS preety well I suppose.
It's late because video was based on graph algorithm and it takes long time to think, explain and edit. Now it's done :) Videos might get late occasionally. Up untill now, questions were easy.
After few days tech dose will give resignation letter to his employer because his youtube channel going to lots of subscribers and viewership 😂😂,paisa , paisa 😅
The concept explained here cannot be found anywhere on the RUclips. It's just priceless.
Thanks 😅
And that too for free ❤
The problem is same as Longest Common Subsequence.
And great explanation Sir!
Thanks :)
Sir , the chronology of your teachings style is just awesome
Thanks :)
I've grown to be a fan of your vedio.They're my first stop for any question or concept I need to clarify on programming!
👍
Great teachers are in youtube,useless teachers are in my university.thank you tech dose for this wonderful video🔥.God bless you⚡⚡⚡
Thanks 😅
well explained, thanks Tech Dose.
Thanks :)
Very well explained .. There will be a day when your channel will have almost all the important questions asked in interview.. and a large number of follower ..Keep working bro.. God bless..😃
Thanks bro :)
after some time this channel will be the gold for people.. Thanku very much bro ...explained very fluently.
Welcome :)
I watched almost all of your videos. Nice explanations! Thanks!!
Welcome :)
Thank you so much for the video. It might take one some practice to intuitionalize but the concept is well explained.
Yes correct :)
Yeah!!! I solved this one bug free without watching this video. 😎 Now I am going to relax and watch this video lol.
Great 😀
If you ever get time please come live bro.. we love to watch you and your awesome suggestions..
It's difficult since I am making videos everyday 😅 I will come live later when I get time.
Question formatted so differently ,it simply asking fin dthe length of maximum subsequence of 2 list.BTW WELL EXPLAINED.
Yes true :)
took me 3hrs to finally get to the solution
You are amazing!!!! Thanks for making these videos.
Thanks :)
Your explanation makes so much sense. Thank you
Welcome :)
Thanks. Bro. Excellent explanation. Along with code.
Welcome :)
Great Video. This looks same as Longest Common Subsequence.
Yep :)
Thank you for making this video. This is gold!
Very well explained! Find it very tough to crack DP problem s
Clearly explained. Good job.
I think default values in a vector is '0'. So, I guess we can directly start from '1' in both loop variables.
Nice suggestion. I never checked for default value. If it is true then it will make things easier.
Thank You So much.Very well explained.
Welcome :)
sir, is this equal to the max sub sequence problem ??
Superb explaination sir
We expect more content from you
👍
Well explained and covered everything. I need your help... Could you please help me from where I can learn dp.. I am lacking in it and usually i am not able to develop recursive equation to solve dp problem.
Thanks in advance 😊
You can only do it with practice. Keep finding reasons for each steps followed in dp and keep practicing. It will be easier as time goes by.
I am really bad at dp. but you explain it really nice.
BTW your channel has grown a lot, congratulations.
The channel was quite new when i joined.
Great job.
Practice will improve you in everything (including dp). I hope we keep growing our community :)
please make a clear video on *Generate all the binary strings of N bits* and how the code is working. Please 🙏
One problem with your playlist is it show several video of same topic or u have uploaded same video many time or it just bug?
RUclips bug.
thank you!
It would be of great help if you could share the recursive solution as well.
I deleted it 😅 The recursion solution is same as Longest Common Subsequence. Please follow that.
How did u got which data structure should be used for this problem?? I tried using strings but it failed for so many testcases.
You could have used recursion or memoization or DP. But what technique did you use?
@@techdose4u I didn't got the idea to use recursion or DP. Firstly convert the two arrays into strings and after that take take one by one from first string and finding the index of that character In the second string. And then I used some conditions which are failing for some testcases. So I thought I did wrong in my approach.
Thank you so much...sir
Welcome
Please post a video Interview prep video GeeksforGeeks Vs Leetcode for preparation
Nice idea. I will do it :)
similar to longest subsequence in 2 strings
nice explanation thank you sir
Yes....welcome :)
@@techdose4u How is it different from LCS? it looks exactly the same
Both are same.
Very well explained....
Thanks :)
awesome explaination
Welcome :)
Thanks sir... For making these videos.. Helps a lot :)
Welcome :3
Great explanation. Keep uploading video
Thanks :)
Very clear explanation :)
Thanks :)
Much better than apna college.
Subscribed!!!!!
👍
Wow man such an amazing video WOW
Thanks :)
@@techdose4u you the bestttt always!!
😅
Wow explanation
what's the point of configuring the std i/o streams if we're not doing any input or output operations?
Just a template repetition maybe
sir , I think there is a mistake in this question . The answer for 2 3 2 and 2 in the cell [3][1] should be 2 but it is one. In my opinion , the correct formula for case where character matches is max(left cell , upper cell) + 1.
Explain backtracking problems also sir
I will try
I applied longest increasing subsequence technique dp[i] = max(dp[i],dp[j]+1) for all j < i and (j & i) are non intersecting.
bool isnotIntersecting(pair& curr_pair,pair& prev_pair)
{
if((curr_pair.first>prev_pair.first) && (curr_pair.second>prev_pair.second))
{
return true;
}
return false;
}
int maxUncrossedLines(vector& A, vector& B) {
vector pairs;
unordered_map um;
for(int i=0;i
Can you add a video of the dice roll simulation problem in leetcode?
Wow, I just realised that this question is another version of finding LCS.
Thank you!
Welcome :)
getting this intuition is tough, how do you get it. just blown up my brain
very well explained sir
Thanks :)
Great explanation!
Always be great approach
Thanks :)
Thank you so much
sir basically we have to find longest common subsequence
Yes right.
AWESOME explanation SIR
Thanks :)
Which college are you from?
Please check linkedIn
I think this problem is very similar to 1143. Longest Common Subsequence : leetcode.com/problems/longest-common-subsequence/
great explanation.
Thanks :)
how not crossing line property is being maintained in dp solution.
we did not did any think to keep the not crossing property or did we
do something?
would u plz make me understand how not crossing property is maintained ?
Is it similar to LCS ?
Same as LCS
Which mic do u use bro ?
Boya
How do we get method of using dp?
Ummm....if you think about an easy approach then you will solve it using recursion. If you have solved enough DP problems then you must have come across LCS or similar problems. This one is very similar as well. You need practice to be able to solve DP. Don't worry. Keep practicing.
Sir what if ex is
2 4 4
1 3 4
It should give 2 but i did dry run and got 1 .
Pls crrct me.
It will be one because only 1 element in list 2 and 1 are common. Watch the video carefully. I have explained the cases for intersection. You must be matching 2 4s of list 1 with one 4 of list 2. This is wrong.
@@techdose4u okk sir.. Thank u very much!!
Welcome :)
This is basically longest common subsequence!
Yes correct :)
Heavy video ;)
😅
Same as Lcs
Yes.
Wow
:)
Not sure i got it or not as i find DP as one of toughest areas..😭
Needs practice man. You can do it.
❤
❤️
this is exactly LCS could have directly told that
It wouldn't have mattered. People who don't actually fully understand concept of LCS could not have solved it. So, telling them it is LCS will never clear the concept. You knew because you understood LCS preety well I suppose.
@@techdose4u ok... btw very nice explanation
Is today's video is late or you have already done it ?
It's late because video was based on graph algorithm and it takes long time to think, explain and edit. Now it's done :) Videos might get late occasionally. Up untill now, questions were easy.
@@techdose4u great video .. thankyou
Welcome :)
Bhaiya count inversions kra do...
BIT se
Let me first make BIT then I will do it's questions as well.
Longest common subsequence problem also has the same solution
This is a different way of putting the same question :)
It's LCS.
Yes, correct.
this is a variation/application of LCS problem
After few days tech dose will give resignation letter to his employer because his youtube channel going to lots of subscribers and viewership 😂😂,paisa , paisa 😅
With support of our community, it might come true :)
LCS problem languaged changed
Correct :)
This is absolutely similar to common substring
Yea....the famous LCS problem.