This is a verified interview question from Salesforce. Candidates reporting seeing this problem in recent Online Assessments (OAs) and onsite rounds. Mastering "Maximize Cost Effectiveness - Salesforce OA IGDTUW" covers key patterns like Arrays.
"Two Salesforce organizations are being implemented for new clients, and both require k prioritized features from a shared catalog of n features. The implementation costs of each feature are given for both organizations: orgA[i] orgB[i] The goal is to select exactly k feature indices such that the following value is maximized: min( orgA[i1] + orgA[i2] + ... + orgA[ik], orgB[i1] + orgB[i2] + ... + orgB[ik] ) In other words, choose exactly k features so that the minimum of the total costs for organization A and organization B is as large as possible. Return this maximum value."
Join thousands of developers practicing for Salesforce.