arrow_back Back to Challenges

#78 Subsets

Medium Acceptance 0%
description

Problem Description

Given an integer array `nums` of unique elements, return all possible subsets (the power set). The solution set must not contain duplicate subsets. Return the solution in any order.

checklist Constraints

1 <= nums.length <= 10
-10 <= nums[i] <= 10
All the numbers of nums are unique.

science Examples

Case #1

In: nums = [1,2,3]
Out: [[],[1],[2],[1,2],[3],[1,3],[2,3],[1,2,3]]

Case #2

In: nums = [0]
Out: [[],[0]]

Mastery Tags

Arrays Backtracking Bit Manipulation

Hiring Companies

Amazon Bloomberg Meta
code

Integrated IDE

code_blocks
Coding
psychology
Aptitude