From cbef5fb71451a8b9b34071d1ce502213bd95b98d Mon Sep 17 00:00:00 2001 From: Deven <63876261+devenperez@users.noreply.github.com> Date: Thu, 4 Dec 2025 17:28:52 -0500 Subject: [PATCH] Create README - LeetHub --- 0227-basic-calculator-ii/README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 0227-basic-calculator-ii/README.md diff --git a/0227-basic-calculator-ii/README.md b/0227-basic-calculator-ii/README.md new file mode 100644 index 0000000..0afff45 --- /dev/null +++ b/0227-basic-calculator-ii/README.md @@ -0,0 +1,29 @@ +
Given a string s which represents an expression, evaluate this expression and return its value.
The integer division should truncate toward zero.
+ +You may assume that the given expression is always valid. All intermediate results will be in the range of [-231, 231 - 1].
Note: You are not allowed to use any built-in function which evaluates strings as mathematical expressions, such as eval().
+
Example 1:
+Input: s = "3+2*2" +Output: 7 +
Example 2:
+Input: s = " 3/2 " +Output: 1 +
Example 3:
+Input: s = " 3+5 / 2 " +Output: 5 ++
+
Constraints:
+ +1 <= s.length <= 3 * 105s consists of integers and operators ('+', '-', '*', '/') separated by some number of spaces.s represents a valid expression.[0, 231 - 1].