IMC Trading Interview Question

Write a function to determine winner of battleships.