Microsoft Interview Question

design a function for determining hits in battleship