You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given a input string containing an expression containing integers, operators, and parentheses, write a function that calculates and returns the result.
Operator precedence has to be considered.
Example
s = "12+34/(3-4)+21*4"
calculate(s)
=> 62
About
Given a string containing an expression containing integers, operators, and parentheses, calculate and return the result.