回答編集履歴
2
min
test
CHANGED
@@ -6,6 +6,8 @@
|
|
6
6
|
|
7
7
|
* [2]が無いときは落ちる
|
8
8
|
|
9
|
+
* Intに変換できないときは最小値とする
|
10
|
+
|
9
11
|
|
10
12
|
|
11
13
|
```swift
|
1
1
test
CHANGED
@@ -10,6 +10,6 @@
|
|
10
10
|
|
11
11
|
```swift
|
12
12
|
|
13
|
-
let sortedArray = array
|
13
|
+
let sortedArray = array.sorted {Int($0[2]) ?? Int.min > Int($1[2]) ?? Int.min}
|
14
14
|
|
15
15
|
```
|