Top "Subset-sum" questions

In computer science, the subset sum problem is one of the important problems in complexity theory and cryptography.

Finding all possible combinations of numbers to reach a given sum

How would you go about testing all possible combinations of additions from a given set N of numbers so they …

algorithm search language-agnostic combinations subset-sum
Subset Sum algorithm

I am working on this problem: The Subset Sum problem takes as input a set X = {x1, x2 ,…, xn} of …

algorithm dynamic-programming subset-sum
Find all combinations of a list of numbers with a given sum

I have a list of numbers, e.g. numbers = [1, 2, 3, 7, 7, 9, 10] As you can see, numbers may appear more than once in …

python algorithm python-3.x combinations subset-sum
Divide array into k contiguos partitions such that sum of maximum partition is minimum

Here maximum sum subset is one of k subsets that give maximum sum e.g: arr = [10,5,3,7] and k = 2 possible ways …

c++ arrays algorithm dynamic-programming subset-sum
Number of subarrays divisible by k

I had the following question in an interview and, in spite of the fact that I gave a working implementation, …

arrays algorithm subset-sum
Python Subset Sum

I am trying to write a function that will not only determine whether the sum of a subset of a …

python subset-sum
How to implement the Sum of Subsets problem in Java

Does anyone know how to implement the Sum-of-Subsets problem in Java from this pseudo code? w = an array of positive …

java knapsack-problem subset-sum
Fast solution to Subset sum

Consider this way of solving the Subset sum problem: def subset_summing_to_zero (activities): subsets = {0: []} for (activity, cost) in …

algorithm subset-sum
Smallest number that can not be formed from sum of numbers from array

This problem was asked to me in Amazon interview - Given a array of positive integers, you have to find …

arrays algorithm data-structures dynamic-programming subset-sum
find a solution to subset sum using dynamic programming

What I want to do I want to find a subset of an array that sums to a target T. …

java algorithm dynamic-programming subset-sum