We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 698f216 commit 4da24b1Copy full SHA for 4da24b1
lcof/面试题45. 把数组排成最小的数/README.md
@@ -171,6 +171,18 @@ public class Solution {
171
}
172
```
173
174
+#### Swift
175
+
176
+```swift
177
+class Solution {
178
+ func minNumber(_ nums: [Int]) -> String {
179
+ let sortedNums = nums.map { String($0) }
180
+ .sorted { $0 + $1 < $1 + $0 }
181
+ return sortedNums.joined()
182
+ }
183
+}
184
+```
185
186
<!-- tabs:end -->
187
188
<!-- solution:end -->
lcof/面试题45. 把数组排成最小的数/Solution.swift
@@ -0,0 +1,7 @@
1
2
3
4
5
6
7
0 commit comments