1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-01-11 02:58:13 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
leetcode-problemset/leetcode-cn/problem (English)/幂集(English) [power-set-lcci].html

21 lines
391 B
HTML
Raw Normal View History

2022-03-29 12:43:11 +08:00
<p>Write a method to return all subsets of a set. The elements in a set are&nbsp;pairwise distinct.</p>
<p>Note: The result set should not contain duplicated subsets.</p>
<p><strong>Example:</strong></p>
<pre>
<strong> Input</strong>: nums = [1,2,3]
<strong> Output</strong>:
[
[3],
&nbsp; [1],
&nbsp; [2],
&nbsp; [1,2,3],
&nbsp; [1,3],
&nbsp; [2,3],
&nbsp; [1,2],
&nbsp; []
]
</pre>