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
added for python
Merged
I don't quite understand your problem, but the rules should be the same for all ships.
Some of the bugs I faced in my solution happened only when a ship was on a bottom or right border of the desk. At the same time, fixed test don't test this (at least in Java). So I think it would be good to add such a test.
Do the rools work with all ships, or for submarines(unicellular) not? Because I wrote a code that checks if there is nothing around the ship(no contact with another ships) despite the fact it is unicellular or not(and if there is a contact, field is invalid), but I fail random tests(they want true, I have false). The only opportunity is that for submarins it works somehow another, can someone enlighten me?
IF you swap the positions of any of the special characters with each other, your solution won't notice -- among other false positive errors.
Of course a regex is not NECESSARY, but it is a very concise and clear way to solve the problem.
This comment is hidden because it contains spoiler information about the solution
They're there. Maybe your browser or ISP is blocking them.
This comment is hidden because it contains spoiler information about the solution
gotcha, thanks man
No, no ship can be placed in diagonal. Read this: https://en.wikipedia.org/wiki/Battleship_(game)#Description
can a 4 length ship be in diagonal ?
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Loading more items...