# You will get a string s which consisting of lowercase letters a-z, left parentheses '(' and right parentheses ')'. # Your task is to remove as few parentheses as you can so that the parentheses in s ...
# Time: O(C(n, c)), try out all possible substrings with the minimum c deletion. # Space: O(c), the depth is at most c, and it costs n at each depth # Remove the minimum number of invalid parentheses ...
Results that may be inaccessible to you are currently showing.
Hide inaccessible results