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.
"-> nope, that list of attacks leads actually to the numbers 2,2,1,1, boats 1 & 2 sunken, the "3" untouched."
I do indeed get the numbers 2,2,1,1 and thus 1 boat is sunken, 1 damaged, and 1 untouched. Just like the second sample test case is expecting. I am solving in ruby.
So this is in contrast to the result that Blind4Basics gave that 2 boats are sunken. I got confused by that comment and somehow overlooked that boat 1 had a length of 3 in the example given.
Anyway nice kata, I did get confused but that is not necessarily bad practice in my opinion.
i get that this is a code kata and probably designed to be counter-intuitive but i'm not sure who in their right mind would ever lay out a grid like that. Luckily ruby has a reverse function :)
I had exactly the same problem. I don´t know why the coordinates are upside down, but worse than that, test case number 1 works by mere chance if you do it the wrong way.
read again the description, you're definitely not applying the coordinates correctly. ;)
Hi,
0, 0, 1, 1
" -> nope, that list of attacks leads actually to the numbers2,2,1,1
, boats 1 & 2 sunken, the "3" untouched.