Compute the maximum Manhattan distance from any ocean cell to its nearest land cell. grid: 2D list of 0 (ocean) and 1 (land) Returns: int, maximum distance or -1 if no ocean or no land.