Subsets

Medium

📝 Description

Return all possible subsets of distinct integers

Input Format

Array of integers

Output Format

List of all subsets

Constraints

1 ≤ nums.length ≤ 10

🔍 Sample Input

[1,2,3]
            

✅ Sample Output

[[],[1],[2],[1,2],[3],[1,3],[2,3],[1,2,3]]
            

Code Editor

Please login to run and submit code.

Shortcuts: Ctrl+Enter to submit, Ctrl+Shift+R to run