Given a set of distinct integers, S, return all possible subsets.
Note:
- Use list as data structure
- Do NOT use itertools
- Sort your final results to get standard output (Not considered as the time complexity). For example sorted(result).
For example, If S = [1,2], a solution is:
[
[],
[1],
[1,2],
[2]
]