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.
I think the solution could be more optimal and avoid scanning numbers up to N.
Agree.
v[i+2] will be out of bounds when i >= v.size() - 2;
for loop condition is i<v.size(); I wonder how this code even passed all the tests!???
Sorry...this is a horrible solution and by no means a "best practice"... Loops, labels, mutable vars... all of this is not meant to be used in idiomatic and clean Kotlin.
Checking 2 in front because the integers are ordered and strictly increasing! Very nice. No bounds checking for index of vector though? Seems unpredictable?