Question
Evaluate a boolean expression string built from the literals 'T' and 'F', the binary operators '&' (and) and '|' (or), the unary prefix '!' (not), and parentheses. Precedence from highest to lowest: '!' , then '&', then '|'. '&' and '|' are left-associative; '!' may stack (e.g. '!!T'). There may be spaces between tokens. The expression is always valid. Return a bool. Examples: 'T & F' -> False, '!F | F' -> True, '!(T & F)' -> True.
eval_bool(expr: str) → bool["T & F"]outfalseState your approach and its time/space complexity out loud before you optimize. Handle the edge cases (empty input, duplicates, overflow), and say why you chose this over the brute force. Green tests are the floor, not the grade.
Vibe coding: describe the solution in plain language (or narrate it) and the coach grades your approach. Generating runnable code from your description is coming next.