2116. Check if a Parentheses String Can Be Valid
class Solution:
def canBeValid(self, s: str, locked: str) -> bool:
l = len(s)
if l % 2 != 0: return False
openBrackets = []
unlocked = []
for i, e in enumerate(s):
if locked[i] == '0':
...
tapanrachchh.hashnode.dev1 min read