Minimum subset sum difference | Minimum difference subsets | Dynamic Programming

Описание к видео Minimum subset sum difference | Minimum difference subsets | Dynamic Programming

This video explains a very important programming interview problem based on dynamic programming in the 01 knapsack category which is to find the minimum subset sum difference.In this problem we need to minimize the difference of sum between 2 subsets which are formed on dividing a set into 2 subsets.The sum 0 will be minimum for all positive numbers when equal sum partition is possible.This problem is very similar to the equal sum partition problem and uses the subset sum problem technique with a little tweak to solve the problem.I have first explained the problem and then showed the intuition by reducing and relating this problem to the already solved subset sum problem.I have shown examples for better understanding and intuition and at the end of the video, I have also shown the code implementation in both Java and C++.

CODE LINK is present below as usual. If you find any difficulty or have any query then do COMMENT below. PLEASE help our channel by SUBSCRIBING and LIKE our video if you found it helpful...CYA :)

========================================================================
Join this channel to get access to perks:
   / @techdose4u  

INSTAGRAM :   / surya.pratap.k  

SUPPORT OUR WORK:   / techdose  

LinkedIn:   / surya-pratap-kahar-47bb01168  

WEBSITE: https://techdose.co.in/

TELEGRAM Channel LINK: https://t.me/codewithTECHDOSE

TELEGRAM Group LINK: https://t.me/joinchat/SRVOIxWR4sRIVv5...
=======================================================================

CODE LINK: https://gist.github.com/SuryaPratapK/...
JAVA Code: https://gist.github.com/SuryaPratapK/...


USEFUL LINKS:
Subset Sum Problem:    • subset sum problem dynamic programmin...  
01 Knapsack Tabulation DP:    • 01 Knapsack Tabulation Dynamic Progra...  
Equal Sum Partition:    • Partition equal subset sum | Equal su...  
Count Subsets with given Sum:    • Count subsets with given sum | Dynami...  


#dp #subsetsum #01knapsack

Комментарии

Информация по комментариям в разработке