Company: Zscalar
Difficulty: medium
Server Upgrade Planning Problem Description Given two servers and the time taken to upgrade each server in seconds, denoted by t1 and t2 respectively. In order to avoid server underload, the upgrade process, the server receives requests at certain time intervals and pause upgrades during those periods. The servers receive requests at multiples of req1 and req2 respectively. Determine the minimum total time in (in seconds) required to upgrade both servers. Notes: Only one server undergoes the upgrade process at any given second. There may be seconds during which no server is undergoing an upgrade. Example: req1 = 2 t1 = 3 req2 = 3 t2 = 1 The 1st server takes 3 seconds to upgrade, and it receives requests on seconds that are multiples of 2. Similarly, the 2nd server upgrades in 1 second and receives requests on seconds that are multiples of 3. The 1st server upgrades in the 1st, 3rd, and 5th seconds, while the 2nd server upgrades in the 2nd second. Note that none of the numbers from [1,