Stripe SDE Interview Question 2021 December | Stacks & State Tracking | On-campus

Question · Posted Jun 2026

Question 1: Basic Calculator Problem Statement Given a string s representing a valid mathematical expression, implement a basic calculator to systematically evaluate it, and return the mathematical integer result of the evaluation. The expression string contains digits, '+', '-', '(', ')', and spaces. You are not allowed to use any built-in library function that evaluates strings as mathematical expressions (e.g., eval()). Constraints 1 <= s.length <= 3 * 105 s consists of digits, '+', '-', '(', ')', and ' '. ...

The full answer & interview discussion are available to premium members.

Log in Create a free account