Problem
Given a set of distinct integers, nums, return all possible subsets (the power set).
Note: The solution set must not contain duplicate subsets.
Example
1 | Input: nums = [1,2,3] |
Solution
Method: Backtracking
Time Complexity:
Space Complexity:
1 | class Solution: |
or
1 | class Solution: |