Question: X419-01: Take-Home Assignment 1 Assume you are given a function bool hit(int x, int y) that returns true if there was a hit to a

 X419-01: Take-Home Assignment 1 Assume you are given a function bool

X419-01: Take-Home Assignment 1 Assume you are given a function bool hit(int x, int y) that returns true if there was a hit to a ship and false if not. You are to write a function that returns the coordinates of a single ship on a grid of given size, the function takes at least one argument int gridSize and must return the coordinates of the 3 unit ship present in the board in the shortest time possible. Estimate the Time and memory complexity of your proposed solution. You are to select the data structure to return what you need as output and the prototype of the function

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!