Get Maximum Stability
Problem Overview
- Select a non-empty subset of servers to maximize stability = min(availability in subset) × sum(reliability in subset).
- Input: integer arrays availability and reliability (same length); Output: maximum stability modulo 1e9+7.
- Constraints: 1 < n ≤ 1e5; 1 ≤ values ≤ 1e6.
- Context: AWS deployment scenario with availability and reliability factors; an 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:
