Company: Amazon_16oct
Difficulty: medium
Determine Max DataFlow Problem Description As an engineer in Amazon's Data Infrastructure Team, you are tasked with optimizing how information flows through its network of processing nodes. You are given n processing nodes, and the bandwidth capability of each node is given in an integer array named bandwidth . There are streamCount data channels that need to be connected to two processing nodes, one as the main connection and the other as the secondary connection. Each data channel must utilize a unique pair of nodes for its connections. The dataFlow for each data channel is defined as the sum of the bandwidth of its main and secondary nodes. Given an integer array bandwidth and an integer streamCount , find the maximum total dataFlow that can be achieved by optimally selecting unique pairs of connections for each data channel. Note: A pair of nodes (x,y) is said to be unique if no other channel has selected the same pair. However, the pairs (x,y) and (y,x) are treated as different co