Cornerstone OnDemand interview question

Validate an expression with matching brackets.