| Topic | Difficulty | Companies |
|---|---|---|
| Backtracking | MEDIUM | Amazon Microsoft Facebook |
Given a set of distinct integers S, return all possible subsets.
Problem Note
Example 1
Input: S[] = [2,3,4]
Output:
[
[],
[2],
[2,3],
[2,3,4],
[2,4],
[3],
[3,4],
[4]
]
Explanation: All the subsets of the given set S is printed.