3749. Evaluate Valid Expressions
You are given a string
expressionthat represents a nested mathematical expression in a simplified form.A valid expression is either an integer literal or follows the format
op(a,b), where:
opis one of"add","sub","mul", or"div".aandbare each valid expressions.The operations are defined as follows:
add(a,b) = a + bsub(a,b) = a - bmul(a,b) = a * bdiv(a,b) = a / bReturn an integer representing the result after fully evaluating the expression.