Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Apr 27, 2025. It is now read-only.

Commit5cd69a6

Browse files
authored
Update 78-Subsets.md
1 parenta76cc14 commit5cd69a6

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

‎78-Subsets.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,20 @@ class Solution {
4848
}
4949
}
5050
```
51+
52+
53+
```swift
54+
classSolution {
55+
funcsubsets(_nums: [Int])-> [[Int]] {
56+
var result= [[Int]].init([[]])
57+
for nin nums {
58+
for iin0..<result.count {
59+
var temp= result[i]
60+
temp.append(n)
61+
result.append(temp)
62+
}
63+
}
64+
return result
65+
}
66+
}
67+
```

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp