Battleship Board in React

Asked at Waymo · Coding Questions · Difficulty: Medium · Last asked Apr 3, 2026

Build a Battleship board as a React component. The board is a grid of cells; clicking a cell cycles its marker through three states, and the component shows which ships are sunk and which are still afloat.

Loading the problem…