78. Subsets

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 是關鍵

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容

  • 背景 一年多以前我在知乎上答了有關LeetCode的問題, 分享了一些自己做題目的經驗。 張土汪:刷leetcod...
    土汪閱讀 12,779評論 0 33
  • Given a set of distinct integers, nums, return all possib...
    juexin閱讀 223評論 0 0
  • Description Given a set of distinct integers, nums, retur...
    Nancyberry閱讀 153評論 0 0
  • Given a set of distinct integers, nums, return all possib...
    matrxyz閱讀 191評論 0 0
  • 題目:Given a set of distinct integers, nums, return all pos...
    艾石溪閱讀 203評論 0 0