Company: Amazon_3oct
Difficulty: medium
determineMaxDataFlow 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 needs to be connected to two processing nodes, one as the main connection and the other as the secondary. 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 pair 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 (y, x) and (x, y) are treated as different connections.