I m having 10+ yrs of experience in JAVA. I guess it's sufficient for us also. Before leaving India would u be able to complete DP series? Kindly don't leave in-between.
Can the Lecture Notes be updated from DP-16 onwards? It is a something which makes your series unique from other creators, as it makes revision also much more easy! :)
Before I started watching your series on dp and recursion, my brain wasn't able to process recursion, so I completely avoided it. But your daily dose of dp is certainly changing that. Your content is no doubt good, but your energy is on a different level.
Hey Striver, I did the problem in all 4 approaches including 1D Array space optimization without watching the video. Your videos helped me a lot. Thanks, Striver. This is the best DP series out there.
I already solved this question with all 4 approaches upto space optimization with 1 array before watching this video.This dp on subsequence part is running in our veins now.
Just completed the dp on subsequence section and literally by the end I could solve the problem without looking at the video and skipping the recursion part itself. Outstanding job of compliling and explaing the dp process. So many DP lectures, blog posts out there but none of them covers the core idea of how the tabulation itself is achieved. Most of them consider tabulation as a totally different approach and make it magical instead of teaching it as an optimization step after recursion which makes it difficult to approach. Keep up the good work we need more people like you 👍the cherry on top is its free of cost ❤❤❤.
I just have 2 days to learn DP. I am super thankful for my brother to suggest this. Now I am confident enough to solve problems. The way you teach from breaking down the problem statement to building up solution step by step is such a bliss. I was so confused looking at solutions on internet which would straight away be the space optimised. At times I couldn't understand why would take dp[n][target+1] length. All these confusions had built up anxiety and dp seemed allergic. Now I can sayyyyy DP IS FUN! Thanks Striver!!
Before I started watching your series on dp and recursion, my brain wasn't able to process recursion, so I completely avoided it. But your daily dose of dp is certainly changing that. Your content is no doubt good, but your energy is on a different level.
Your dp series is Marvelous. For me yes now I can able to solve dp problem atleast i can come up with the recursive steps quickly. But some times the base case part (specially thinking of base case part in tabulation is tricky) But I am quite sure that with practice I will make it good. Thank you so much for your efforts ❤️❤️
I code all 4 solutions - recursion -> memoisation -> tabulation -> space-optimisation even before starting this video.....That's the confidence and knowledge one gets by following Raj bhaiya's DP series....Kuddos to you.... Raj bhaiya.....
I have seen people saying that they struggle with DP a lot and this was my first time studying DP literally you made it so easy for me you made me so confident like just throw any question at me till now and i would do it for you to the last possible optimization thanks for this masterpiece and as always UNDERSTOOD everything.
UNDERSTOOD......After this I went to leetcode and trying doing problem on dp on subsequences ....I had sloved almost every by my own except some problems ...Thanks for bringing this ,I really don't know how to express my gratitude towards you.
Hey Striver, I did the problem in all 4 approaches including 1D Array space optimization without watching the video. Your videos helped me a lot. Thanks, Striver. This is the best DP series out there.❤❤
Understood !!! Literally man, what are you ! You just made it very very easy with your concepts, approaches, clean and short codes. Simply Great !!! And not to miss, You converted fear to joy smoothly :) Hats off to you man !!!
Thank you Striver! Successfully solved using all the 4 approaches by myself without watching the video. It's all because of you. A few months back I was afraid of DP and now I feel the most confident in DP, all thanks to you!
Opened the video just to get the problem link. I got stuck in the take condition, but then did the rest till 1D array all by myself. Thank you for the great lectures.
Previously when i tried to solve this problem ,i was stuck,but today i was able to solve it in 1d space without even watching the vid,amazing content bro
You are the best Striver! I totally enjoyed DP on Subsequences, a topic I feared a lot, but now it has become a topic that I enjoy and solve. Understood it because of your awesome way of teaching, thank you bhaiya!!!
Thank you!! Your videos truly help me!! When I listen to my professor's lectures, I find it difficult to keep up with the professor's pace most of the time. But when I watch your videos, I can easily follow up. And after watching your video, I can use the same strategy to solve different dp problems.
Hii striver , I used same code we did for unbounded knapsack .Instead of weights vector I created a vector of size n whose value of each index =index+1 and then I passed it. It worked perfectly🤩. And more importantly I did this before watching this video😊😊. Thank you.
Honestly speaking, I feared after I saw any DP problem, and now after coming this far I can write the tabulation code all in the first step... All thanks to this wonderful course by striver..
Recursion, Memoization, Space Optimization, and 1D array optimization ALL BY MYSELFFFF!!!!!. THANK YOUUUU STRIVERRRRR!!!!! YOU'RE THE BEST TEACHER EVERRR!!!!!! DP ON SUBSEQUENCES EASYYYY PEASSYYY LEMON SSQUEAZZYYYY!!!!!!!! 💯💯💯💯💯
I was only confused with the base cases of this problem, had watched the lecture till recursion part, but solved this problem using all the 4 methods including 1-D Space optimised tabulated approach, all thanks to you Striver❤
Previously I found many difficulties in DP but after following your DP series I feel comfort in DP Without seeing this video I solve this question only by your approach... in previous Question thanks a lot sir and I think this is one of the best DP series....
I ain't watching the videos for the approaches , with just a little consistency of less than 2 weeks i'm able to solve most of the problems until now. I still came here to write on this video because i think bhaiya you deserve to know this how awesome playlist you've created. God bless you and your family ❤
..may be u never see this comment but striver you are really a god gifted person.....i was afraid of dp on subseq , after doing all your lectures i am able to write recursive as well as easily memoize it for hard and unseen problems.....thank you than you sooo much❤❤❤❤...
understood,able to solve by myself.After mapping it to 0/1 Knapsack ,it was cakewalk.But mapping it to 0/1 Knapsack currently is easy as I'm solving DP subsequence problem right now.But in future mapping and remembering will be most important part.
Solve this without seeing solution . i have to say that i m loving the process 🔥🔥. BTW bhaiya , many many congrats for getting promoted to SWE 3 at Google . 😃😃
understood and able solve the problem on my own int cutRod(vector &price, int n) { // Write your code here. vectordp(n+1, 0); dp[0] = 0; for(int N=1; N
The best dp playlist available in the market. Before this i had confusion whether to continue with love babbar or start strivers do. Best decision i've made for a while.
I hope I will be able to solve any question in this pattern. Understood all problems taught so far. Thank you very much. Its just time to practice now.
Hello Striver, your videos have been very useful to me and my research project (I am facing a lot of optimization problems). I've already had experience in solve DP problems, but your approach definitely take me forward =), regards!.
Never knew Rod Cutting problem is just Unbounded Knapsack with Rod length = Knapsack capacity; Price of each piece = Profit of items ; Length of each piece = Weight of items....simply fabulous 🤯
for those who are thinking why we are making recursive call with same index again and again when we pick it , its a small logic. In previous questions of dp on subsequences, we had constraint that if we pick an index then it cannot be picked again in calculating that particular answer (particular branch if you think it by drawing recursion tree). since in this question we are allowed to take same length even more than 1 time , that is why rather than going to previous index we try to check if the curr length can be again cut off from the rod. eg- N=10 and idx=4 i.e rod length= 5 , so we will check for length =5 and then rather than going to check for length =4 , we will check if we can cut length=5 again , since it is allowed to cut multiple same lengths. and we cannot cut same length more than once , simply "not take" will go ahead and continue the flow of recursive calls
This is my first ever comment in your playlist. I was able to do the question myself. I significantly see a definite change in me. Thank u sooo mucchh striver🥰. I understood dp only becoz of u.
knapsack wali se hi hojayega ,koi code mein change karne ki jaroorat nahi , bas array of wieghts ko index+1 se initialise kardo aur kaam khatam. learnt a lot from this series , uski wajah se hi maximum question ho paa rahe hai
Summary: convert the problem to unbounded knapsack N -> capacity of bag Rod lengths (which are (ind + 1) of given array) -> weights of elements Prices -> Values
Thanks bhaiya for providing these important series with full effort. You are an inspiration for all of us Tier - 3 college students. I Hope many like me would take benefit of it. Very thankful to you 😊
We completed DP on Subsequences, can you solve any question now on this topic :P
Thanks for the content, high on confidence
I m having 10+ yrs of experience in JAVA. I guess it's sufficient for us also. Before leaving India would u be able to complete DP series? Kindly don't leave in-between.
Definitely Yes!!!
Can the Lecture Notes be updated from DP-16 onwards? It is a something which makes your series unique from other creators, as it makes revision also much more easy! :)
@@yashroy7436 sure, let m give u the link: takeuforward.org/dynamic-programming/striver-dp-series-dynamic-programming-problems/
Before I started watching your series on dp and recursion, my brain wasn't able to process recursion, so I completely avoided it. But your daily dose of dp is certainly changing that. Your content is no doubt good, but your energy is on a different level.
TRUTH
now dp is all about writing recursion and after that its just a cake walk
@@AshishKumar-ww1mr exactly if you can write the recursive brute force solution correctly then it's just a cake walk.
Hey Striver, I did the problem in all 4 approaches including 1D Array space optimization without watching the video. Your videos helped me a lot. Thanks, Striver. This is the best DP series out there.
Your comment may be very satisfying for striver but he will also feel he lost some watch minutes!
@@apratimdutta2223 Even after solving there is always something new that you always get from his videos .
🤣🤣@@apratimdutta2223
I can do questions I even feared to read now in just 10 minutes. Thanks a lot, Striver.
I already solved this question with all 4 approaches upto space optimization with 1 array before watching this video.This dp on subsequence part is running in our veins now.
Just completed the dp on subsequence section and literally by the end I could solve the problem without looking at the video and skipping the recursion part itself. Outstanding job of compliling and explaing the dp process. So many DP lectures, blog posts out there but none of them covers the core idea of how the tabulation itself is achieved. Most of them consider tabulation as a totally different approach and make it magical instead of teaching it as an optimization step after recursion which makes it difficult to approach. Keep up the good work we need more people like you 👍the cherry on top is its free of cost ❤❤❤.
I just have 2 days to learn DP. I am super thankful for my brother to suggest this. Now I am confident enough to solve problems. The way you teach from breaking down the problem statement to building up solution step by step is such a bliss. I was so confused looking at solutions on internet which would straight away be the space optimised. At times I couldn't understand why would take dp[n][target+1] length. All these confusions had built up anxiety and dp seemed allergic. Now I can sayyyyy DP IS FUN! Thanks Striver!!
Before I started watching your series on dp and recursion, my brain wasn't able to process recursion, so I completely avoided it. But your daily dose of dp is certainly changing that. Your content is no doubt good, but your energy is on a different level.
Your dp series is Marvelous.
For me yes now I can able to solve dp problem atleast i can come up with the recursive steps quickly.
But some times the base case part (specially thinking of base case part in tabulation is tricky)
But I am quite sure that with practice I will make it good.
Thank you so much for your efforts ❤️❤️
I code all 4 solutions - recursion -> memoisation -> tabulation -> space-optimisation even before starting this video.....That's the confidence and knowledge one gets by following Raj bhaiya's DP series....Kuddos to you.... Raj bhaiya.....
Could you please share the link or notes here as well.
🙌
This is an outstanding DP series. Even if you overlook your dedication to come up with 4 ways to solve 1 question in every video. Thanks for this.
I have seen people saying that they struggle with DP a lot and this was my first time studying DP literally you made it so easy for me you made me so confident like just throw any question at me till now and i would do it for you to the last possible optimization thanks for this masterpiece and as always UNDERSTOOD everything.
UNDERSTOOD......After this I went to leetcode and trying doing problem on dp on subsequences ....I had sloved almost every by my own except some problems ...Thanks for bringing this ,I really don't know how to express my gratitude towards you.
Hey Striver, I did the problem in all 4 approaches including 1D Array space optimization without watching the video. Your videos helped me a lot. Thanks, Striver. This is the best DP series out there.❤❤
Understood !!!
Literally man, what are you ! You just made it very very easy with your concepts, approaches, clean and short codes. Simply Great !!!
And not to miss, You converted fear to joy smoothly :)
Hats off to you man !!!
Thank you so much striver after watching this series i am enough confident that i can solve any question on subsequence pattern
Understood :)
Been doing all the problems on my own for the last 10 problems or so, your content (and especially its ordering) is genuinely incredible
UNDERSTOOD sir, Thanks for this amazing series.
Thank you Striver! Successfully solved using all the 4 approaches by myself without watching the video. It's all because of you. A few months back I was afraid of DP and now I feel the most confident in DP, all thanks to you!
after watching all the above videos , I was able to solve this question on my own completely. Thanks a lot
Understood !! Hey striver i solved this on my own with all aproaches. Thanks you are awesome !!
*with all three approaches*
*approach1: recursion*
int solve(int n , vector prices)
{
if(n == 1) return prices[0];
if(n == 0) return 0;
int maxi = INT_MIN;
for(int length = 1 ; length
Surprisingly, a similar variant was asked to me in 1st round of Microsoft interview
JOB MILA
pls reply
Now I'm confident enough to say that I can solve any question on DP on Subsequences... Thank you so much Striver .. 🔥🔥
Forever Grateful🙇
Opened the video just to get the problem link. I got stuck in the take condition, but then did the rest till 1D array all by myself. Thank you for the great lectures.
Previously when i tried to solve this problem ,i was stuck,but today i was able to solve it in 1d space without even watching the vid,amazing content bro
*Code timestamps*
Recursion: 12:15
*Complexities*
Recursion and memorization: 13:35
You are the best Striver! I totally enjoyed DP on Subsequences, a topic I feared a lot, but now it has become a topic that I enjoy and solve. Understood it because of your awesome way of teaching, thank you bhaiya!!!
Your DP series is extremely great!! Hats off for your effort!!
I listen the problem and just remove the weight array from the fractional knapsack code as simple as that . All Thanks to striver.
Thank you!! Your videos truly help me!! When I listen to my professor's lectures, I find it difficult to keep up with the professor's pace most of the time. But when I watch your videos, I can easily follow up. And after watching your video, I can use the same strategy to solve different dp problems.
Hii striver ,
I used same code we did for unbounded knapsack .Instead of weights vector I created a vector of size n whose value of each index =index+1 and then I passed it. It worked perfectly🤩. And more importantly I did this before watching this video😊😊.
Thank you.
did the same things bruh...
Honestly speaking, I feared after I saw any DP problem, and now after coming this far I can write the tabulation code all in the first step... All thanks to this wonderful course by striver..
Understood entire DP on subsequence!!! Feels like i can make my own questions on this topic.
After viewing from starting to till 3 min. i have solved this problem from recursion to space optimization. :)
Recursion, Memoization, Space Optimization, and 1D array optimization ALL BY MYSELFFFF!!!!!.
THANK YOUUUU STRIVERRRRR!!!!! YOU'RE THE BEST TEACHER EVERRR!!!!!!
DP ON SUBSEQUENCES EASYYYY PEASSYYY LEMON SSQUEAZZYYYY!!!!!!!! 💯💯💯💯💯
Now, after watching Striver Bhaiya's DP series, I can solve any problems from DP.
Understood! Dp became cake walk for me only because of you. Thanks a lot. Very grateful to you.
Understood! Since you've already explained these concepts so well in the previous problem, I was able to solve it on my own. Thanks, Striver! 💯
I was only confused with the base cases of this problem, had watched the lecture till recursion part, but solved this problem using all the 4 methods including 1-D Space optimised tabulated approach, all thanks to you Striver❤
Previously I found many difficulties in DP but after following your DP series I feel comfort in DP
Without seeing this video I solve this question only by your approach... in previous Question
thanks a lot sir and I think this is one of the best DP series....
No one has expalined approach to his problem so well. keep growing and giving amazing contents.
I ain't watching the videos for the approaches , with just a little consistency of less than 2 weeks i'm able to solve most of the problems until now. I still came here to write on this video because i think bhaiya you deserve to know this how awesome playlist you've created. God bless you and your family ❤
You made me feel confident in DP
And yes, UNDERSTOOD 🔥
..may be u never see this comment but striver you are really a god gifted person.....i was afraid of dp on subseq , after doing all your lectures i am able to write recursive as well as easily memoize it for hard and unseen problems.....thank you than you sooo much❤❤❤❤...
UNDERSTOOD..........Thank You So Much for this wonderful video...........🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻
This series provides immense clarity on the concepts ❤. DP on sub-sequences felt like a cakewalk.
Thank you and Understood.👍
wonderful series it is, completed this question in 4 minutes without watching the video.
solved this problem in all the ways without watching this video🤩Striver bhaii🔥
Was able to solve via all 4 approaches without watching the video thank you so much for the playlist.
FInally solved Question without watching video , thanku man.
understood,able to solve by myself.After mapping it to 0/1 Knapsack ,it was cakewalk.But mapping it to 0/1 Knapsack currently is easy as I'm solving DP subsequence problem right now.But in future mapping and remembering will be most important part.
You are extremely great i have solved all 3 approaches on my own 🎉
Bhaiya your couse is a premium course. Thanks for giving us it for free. Very thankful to you 😊
This playlist is created for build a confidence in every student that he can do anything with coding
Solve this without seeing solution . i have to say that i m loving the process 🔥🔥. BTW bhaiya , many many congrats for getting promoted to SWE 3 at Google . 😃😃
understood and able solve the problem on my own
int cutRod(vector &price, int n)
{
// Write your code here.
vectordp(n+1, 0);
dp[0] = 0;
for(int N=1; N
Understood from recursion to 1D array optimization. Thank you so much for your awesome series.
Understood striver! through your teaching way, it is easy getting into dp day by day, it's because of you only Striver❤✨
without watching the solution, i solved it by my self , thank u striver
I have started to solve the problems by myself, thanks to you bro
The best dp playlist available in the market. Before this i had confusion whether to continue with love babbar or start strivers do. Best decision i've made for a while.
did this question myself . thanks a lot . i was not proficient with solving these kinda questions but now they seem easy .thanks a lot
exact same code of unbounded knapsack passes
thanks striver 👍👍
understood ! was able to solve the problem all by myself till 1d space optimization.
Thank you so much for posting very good quality lectures on data structures. It is very much helping in preparing for my dream job
Your DP Series is extremely of Next Level
I hope I will be able to solve any question in this pattern. Understood all problems taught so far. Thank you very much. Its just time to practice now.
Hello Striver, your videos have been very useful to me and my research project (I am facing a lot of optimization problems). I've already had experience in solve DP problems, but your approach definitely take me forward =), regards!.
Never knew Rod Cutting problem is just Unbounded Knapsack with Rod length = Knapsack capacity; Price of each piece = Profit of items ; Length of each piece = Weight of items....simply fabulous 🤯
After watching these videos I am able to solve the problems till 2array space optimization by myself!!!!! kudos to striver!!!!
You make dp on subsequences so so easy..... really you are great.... ❤❤❤
Bhai ..your dp series is damn amazing it is one of the best dp playlist in the world ...where you cover each and everything
I am still not able to believe that I am not scared of DP anymore, in fact pretty confident in it. Thanks striver bhiaya !!!
Done this question by all 4 approaches ,Thanks Striver
Thanks for providing these important series with full effort.
Hope many like me would take benefit of it
Understood. Many Many Thanks Sir. Your teaching style is absolutely awesome.
for those who are thinking why we are making recursive call with same index again and again when we pick it , its a small logic.
In previous questions of dp on subsequences, we had constraint that if we pick an index then it cannot be picked again in calculating that particular answer (particular branch if you think it by drawing recursion tree).
since in this question we are allowed to take same length even more than 1 time , that is why rather than going to
previous index we try to check if the curr length can be again cut off from the rod.
eg- N=10 and idx=4 i.e rod length= 5 , so we will check for length =5 and then rather than going to check for length =4 , we will check if we can cut length=5 again , since it is allowed to cut multiple same lengths.
and we cannot cut same length more than once , simply "not take" will go ahead and continue the flow of recursive calls
This is my first ever comment in your playlist. I was able to do the question myself. I significantly see a definite change in me. Thank u sooo mucchh striver🥰. I understood dp only becoz of u.
Yes I got the confidence that dp on subsequence is easy topic now. Thank for the awesome series.
knapsack wali se hi hojayega ,koi code mein change karne ki jaroorat nahi , bas array of wieghts ko index+1 se initialise kardo aur kaam khatam. learnt a lot from this series , uski wajah se hi maximum question ho paa rahe hai
Completed! I feel very confident now
Understood Striver !! Cheers 🎉
happiness is when u r doing the dp on your own😁😁
thnks striver bhaaii !!!
Summary: convert the problem to unbounded knapsack
N -> capacity of bag
Rod lengths (which are (ind + 1) of given array) -> weights of elements
Prices -> Values
I can't believe bro, Done the question without the video. Thanks Alot Striver.
amazing...today is diwali and I am watching your videos.
Understood, Loved your approach to dp in general.
Yes.... Now i can solve any problem on DP on sub-sequence
yea now I can any questions on subsequences. Thanks a lot sir...
Understood.
Thank you so much.
I was able to figure out the logic on my own for this problem.
Thank you so much Striver for wonderful lectures on DP.
understood sir !!! and yes I am confident enough to solve any problem on dp on subsequences !!!!! Thanks a lot sir for this entire series ❤❤❤❤
i am able to solve any problem based on subset/subsequence... thanks to you
I can now solve this type question!! Thanks a lot striver
Thanks bhaiya for providing these important series with full effort. You are an inspiration for all of us Tier - 3 college students. I Hope many like me would take benefit of it. Very thankful to you 😊
Now I can solve any problem on subsequences for sure 🔥.
hey striver after watching through the lectures iam able to do this problem on my own ...
Understood..Great job!! May the good Lord bless you for all good that u are doing!!
Understood, and now I'm able to solve or try subsequence dp problem