# Questions tagged [k-sum]

Given a set of numbers, a target sum, and some k, the problem of finding a subset of size k that has the target sum

7 questions
Filter by
Sorted by
Tagged with
179 views

### Return all pairs from a list of integers that contributes to a given sum

Given a list of integers return all the pairs that makes up to a given target sum. input: {2, 7, 11, 15, -2} target sum: ...
5k views

### Finding indices of numbers that sum to a target

I've taken this algorithm question, which is to find the indexes of any two numbers in an array that sum to a given number. It is quite a simple problem to solve. But it is the execution time of my ...
493 views

### Hash table solution to twoSum

I try the most to solve a twoSum problem in leetcode Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input ...
2k views

### Find every possible pair of numbers that sum up to n number

I have this following code which find every possible pair of numbers that sum up to n number ...
100 views

### Find sum of 3 that total a target from a List

A related Java question got me curios. All unique combinations (not permutations) of 3 values that sum to a target from a list of integers. Values can duplicate in the list but are only used once. ...