Skip to content

Latest commit

 

History

History
15 lines (10 loc) · 281 Bytes

File metadata and controls

15 lines (10 loc) · 281 Bytes

Subset sum problem

Description

Given a set of non-negative integers, and a value sum, determine if there is a subset of the given set with sum equal to given sum.

Example

Input: 
set = (3, 34, 4, 12, 5, 2), sum = 9

Output: 
True # subset (4, 5) are equal to 9