Company: Amazon_16oct
Difficulty: medium
Calculate Optimal Bandwidth Problem Description You are part of Amazon's Network Infrastructure Division and you are working on a project to minimize data transfer efficiency across its network of data centers. You are given n data centers, and the bandwidth capacity of each center is given in an integer array capacity . There are connectionCount data streams that need to be routed through two data centers, one as the primary route and the other as the follower. Each data stream must use a unique pair of data centers for its routing. The bandwidthRate for each data stream is defined as the sum of the capacity of its primary and follower data centers. Given an integer array capacity and an integer connectionCount , find the maximum total bandwidthRate that can be obtained by optimally choosing unique pairs of routes for each data stream. Note: A pair of data centers (x,y) is said to be unique if no other stream is routed to the same pair. However, the pairs (x, y) and (y, x) are treated