meta Interview SessionBeta
30:00

Minimum Remove to Make Valid Parentheses

Medium

Given a string s of '(' , ')' and lowercase English characters. Your task is to remove the minimum number of parentheses ( '(' or ')', in any positions ) so that the resulting parentheses string is valid and return any valid string.

JavaScript
Loading...
Test Results
Run code to see results...