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.
Make sure you're not mutating the input array and also, there are more than 3 peaks there, so your answer is wrong.
Random Test in C#
Testing for 7, 2, 12, 11, 16, 3, 14, 10, -2, 2, 14, 14, -4, -2, 13, 1, -2:
Values differ at index [3]
Expected: 10
But was: 14
Here's my printed lists:
pos: 2, 4, 6
peaks: 12, 16, 14
How is 10 a peak, but 14 isn't?
This comment is hidden because it contains spoiler information about the solution