Given an expression such as expression = "e + 8 - a + 5" and an evaluation map such as {"e": 1} (given in terms of evalvars = ["e"] and evalints = [1]), return a list of tokens representing the simplified expression, such as ["-1*a","14"].
An expression alternates chunks and symbols, with a space separating each chunk and symbol.
A chunk is either an expression in parentheses, a variable, or a non-negative integer.
A variable is a string of lowercase letters (not including digits). Note that variables can be multiple letters, and note that variables never have a leading coefficient or unary operator like "2x" or "-x".
Expressions are evaluated in the usual order: brackets first, then multiplication, then addition and subtraction.
For example, expression = "1 + 2 * 3" has an answer of ["7"].
Output Format:
"a*b*c", never "b*a*c")1 is still printed0 are not includedAn example of a well-formatted answer is ["-2*a*a*a", "3*a*a*b", "3*b*b", "4*a", "5*c", "-6"].
1 <= expression.length <= 250expression consists of lowercase English letters, digits, '+', '-', '*', '(', ')', ' 'expression does not contain any leading or trailing spacesexpression are separated by a single space0 <= evalvars.length <= 1001 <= evalvars[i].length <= 20evalvars[i] consists of lowercase English lettersevalints.length == evalvars.length-100 <= evalints[i] <= 100expression = "e + 8 - a + 5", evalvars = ["e"], evalints = [1]["-1*a","14"]expression = "e - 8 + temperature - pressure", evalvars = ["e", "temperature"], evalints = [1, 12]["-1*pressure","5"]expression = "(e + 8) * (e - 8)", evalvars = [], evalints = []["1*e*e","-64"]