Maximum Stability
Problem Overview
- Choose a non-empty subset of servers to maximize stability = min(availability in subset) multiplied by sum(reliability in subset).
- Input: two equal-length integer arrays availability and reliability; Output: maximum stability modulo 1e9+7.
- Constraints: 1 ≤ n ≤ 1e5, values up to 1e6; arrays share length.
- Real-world context: selecting AWS servers by availability and reliability.
- Amazon interviews coding interview problem and interview question.
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Input Variables
Execution Result:
