ByteByteGo logo
menuProblems List

Find All Subsets

Medium

Return all possible subsets of a given set of unique integers. Each subset can be ordered in any way, and the subsets can be returned in any order.

Example:

Input: nums = [4, 5, 6]
Output: [[], [4], [4, 5], [4, 5, 6], [4, 6], [5], [5, 6], [6]]

You can practice coding exercises online by logging into bytebytego.com on your laptop.