Design a Battleship Game: Implement Hit, Miss, or Sunk Detection
Design a `findShip` method that takes a coordinate as input and determines whether an attack results in a hit, miss, or sunk ship. The solution should track ship positions and their state to correctly identify when all cells of a ship have been hit (sunk) versus a partial hit or a miss.
Asked at:
GitHub
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Late October, 2026
GitHub
Manager
Design the findShip method that attacks at a particular coordinate and checks if it was a hit, miss or sunk
Hello Interview Premium
Your account is free and you can post anonymously if you choose.