Well he already explained it in video itself, let's take example of 3,4,5. For sum[5], We are adding sum[4] and along with it, 5 will also be added with all the good subsequences of 4. Well with sum[4], we already added the sum till value 4 but everytime the 5 will also get attached with good subsequences of 4. How many times??? Dp[4] times (5) will be attatched. What will be sum??? 5*dp[4]. That's why. I hope this clears your doubt😊
hi aryan i am lacking in dp can you suggest some resource frow where i can learn different types of questions of dp, i have idea about dp, but i cant apply dp on unseen question
back to back 🔥.... i'm waiting for live by you 😢
Amazing explanation! Looking forward to your videos on LeetCode contests.
Thanks a ton for the solution video...........🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻
subah se kisi ka solution samjh nhi aya, ab jake aya h iss video me........🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻
Bhai feeling so good to see you back please keep posting weekend contests please
Wow What an explanation🔥
Great to see you back :)
brilliant explanation.
Very good explanation. Kudos bhaiya🔥
i can see the hard work bro !!! so easy to understand
what would be approximate rating if this problem was on codeforces?
Thanks for the solution
comeback 🔥🔥
can anyone explain ...why he is doing ..in sum[num] part dp[num-/+1] * num ....?
Well he already explained it in video itself, let's take example of 3,4,5. For sum[5], We are adding sum[4] and along with it, 5 will also be added with all the good subsequences of 4. Well with sum[4], we already added the sum till value 4 but everytime the 5 will also get attached with good subsequences of 4.
How many times??? Dp[4] times (5) will be attatched. What will be sum??? 5*dp[4].
That's why. I hope this clears your doubt😊
hi aryan i am lacking in dp can you suggest some resource frow where i can learn different types of questions of dp, i have idea about dp, but i cant apply dp on unseen question
DP playlist by striver take u forward. Do those 60 problems and you will never struggle with dp again