Maximum Health Sum of K Server Types
Asked at Amazon · Coding Questions · Difficulty: Easy
Each server has a `health` value and a `serverType`. Choose servers of at most `k` distinct types (taking all servers of a chosen type) to maximize the total health. Return that maximum sum.
Loading the problem…