Math, asked by mrkwoledge2709, 11 months ago

Given a set of distinct integers, s, return all possible subsets.

Answers

Answered by mindSC
1

Input:

S = {1, 2, 2}

Output:

{}, {1}, {2}, {1, 2}, {2, 2}, {1, 2, 2}

Explanation:

The total subsets of given set are -

{}, {1}, {2}, {2}, {1, 2}, {1, 2}, {2, 2}, {1, 2, 2}

Here {2} and {1, 2} are repeated twice so they are considered

only once in the output

HOPE YOU'VE FOUND IT INFORMATIVE!!!

please mark as BRAINLIEST !!

thanks!

Similar questions