You can prune some of the states as well. First one would be making a cut till n/2 and m/2. Because after that the same pair will be repeated. Second is if (n==1 || m==1) in that case you can simply return max(n,m)+1 Memoized code ll dp[501][501]; ll recur(ll n,ll m){ if(n==m)return 0; if(n==1 || m==1){ return max(n,m)-1; } if(dp[n][m]!=-1)return dp[n][m]; ll ans = INT_MAX; for(ll i=1;in>>m; for(ll i=0;i
It's great that you observed this, the only way to do this is to initialise a 2d vector with each vector being of different size but that would be just an overkill, so it is fine even if you don't optimize the space from O(a*b) to O(a*b/2)
Bhai remaining videos upload kar de bar bar teacher hi change karate rahe kya dynamic programming ke liye. I will request you please make videos for the remaining problems
How is dp[i][j] making sure that it will return the minimum number of cuts for making squares as we have just handled base case but no where checking on square condition
Please upload the remaining videos. Eager to learn from you. Absolutely Fantastic Teaching & Explanation....
Sir please upload remaining dp questions videos
we are waiting :)
Hey Priyansh, this series is amazing, could you add more here ? If possible could you cover leetcodes problems ?
the series is awesome ...PS your cute smile throughout the lecture makes it much more interesting :))
Haha thank you so much.
You can prune some of the states as well. First one would be making a cut till n/2 and m/2. Because after that the same pair will be repeated. Second is if (n==1 || m==1) in that case you can simply return max(n,m)+1
Memoized code
ll dp[501][501];
ll recur(ll n,ll m){
if(n==m)return 0;
if(n==1 || m==1){
return max(n,m)-1;
}
if(dp[n][m]!=-1)return dp[n][m];
ll ans = INT_MAX;
for(ll i=1;in>>m;
for(ll i=0;i
why you have not completed the playlist? you are teaching the DP nicely, please make remaining videos as well.
Thank you for such amazing explanation.
bro resume the playlist it helps a lot
I tried this one by myself and solved it using only half of the matrix by these formulas:
for (int k = 1 ; k
It's great that you observed this, the only way to do this is to initialise a 2d vector with each vector being of different size but that would be just an overkill, so it is fine even if you don't optimize the space from O(a*b) to O(a*b/2)
Priyansh said that, DP videos will resume on 10 th december, then why the delay is happening??
@Priyansh Agarwal
?
Eagerly waiting for the next video, it's been a month since the last upload.
@priyanshagarwal
Great explanation , great series.
Bhai remaining videos upload kar de bar bar teacher hi change karate rahe kya dynamic programming ke liye. I will request you please make videos for the remaining problems
@priyansh next video when
when other videos will come?
next video when ?
Remaining videos?
next video when ??????
How is dp[i][j] making sure that it will return the minimum number of cuts for making squares as we have just handled base case but no where checking on square condition
If I==j is making sure that it is square
Sir plz resume the playlist😢
Will more videos come in this series?
Eager to learn from you.
Yes, starting from 10th Dec
@@TLE_Eliminators ?
it's 5th april bro @@TLE_Eliminators
bro plz resume this playlist
Recursive solution please.
Where are the remaining Questions?
Thank you!
#day 13 done.
waiting for the next video
pleasee its been 3 weeks now
?
understood
#day 13 Understod very well and again you add wrong link for question
The playlist will resume from 10th December of 2024?
Don't joke.. It's serious
What is the IDE that he uses?
Sublime with Brogrammer theme
i got TLE because n,m
you can explain na why are you using background music
Kya ho gya dost, sab theek hai?