Basic Calculator II
Amazon’s Largest Layoffs Ever
Problem Overview
Difficulty: Medium
LeetCode Pattern: Stack
Given a string s which represents an expression, evaluate this expression and return its value.
Note: The integer division should truncate toward zero.
Input: s = “3+2*2”
Output: 7
Input: s = “ 3/2 “
Output: 1
Input: s = “ 3+5 / 2 “
Output: 5

