Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
,/\,/\,/\,/\,/\,/\,o solution in Clear category for Brackets by vmiimu
def checkio(exp):
op,cl = ['{','(','['],['}', ')', ']']
stk = []
for c in exp:
if c in op:
stk.append(c)
elif c in cl:
if not stk or stk.pop() != op[cl.index(c)]:
return False
return True if not stk else False
Nov. 20, 2018
Comments: