# Questions tagged [subset-sum-problem]

Given a set or multiset of integers, is there a non-empty subset whose sum is zero? The subset sum problem can be extended to find the sum to any given integer. The subset sum problem is a special case of the knapsack problem.

6 questions
Filter by
Sorted by
Tagged with
17 views

### Subset sum using the Horowitz-Sahni algorithm and pruning strategies

The subset sum problem asks if some subset of a set can be summed to a given number (equivalently, if they sum to 0). I recently had to implement it, under an additional restriction of all numbers ...
102 views

### Leetcode Three Sum

From here: Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero. Note: The ...
82 views

### Finding if there is sub array with sum equals to 0

I have asked to write a program to find if there is a sub-array with a sum equal to zero using JavaScript. Is this a good solution? How can I improve it? ...
83 views

One of my favorite classic programming exercises is the Subset Sum problem. I'm (trying) to learn Ada and it's the first thing I wanted to implement, even before a Hello World. The Subset Sum ...