ByteByteGo logo
menuProblems List

Evaluate Expression

Hard

Given a string representing a mathematical expression containing integers, parentheses, addition, and subtraction operators, evaluate and return the result of the expression.

Example:

Input: s = '18-(7+(2-4))'
Output: 13

You can practice coding exercises online by logging into bytebytego.com on your laptop.