Write all the subsets of “RAW”
Answers
Answered by
4
Answer:
Print all subsets of an array with a sum equal to zero
October 30, 2019 by Sumit Jain
Objective: Given an array of integers write an algorithm to find all the subsets for which sum is equal to zero. The array contains both positive and negative integers.
Example:
Given Array: [8, 3, 5, 1, -4, -8], required sum: 0
Output:
[-8, -4, 1, 3, 8]
[-8, 3, 5]
[-8, 8]
[-4, 1, 3]
Given Array: [3, 1, -4, 2, 0], required sum: 0
Output:
[-4, 0, 1, 3]
[-4, 1, 3]
[0]
Answered by
0
Answer:
Where you was dear
Similar questions
Math,
16 days ago
Computer Science,
16 days ago
Math,
1 month ago
Math,
9 months ago
Math,
9 months ago