Company: Amazon_20sep
Difficulty: medium
Maximize Hardware Performance Problem Description Amazon is upgrading its network infrastructure and needs to purchase new hardware components. There are n components available. expense[i] and performance[i] are the cost and the performance rating of the i -th hardware component. Due to procurement limitations, the company can buy at most two components, and their total expense must not exceed spending_cap . Given the two arrays expense and performance , find the maximum possible total performance rating that can be achieved with at most two hardware components whose total expense is less than or equal to spending_cap . Complete the function findMaximumPerformance , which receives expense , performance and spending_cap and returns that maximum total performance. Input Format Read from standard input. n expense[0] ... expense[n-1] n performance[0] ... performance[n-1] spending_cap The first line contains an integer n , the number of hardware components. Each of the next n lines contains