Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 51s
is_balanced walks a string; on each char:
'(', '[', '{' -> Stack.push c
')', ']', '}' -> require stack non-empty AND top = expected opener,
else mark ok = false
others -> skip
At end: !ok && Stack.is_empty stack.
Five test cases:
'({[abc]d}e)' -> true
'(a]' -> false (no matching opener)
'{[}]' -> false (mismatched closer)
'(())' -> true
'' -> true
Sum of (if balanced then 1 else 0) -> 3.
Exercises:
Stack.create / push / pop / is_empty
s.[!i] string indexing
while loop + bool ref short-circuit
multi-arm if/else if/else if dispatch
31 baseline programs total.
800 B
800 B