IMC Trading interview question

Battleship problem