mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 00:21:47 +00:00
10 lines
298 B
Kotlin
10 lines
298 B
Kotlin
import java.util.*
|
|
|
|
fun box(): String {
|
|
val list = ArrayList(Arrays.asList(3, 2, 4, 8, 1, 5))
|
|
val expected = ArrayList(Arrays.asList(8, 5, 4, 3, 2, 1))
|
|
|
|
val f = { (a: Int, b: Int) -> b - a }
|
|
JavaClass.sortIntList(list, f)
|
|
return if (list == expected) "OK" else list.toString()
|
|
} |