← 返回 meta 的题目列表Evaluate Basic Expression Without Stack or Extra Space
类型:online_judge
meta
Implement a basic calculator to evaluate a string expression containing no parentheses, involving the operators '+', '-', '*', '/'. You must not use a stack and complete the task in O(1) space complexity. Input: A string mathematical expression; Output: An integer value of the evaluated expression.
Example
Input
3+5 / 2