Basic Calculator

Given a string expression containing non-negative integers, '+', '-', parentheses, and spaces, return the evaluated result. A unary minus may appear before a number or a parenthesized expression, including after spaces. Unary plus is not allowed, and no two operators are consecutive.

Examples
Input: "1 + 1"
Output: 2
Hints

Basic Calculator

Given a string expression containing non-negative integers, '+', '-', parentheses, and spaces, return the evaluated result. A unary minus may appear before a number or a parenthesized expression, including after spaces. Unary plus is not allowed, and no two operators are consecutive.