Find K-Sum Subsets

Given a set of positive integers, find all the subsets of the given array that sum up to a number K.

Statement

Given a seta set contains distinct objects of n positive integers, find all the possible subsets of integers that sum up to a number K.

The following example elaborates this statement further:

Example

In the below example, we can see three possible subsets that sum to K = 10.

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.