Problem 419 · Medium

Battleships in a Board

Count number of battleships (no adjacent touching).

Open the interactive visualisation