Company: Agoda_25july
Difficulty: medium
Optimize In-App Upgrades Problem Description In an Android app, there are n in-app upgrades listed. The cost of the i th upgrade is given by upgradeCosts[i] and it enhances the app's functionality by a factor of 2 i . You are given a limited amount of currency represented by an integer, budget . Implement a function that selects a combination of upgrades such that the total enhancement is maximized without exceeding the available budget. The function optimizeInAppUpgrades takes the following inputs: upgradeCosts : an array of integers representing the costs of each in-app upgrade. budget : an integer representing the in-app currency available to spend. The function should return the maximum enhancement that can be obtained, modulo (10 9 + 7). int optimizeInAppUpgrades(std::vector upgradeCosts, int budget) { // Complete the 'optimizeInAppUpgrades' function below. // The function is expected to return an INTEGER. // The function accepts following parameters: // 1. INTEGER_ARRAY upgradeCo