Remove the Fewest Characters to Balance Parentheses
Given a string s containing only alphanumeric characters and parentheses, remove the fewest possible characters so that the remaining parentheses are balanced.
- You may only delete characters;...
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Standard Input
Execution Result:
