An AWS client has brought servers and databases from data centers in different parts ofthe world for their application. For simplicity, let's assume all the servers and data centersare located on a 1-dimensional line.
You have been given the task of optimizing the network connection. Each data centermust be connected to a server. The positions of n data centers and n servers are given inthe form of arrays. Any particular data center, center[i], can deliver to any particularserver destination, destination/j, The lag is defined distance between a data center atlocation xand a server destination at location y is |x-y|, i.e., the absolute differencebetween xand y. Determine the minimum lag to establish the entire network.
Example
扫码备注加群即可,期待您的到来~
本题属于以下题库,请选择所需题库进行购买