String
2116. Check if a Parentheses String Can Be Valid
Strings s (of '('/')') and locked (of '0'/'1'). If locked[i] == '1', s[i] is fixed; if '0', it can be replaced by either bracket. Decide whether s can be made a valid parentheses sequence. Treat free…
Loading…