Submit Test

Markdown Preview

Add a Code Snippet

Subset To Target (100 Marks)

Given an array of integers and a target number. Find out the count of all subsets such that the sum of all the numbers in the subset is equal to a target number For Example: Input: [1 2 3 4 5] target: 5 Count: 3 Subsets are [ [ 1,4 ] , [2,3] , [5] ]

Input Format

You will be given a function which will take integer array as argument 1 and a target as second argument.