Math, asked by karan20201, 1 year ago

Given a set of distinct integers, nums, return all possible subsets (the power set).

Answers

Answered by rishika79
0

Answer:

Step-by-step explanation:

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 it helps you...

Similar questions