I came across lots of videos on the internet for this particular problem, but none of them were able to explain in such a decent and nice way like you. Very well explained, thanks a lot :)
@@arunakampati4365 Worst hai woh. Bas outdated C language ka incomplete pseudocode deta hai. Waise toh hum bhi explain kare par ek code karke dikhaiyye ? Wastage of time on his videos
Best explanation I've found on this algorithm. I spent over 2 hours watching other videos without being able to grasp it. Came across this one and it clicked!! Thank you!!
This video explains whether sum exists or not. Can you explain how can we find pairs. Which all set of elements form the sum,. For Example - {1,3,5,7,10,2,6} - Target Sum - 12 Answer should be - (1,5,6) (10,2 )(5,7)(6,2,3,1). How can we find this thing from this matrix?? Could you please explain this??
Thank you ,mam for such an amazing explanation .It solved all my doubts. Apart from other who just showed how to write code u explained how to fill the table in a really fantastic way
hello mam very sweet of that u explain each part of the problem that every student is stuck with ,,but there is only one problem is that your board is not properly visible coz of focus,,,,,
first of all thank you very much for your explanation ,but small suggestion instead of directly hitting the solution kindly try to explain the logic behind that i.e why we are following Dp approach to solve this why Backtracking is not good. IT's like How we can solve this question??? And your answer is DP. But Y?
@Jenny it will be helpful if you can explain how to deduce that we should be creating table in this manner? And, how it is concluded that we need to use this formula? This would help in actual logic building.
Mam as per your formula sum-A[i] , when sum=8 and arr[i]=7 --> sum-A[i]=1 and in above row A[1]=0 then how could you can write 1 there, please explain mam
jenny the video is very help full about what we have to do , but it doesn't speaks any anything about Why we are doing it eg at 8:56 it says we have to do sum- A[i] but its not very clear why we are doing it why not Sum- A[j] or A[i]-A[j] ?
Thanks for explanation. Can you please tell how to arrive at this solution. In dp, each and every problems seem to be solved differently. It would be helpful if you can explain that. Thanks
Very nice explanation.. Loved it... But Ma'am, please explain why we are going to one cell back and then subtracting the value of i and getting the value of that cell (if the value in previous cell is 0) and if it is 1 we directly copy 1....please explain the logic behind this.
you are targeting to get sum listed on top row. when your cell value is [left column] less than sum you are looking for, you are going back and see whether that difference can be achieved, by looking at that cell [the sum value listed in the top]
can u plz explain why u write 1 in column having value 0 ? what i understand is if we write 1 means we can make a subset and by having subset with value 2 or other, sum will not be 0. plz explain it
THE İMPLEMENTATİON İS NOT CORRECT SİNCE A[i][j-A[i]] part is the reason of array index out of exception error but the explanation is correct the easiest way of implementtaion of this problem is recursive
it is [i-1] in the first block because we are considering the previous row.. but when we are subtracting j-A(i) we are subtracting A(i) from the current row.. So j-A(i) is correct
In last row that is for filling for row 10 ,how you put 1 for element 14 bcz,14-10= 4 and the value of 4 is 0 in above row . though we can make 14 with help of these elements but formula fails here for filling for 14
Mam, please avoid uploading in just 360p. It might appear fine now but people would hit dislike on your Good content when era of 5g and 4K arrives. Think long term for your channel.
Explanation is good but this is not a right way to teach DP. First we need to understand the recursive logic and when the recursive logic is developed then only we can made a DP solution. Video like this did not include basics of DP and no can solve questions of DP directly by making a table. If you do not know which problem is overlapping then how you can do so.
I was stuck since 3 days in this tabulation method after watching Striver , But You are life saver of mine Maam. thanks Maam . Boss is always Boss.
I came across lots of videos on the internet for this particular problem, but none of them were able to explain in such a decent and nice way like you. Very well explained, thanks a lot :)
Kidding?
@@arunakampati4365 Worst hai woh. Bas outdated C language ka incomplete pseudocode deta hai. Waise toh hum bhi explain kare par ek code karke dikhaiyye ? Wastage of time on his videos
Dhjrfklkyggfcszcjo
@@pg9645 C language is outdated?
@@sdwysc to be honest he should have shown the implementation as well. i love his way of explaining but a implementation would be cherry on cake.
Best explanation I've found on this algorithm. I spent over 2 hours watching other videos without being able to grasp it. Came across this one and it clicked!! Thank you!!
Best tutor I have ever seen on UA-cam 🤗🤗you're amazing ma'am
The table filling is finally crystal clear now!! Thank you so much ma'am, you are a life saver :)
Thank you ma'am so much 😊 I searched a lot about this problem I didn't find a single solution as your so thank you so for explaining it in detail 🙂🙂
This video explains whether sum exists or not. Can you explain how can we find pairs. Which all set of elements form the sum,. For Example - {1,3,5,7,10,2,6} - Target Sum - 12 Answer should be - (1,5,6) (10,2 )(5,7)(6,2,3,1). How can we find this thing from this matrix?? Could you please explain this??
Refer to her next video ..
which one? Can you please share the link to it?
@@touchskyfacts1391
Link please
@@touchskyfacts1391 please bro send me the link?
@@touchskyfacts1391 link brooo
I love the way that you are teaching mam and it is very useful for me thank you mam❤😊
love u mam , really best teacher ☺☺☺☺☺☺☺☺
Thank you ,mam for such an amazing explanation .It solved all my doubts. Apart from other who just showed how to write code u explained how to fill the table in a really fantastic way
Thank you sister. You explained in a slow and clear way.
hello mam very sweet of that u explain each part of the problem that every student is stuck with ,,but there is only one problem is that your board is not properly visible coz of focus,,,,,
Nice explanation mam. U also make easier for writing code.
Lot of thanks mam😊😊
Ohhhh man 😭 !! Thank you so much, bestest explanation of this question🤞
Mam U r teaching style is very good
first of all thank you very much for your explanation ,but small suggestion instead of directly hitting the solution kindly try to explain the logic behind that i.e why we are following Dp approach to solve this why Backtracking is not good.
IT's like How we can solve this question???
And your answer is DP.
But Y?
Actually I have discussed the need of DP in one of my videos... U can check out the playlist Dynamic Programming..
@Jenny it will be helpful if you can explain how to deduce that we should be creating table in this manner? And, how it is concluded that we need to use this formula? This would help in actual logic building.
Probably she doesn't know and have only by hearted it and started teaching
*Amazing explanation saved my lot of time thanx mam* :)
Thank you ma'am👍 for this concept🙂
Tc mam 🤟🏻🖤 its very useful lect. Mam
.thank you very much .🖤
Beautifully explain by you
Maim please upload the second video of this to find out the particular subset 🙏
Your algorithm videos have helped me alot, I'm grateful to you. If you have time, could you make some videos of backtracking?
Why people don't explain the intuition behind problems? :( Can you explain WHY we take value just from above cell vs taking value from the delta????
Great mam.....
Hello, thanks a lot for the explanation. Just wanted to know why are all elements set to true for sum 0.
Great Explanation
great but I did not understand how the sum can be equal to zero (first column) if I select A[i] at minute 6:30.
Thank you so much mam🙏🙏
Hello Riya , teaching very good
Thanks for great interpretation!
Excellent !
thank you! very useful
please make a video of how to find a subset thank you..
Use backtracking .. go back from the last column last row 1 and note down the row numbers as you proceed back .. you will get the subset
great explanation
Very Good ma'am
Thank you very much
is it necessary that the Array A = 2,3,5,7,10 needs to be sorted for this to work?
No need, it will work with unsorted array as well.
Hey Jenny this approach works if your array has only positive integers..what happens in the case of negative integers being in your list?
good question
Mam as per your formula sum-A[i] , when sum=8 and arr[i]=7 --> sum-A[i]=1 and in above row A[1]=0 then how could you can write 1 there, please explain mam
Thank you. well explained.
does the element of the should be return in sorted manner
No need, it will work with unsorted array as well.
jenny the video is very help full about what we have to do , but it doesn't speaks any anything about Why we are doing it eg at 8:56 it says we have to do sum- A[i] but its not very clear why we are doing it why not Sum- A[j] or A[i]-A[j] ?
Great video👌😍, plz upload a series on Fibonacci heap and binomial heap
I'll greatly appreciate it.
Thanks 🙏
Kitho veer g tusi
Shoutout to all those students watching this video in 1x.. i.e they are that early to have the luxury to do so..
Excellent Explanation. You are requested to use better quality of marker
mam here also we have to sort the elements of the array or not????
Cute mam,,cute explanation..
Love u mam.
very good explination. I have one question: Is it necessary that the set should be in increasing order for creating DP table?
Yes otherwise the maximum sum will yhe sum of all positive number in the array
can you give the link of the video in which you have calculated the subset of thhe sum.
Thanks for explanation. Can you please tell how to arrive at this solution. In dp, each and every problems seem to be solved differently. It would be helpful if you can explain that. Thanks
Many many thanks!!
Very nice explanation.. Loved it... But Ma'am, please explain why we are going to one cell back and then subtracting the value of i and getting the value of that cell (if the value in previous cell is 0) and if it is 1 we directly copy 1....please explain the logic behind this.
you are targeting to get sum listed on top row. when your cell value is [left column] less than sum you are looking for, you are going back and see whether that difference can be achieved, by looking at that cell [the sum value listed in the top]
Why we need to row-1? Why not taking from current row? The value for row is already computed
nice explanation mam
can u plz explain why u write 1 in column having value 0 ?
what i understand is if we write 1 means we can make a subset and by having subset with value 2 or other, sum will not be 0.
plz explain it
it was such a great video mam.Can you make videos on Greedy Algorithms??
kindly mention the error in the table's last row and column where it shall be 0.
If I am wrong, please let me know.
THE İMPLEMENTATİON İS NOT CORRECT SİNCE A[i][j-A[i]] part is the reason of array index out of exception error but the explanation is correct
the easiest way of implementtaion of this problem is recursive
thanks
Mam, what is the time and space complexity of this algo?
24:41 , it will be A [ i - 1 ] [ j - A (i - 1) ] = 1
it is [i-1] in the first block because we are considering the previous row.. but when we are subtracting j-A(i) we are subtracting A(i) from the current row.. So j-A(i) is correct
If the sum is given 50 then .....will these tables still be feasible?
Awesome
If the sum value is high it will be very complex to solve in dp . Is it any other method better than dp in that case?
Thank you mam
ma'am please make a video on square root decomposition
How to find those subsets?
mam how can we include the element when sum is 0
Divide and conquer leads dividing main problem in to subproblems...
Can you solve it with State space tree
Mam please give me an example of back-tracking
check my video about it
Mam please make the part two of the subset sum problem.
what if the asked weight is too large like 100 or something, then we need to prepare a table for that. Not sure if DP should be used here.
is this method using back tracking ?
In last row that is for filling for row 10 ,how you put 1 for element 14 bcz,14-10= 4 and the value of 4 is 0 in above row . though we can make 14 with help of these elements but formula fails here for filling for 14
Will it work if the sum is odd number? I wrote code on my own based on your explanation. It is not working if the sum is odd number.
mam plz explain print all subset
mam,Where is the 2nd part!¿
mam you are explanation was amazing but,it might be better if you have provided code of this
Mam, please avoid uploading in just 360p. It might appear fine now but people would hit dislike on your Good content when era of 5g and 4K arrives. Think long term for your channel.
Could you make more videos on problem solving and Dynamic problem
Mam please make videos on oops concepts in Java
Mam can you do video on subset program
Mam please upload more problems on dynamic Programming
Hello mam.. Is this solve by using backtracking
Yes you can
Ma'am at @20:15 u said there will be another video of subset problem
Can u please give link for the same
Thank u in advance
can you explain me how to solve any problem by using dynamic programming ..
how to print those subsets, please help
another method is using bitsets::)
ll N;
cin>>N;
vector arr(N);
for(auto& it : arr) cin>>it;
bitset b(0);
b[0]=1;
for(auto x : arr)
b |= (b
Explanation is good but this is not a right way to teach DP. First we need to understand the recursive logic and when the recursive logic is developed then only we can made a DP solution. Video like this did not include basics of DP and no can solve questions of DP directly by making a table. If you do not know which problem is overlapping then how you can do so.
mam particular subset second vedios plz
why you choose other elem for the sum=0
how does it work?
Plzz make more videos on DP
Mam what if the we have given sum like 245
What if array is not sorted
Mam plz put queen problem
Mam I guess in the place A[i]=3 and sum(j) =4 should be 1 😅
please upload hd video quality