Subset Sum Problem Dynamic programming

preview_player
Показать описание
Subset Sum Problem is a dynamic programming problem. It can also be done using Backtracking. This is a np complete problem. Find if there exists a subset with the given sum in the given array. Whether any subset of the given set has the given desired addition or not.
Рекомендации по теме
Комментарии
Автор

You are the only 1 on YouTube who actually explains and walks through how to do the 2D DP Tabulation for this problem. Thank you!

vicliur
Автор

Bruda, you should be a professor at a top university.
You explain things so well. You are like the Richard Feynman of Computer science.

jamietherooster
Автор

For the dynamic programming algorithms, please mention the pseudocode as well.

George-xtbo
Автор

thank you, it's easy for me and my students to understand dynammic programming watching your channel.

video-lps
Автор

The way he inserted F on the screen is amazing! ))))

farkhatomurgaziev
Автор

Very good explanation in general, but the DP formula is a bit confusing. It could be better written in this way: result(set, sum) = result(set-new_value, sum) OR result(set-new_value, sum-new_value), or verbally: we can get the sum using the set if, using the set excluding new_value, we can get sum, or get sum-new_value

Blingblingblingling
Автор

Wish all explanations to this problem be like yours. Thanks.

KovalovAnton
Автор

Thanks for uploading it.. You make us understand in the most beautiful way.. Please make us understand the implementing program of the concepts also

tapanjeetroy
Автор

Thanks for the lucid explanation. But, what if the sum expected is 9000, do we need to make a table of 9000 columns?

deepakkumarshukla
Автор

Explanation is good, It will be very helpful if you write the psuedo code as well

aasdffew
Автор

superb very clear and precise...this is the best explanation of subset prob i hv watched so far...

vatsalasrivastava
Автор

May god gives you good health, wealth .Thanks a lot sir

ManpreetSingh-bkyc
Автор

Aapke videos bahut achche hain, krupaya, pseudo code bhi samjhaya karen

lingobol
Автор

shandar explanations sir! keep uploading the vidoes of DP and DSA problems...You are doing wonderful job!!!

sunnyjain
Автор

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

priyankataneja
Автор

Can you please explain Longest Increasing Subsequence problem.

semdhonadho
Автор

Hey, good explanation. please also tell how to print the subset or how to print longest common subsequence once you get done with the solution.
Please make more video on Dynamic programming top interview and Gate questions, also make a video on Travelling Salesman Problem.

Rohitkumar-tujk
Автор

{2, 3, 7, 8, 10} is the input set and for sum = 9, the last cell would end up False {if we fill the last row elements, by using the criteria that if column number is less than row number, just copying the above row elements}, so this arises the question what if the row number is greater than column number. I appreciate your response.

eswarsriman
Автор

The space complexity is too high though. The number of columns is decided by the sum that has to be formed. What if we want to form a large sum!

tonmoyrakshit
Автор

Wonderful explanation sir, simply awesome

udayptp