@FawkesLament Rules specify that the ships are rectangle. But for non rectangular boards you can do dfs whenever an 'X' is encountered and you'll get the answer.
Hope this helps.
Battleships in a board
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.