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.
For people who may also be confused by the "target floor can be any floor between 1 to this maximum height" => in cases when it is not possible to throw an egg, the answer is not 1, but 0 - existence of the target floor from which the egg will not break is not guaranteed. There may be 0 such floors. The description seems misleading.
My wrong solution passed in the case of ships properly not touching each other or being diagonally conflicting, but having the wrong cell count per type. My wrong solution failed the following test case:
int[,] field = new int[10,10]
{{1, 0, 0, 0, 1, 1, 1, 0, 0, 0},
{1, 0, 1, 0, 0, 0, 0, 0, 1, 0},
{1, 0, 0, 0, 1, 1, 1, 0, 1, 0},
{1, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 1, 0},
{0, 0, 0, 0, 1, 1, 1, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 1, 0},
{0, 0, 0, 1, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 1, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
Assert.IsFalse(BattleshipField.ValidateBattlefield(field));