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.
This comment is hidden because it contains spoiler information about the solution
Language-specific output example in description is missing for Java.
There's no mention of ships being discontinuous in the description and this isn't part of the actual game so such a note could be added.
Because english is not my native english I had a bit problem understanding the task. For example it says
sunk = all boats that are sunk
which I understand as alist of all boats that are sunked
. Maybenumber of sunked boats
etc. would be better.I also agree that this is quite easy for a 4 kyu.
It should be mentioned that no matter how many times a ship was damaged we only get 0.5 point for each ship. And it's also unclear how to calculate
points
, for those having problems with figuring out points:points = numberOfDamagedShips * 0.5 + numberOfSunkShips - notTouchedShips
.More test cases should be provided
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
By the way, I forgot to mention one thing the last time I reviewed this Kata. When comparing arrays, you may want to use the
Test.assertSimilar
or theTest.assertDeepEquals
method instead of just usingTest.expect
so you can save yourself the trouble of writing an external function to compare two arrays. Hope this helps :)Duplicate:
https://www.codewars.com/kata/convert-an-array-of-strings-to-array-of-numbers
This comment is hidden because it contains spoiler information about the solution