Expression Simplifier
Meta interview questions · Hard · Coding round · 6 tests
Given an algebraic expression containing single-letter variables, +, -,
parentheses, and optional spaces, simplify it by removing all parentheses and distributing signs correctly.
The output should preserve the original variable order, omit all spaces, and contain only variables joined by
+ or -.
Function signature
Run your code with Ctrl+Enter to see results.