Company: Databrick
Difficulty: medium
Server Uptime Billing Problem Description You rent n servers, and each one costs $1 for every minute it is running . For the i th server (0-based) you know: startUpTimes[i] -- the time it was started, in 24-hour HH:MM format; shutDownTimes[i] -- the time it was shut down, in the same format, or the literal word None if it has not been shut down yet. You also know currentTime , the moment the bill is drawn up. Everything happens on a single day, so no time wraps past midnight. A server is billed from the minute it started until whichever comes first: the minute it was shut down, or currentTime . A server whose shutdown time is None is still running, so it is billed all the way to currentTime . Print the total number of dollars owed for all n servers together. Input Format Line 1: an integer n -- the number of servers. Line 2: n space-separated startup times, startUpTimes[0] ... startUpTimes[n-1] . Line 3: n space-separated shutdown times, shutDownTimes[0] ... shutDownTimes[n-1] ; each i