Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
resultArray.plus
).count()
at each loop iteration, so it'sO(n²)
the array size in the Kotlin's random tests can go up to
100000
, that's why they time out. it does not seem to be a kata issue, closingThis comment is hidden because it contains spoiler information about the solution
I'm having the same issue. I've tried several optimizations to reduce the number of values I check.
Kotlin.
Test passed (25 ms) but when try to sumbit: Execution Timed Out (16000 ms)
True, you can easily check it with measureTimeMillis.
Beautiful, but not effective