Homework Battleship Problem