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.
How did you get this input?
given;
123641232132364123212332364123212221
it should only return the position of the first element of the plateau expected:<{pos=[3,7,10], peaks=[6,3,2]}> but was:<{pos=[3,7], peaks=[6,3]}>
why pos 10 and peak 2?
My code runs fine on my compiler, when i compiled on this app it says this error on stacktrace in random test
java.util.NoSuchElementException
at java.base/java.util.ArrayList$Itr.next(ArrayList.java:999)
at java.base/java.util.Collections.max(Collections.java:672)
at Kata.high(Kata.java:30)
at SolutionTest.randomTests(SolutionTest.java:33)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566) and more......................................
This comment is hidden because it contains spoiler information about the solution