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 did this in Java.
In my opinion, the sample tests for this kata should be rewritten.
Some of the test failure messages are the same even though what is being tested is different, making it difficult to tell which test you have failed. Critically, the tests do not test for arrays where values are repeated but are not plateaus; this isn't mentioned in the description either, so it's not clear that this is a problem until you go to attempt the kata and get failures there. At the very least, the description should be updated to account for this.
I can understand why the tests have been conducted in a single @Test block, but I don't think it results in a well written test. Sure, it makes the code shorter, but shorter isn't always better if the result is confusing to anyone who has to look at the code later. Splitting them into seperate tests means the logs are also split, making debugging problems a whole lot easier, especially with the Codewars UI we are using here.
I have included the tests I wrote below, and you can judge for yourself.