Given a set of distinct integers, nums, return all possible subsets.
Note: The solution set must not contain duplicate subsets.
For example,
If nums=[1,2,3], a solution is:
[[3], [1], [2], [1,2,3], [1,3], [2,3], [1,2], [] ]
start 的index 是关键
![](https://img.haomeiwen.com/i3805437/3837ebad4199bee6.png)
Given a set of distinct integers, nums, return all possible subsets.
Note: The solution set must not contain duplicate subsets.
For example,
If nums=[1,2,3], a solution is:
[[3], [1], [2], [1,2,3], [1,3], [2,3], [1,2], [] ]
start 的index 是关键
本文标题:78. Subsets
本文链接:https://www.haomeiwen.com/subject/cgulvttx.html
网友评论