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.
You can print the input and analyze it yourself. And IIRC the description is clear about the specifications.
I was also stumped, but re-read instructions and it's probably related to:
Also, beware of plateaus !!! [1, 2, 2, 2, 1] has a peak while [1, 2, 2, 2, 3] does not.
So imagine you are working with an arr like [1, 2, 2, 2, 3, 3], where the second to last number (the first 3) is giving you a false positive.
Edit: and also imagine if you are working with double plateaus such as [1, 2, 2, 3, 3, 1]. In this case, the peak should be the first 3, but it's possible that the first 2 is giving you a false positive resulting in 2 peaks, when there should only be 1 in this case.
Hopefully final edit: I created a test scenario which your code might not pass according to your errors: [1,1,2,2,3,5,5,5,3,3,3,1,2,3]. There should only be 1 peak, but your code might give 2. Just passed this, so hopefully this helps.
Yes. First take every 2nd char. And then the "other chars" are the chars, that are not every 2nd char. :-)
Take every 2nd char from the string. Then the other chars. Do this n times! Whats wrong!?