Maximize Parentheses Efficiency Score
Problem Overview
- Given an initial parentheses string s, add zero or more kit parentheses to form a balanced sequence with max EfficiencyScore.
- Inputs: s, kitParentheses, efficiencyRatings; Output: int max score; the original s adds 0 to score.
- Final sequence must be balanced with matching '(' and ')'; it is guaranteed balance is achievable.
- Context: Amazon’s Parentheses Perfection Kit; string balancing domain.
- 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:
