is the input of testcases really a valid board ?


  • 0
    L

    I recevied [".X","X."] as an input, if i understand right the input, it should look like:
    . X
    X .

    Based on these discriptions of subject:

    1. Battleships can only be placed horizontally or vertically.
    2. At least one horizontal or vertical cell separates between two battleships - there are no adjacent battleships.

    I don't think it is a valid board, how about your opinion ?


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.