Company: Razorpay
Difficulty: medium
Servers Time In distributed computing, one of the common subroutines for the servers is to pass what they computed to a special server called master that uses those results they computed to combine them together. Your company has n servers that are numbered from 1 to n. The master server has number n. Each server i can pass direct messages to servers i + 1 and i - sendTime[i], proving that servers with those numbers exist. Passing a direct message means that any server has an unlimited capacity which means that at any time many messages can be passing from one server to another. Now, all servers want to pass their message to the master server. How long would each server take to pass this message to the master server? The goal is to calculate, for each server, the minimum time needed to pass messages to the master. If there is a server which can\'t pass messages to the master, the answer for that server would be -1. Input Format The first line contains a single integer n. The second lin