Haiyuan Zhang
Haiyuan Zhang

Reputation: 42842

what's the formal name for this algorithm problem

Given a list of integers, let's say N1 N2 ... Nn, and a given integer X, the problem is put as: is it possible to select all or some of the integers from the list that the sum of the selected integers equal to X.

I think is should be a common problem that already got a formal "term name", which is what I'm looking for.

Upvotes: 0

Views: 117

Answers (2)

Prasoon Saurav
Prasoon Saurav

Reputation: 92894

Subset sum problem. An example of NP Complete problem.

Upvotes: 4

Ani
Ani

Reputation: 113462

It's called the Subset sum problem , although technically that is defined in terms of a set rather than a list.

Upvotes: 5

Related Questions