Log in
← All problems

All subsets

hardRecursion40 XP

nums has different numbers, sorted from small to large. Return all its subsets (including the empty one). Keep the numbers inside each subset in order. Any order of the subsets is accepted.

Examples

Examples use JSON: true/false/null are True/False/None in Python. Any order of the answer's items is accepted.

Run examples checks the examples above. Submit also runs 2 hidden tests.