Algorithm · Salesforce · Medium
Requirements You are given an integer array costs, with costs[i] representing the expense of campaign i, together with an integer weeks. Divide the array into exactly weeks consecutive, nonempty groups. Each campaign must belong to one and only one group, and no week may be left without a campaign. A group's weekly expense is the largest campaign cost contained in that group. Compute the smallest possible total of these weekly expenses. Confirm these boundary conditions…
Checking your access…