mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-17 00:21:28 +00:00
8 lines
236 B
Kotlin
Vendored
8 lines
236 B
Kotlin
Vendored
// WITH_RUNTIME
|
|
|
|
fun box(): String {
|
|
val list = mutableListOf(3, 2, 4, 8, 1, 5)
|
|
val expected = listOf(8, 5, 4, 3, 2, 1)
|
|
list.sortWith(Comparator { a, b -> b - a })
|
|
return if (list == expected) "OK" else list.toString()
|
|
} |