Company: Scienaptic AI_11oct
Difficulty: medium
Virus Spread in a Ship Problem Description You are given a ship's seating arrangement, represented as an m x n grid (where m represents the number of rows and n represents the number of columns). One of the passengers is infected with a virus and will spread it to nearby passengers. The virus spreads to adjacent seats (left, right, top, and bottom) after every hour, but it does not spread diagonally. Given the initial infected passenger's seat location, your task is to determine the maximum number of hours it will take for the virus to infect all the passengers in the ship. Input: An integer m , the number of rows in the ship's seating arrangement ( 1 <= m <= 10 ). An integer n , the number of columns in the ship's seating arrangement ( 1 <= n <= 100 ). A string startPosition representing the initial infected position in the format "x,y", where x and y are the row and column of the infected passenger. Output: Return an integer representing the maximum number of hours requir