15 lines
235 B
Text
15 lines
235 B
Text
examples = [
|
|
"",
|
|
"[]",
|
|
"[][]",
|
|
"[[][]]",
|
|
"][",
|
|
"][][",
|
|
"[]][[]",
|
|
"[[[]"]
|
|
|
|
for str in examples
|
|
balanced = isBalanced(str)
|
|
if balanced then outcome = "is OK" else outcome = "NOT OK"
|
|
print """" + str + """ " + outcome
|
|
end for
|