IMC Trading Interview Question

Battleship challenge