Round 1
Questions: Given a string of "(" and ")" brackets. return the maximum score where score is incremented based on indexes (j-i) each time you find a balanced pair.
Candidate's Approach
- The candidate used a 2-pointer approach to calculate the maximum score by matching brackets that are furthest away.
- The solution accounts for imbalanced brackets, allowing for some brackets to be unused in the score calculation.
- The implementation iterates through the string, moving the left pointer to the next '(' and the right pointer to the next ')', adding to the total score whenever a valid pair is found.
Interviewer's Feedback
No feedback provided.