Math, asked by hemapalanivelu1940, 1 month ago

Write all the subsets of “RAW”​

Answers

Answered by dishamanish03
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 mohdfaizan5248
0

Answer:

Where you was dear

Similar questions