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
This comment is hidden because it contains spoiler information about the solution
Please explain to me how the following board is valid:
You can't, becasue it isn't, ans you can't possibly know that it is without information not given by the problem. "Is the board valid" is not a question you can answer because, as I said in my original comment, just becasue there exists a configuration that can be valid that does not imply that the configuration is valid. Since the problem is to determine if a valid solution exists for a given board the task is not "return true if it has a valid disposition of ships" but rather "return true if it can have a valid disposition of ships" which is a different question entirely.
Not sure why youre so hostile. Please explain to me how you know the board I mentioned in my comment is not the following:
Well then you aren't testing whether the field is valid becasue you can't possibly know whether the board is intended to be valid. The instructions say the function should "return true if it has a valid disposition of ships" which is not possible to tell given the information here.
I assume you mean that this should test whether a board can be valid, but that is not what the instructions say.
For a matrix like:
How are you supposed to determine if the top left corner is a group of 4 and a group of 3, or 3 groups of 2, or 2 groups of 3 and 3 singles, etc etc? Is the idea to choose the proper solution? Because while this can be a real solution, in a different configuration it might not be.
None of the solutions pass all tests for Python 3 due to how number precision changed: https://docs.python.org/3/tutorial/floatingpoint.html
You have to use Python 2.7 to pass this.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution