Study
Stack Questions at Big Tech: Why Calculators Lead in 2026
TrueInterview
October 19, 2026 · 15 min read

As of 2026-10-19, TrueInterview's bank holds 59 candidate-reported stack coding questions from 23 big-tech companies. The family to prepare first is the calculator, not parentheses matching or the monotonic stack: Basic Calculator I / II is linked from 11 candidate write-ups, and Basic Calculator is filed under 8 companies. If you interview at senior level, the next family is call-trace reconstruction, which standard stack lists skip: Stack Trace Reconstruction is linked from 11 write-ups, all at Anthropic, most of them from senior-or-above candidates. Treat Valid Parentheses as a warm-up and the monotonic stack as a narrow tool.
Disclosure: TrueInterview is an interview-preparation product and publishes this article. Facts about other products come from their public pages on the dates listed under Sources.
Which stack questions do candidates report most?
The most-linked stack questions fall into five families that we grouped by question title: calculators, call traces, parentheses, monotonic problems and nested decoding. Calculators and call traces lead the table below. The families are our editorial grouping, not tags the bank stores, and every question here carries the stack tag because the set was selected by it.

| Family (our grouping) | Question | Write-up links | Companies | Example report | Practise |
|---|---|---|---|---|---|
| Calculator | Basic Calculator I / II | 11 | Filed under Meta, ByteDance, Instacart, Uber | Meta phone screen, 2026-09 | Basic Calculator I / II |
| Call trace | Stack Trace Reconstruction | 11 | Anthropic only | Anthropic phone screen, 2026-07 | Stack Trace Reconstruction |
| Parentheses | Valid Parentheses | 9 | Filed under 8 companies | Apple phone screen, 2026-09 | Valid Parentheses |
| Calculator | Basic Calculator | 9 | Filed under 8 companies | Netflix phone screen, 2026-09 | Basic Calculator |
| Monotonic | Trapping Rain Water | 7, from Amazon and Meta write-ups | Filed under 4 companies | Trapping Rain Water | |
| Calculator | Evaluate String Expression | 6 | Filed under 2 big-tech companies | Google onsite, 2026-06 | Evaluate String Expression |
| Monotonic (deque form) | Sliding Window Maximum | 5, from ByteDance, Uber and Amazon write-ups | Uber onsite, 2026-08 | Sliding Window Maximum | |
| Nested decoding | Decode String (k[encoded]) | Oracle | Oracle phone screen, 2026-02 | Decode String |
The table is ordered by write-up links, which measure what candidates wrote up. The priority order we recommend differs: calculators first, Valid Parentheses as a warm-up, and call traces for senior candidates or Anthropic loops. These are candidate-reported questions reconstructed for practice, not any company's official question list. One write-up can link more than one question, so the link counts do not add up to distinct candidates.
Three of the top six rows are expression evaluators, and that is the main finding for your schedule. The list is also current: 49 of the 59 questions were last reported within the 12 months before 2026-10-19. You are preparing for loops that are running now, so a short, family-ordered plan beats a long generic list.
Why should calculators be your first stack family?
Because calculators hold three of the top six rows in the ranked table, and their reports span phone screens and onsites at Meta, Netflix and Google. None of the ranked titles is a postfix (Reverse Polish Notation) question, so treat postfix as background. CodeBricks notes that Evaluate Reverse Polish Notation uses the same stack-based evaluation, but on postfix notation instead of infix with parentheses.
CodeBricks describes Basic Calculator as LeetCode 224, rated Hard, with only addition, subtraction and parentheses for grouping. In CodeBricks' words, "The difficulty comes entirely from handling nested parentheses correctly, and that is where a stack shines." The walkthrough pushes the current result and sign onto the stack at an opening parenthesis and resets both. At a closing parenthesis, the CodeBricks walkthrough pops the saved sign and result and combines them with the value computed inside. CodeBricks puts the stack depth at the maximum nesting depth of parentheses, O(n) in the worst case.
Our take: climb the LeetCode calculator ladder in order, one rule per rung, then check each bank question's statement for its exact scope. Start with LeetCode's Basic Calculator for parentheses, then add precedence with Basic Calculator II, which Tech Interview Handbook also lists as a stack practice question. Finish with a version that combines both: AlgoMonster's statement of Basic Calculator III asks for a calculator over string expressions, with operations inside parentheses evaluated first. When an attempt fails, the rung tells you which rule you have not yet absorbed.
Evaluate String Expression is the calculator to add if you are senior, since its links lean heavily toward senior-or-above candidates. If an interviewer keeps extending the grammar, the general tool is the shunting yard algorithm. Wikipedia describes it as a method for parsing infix expressions, using a stack that holds operators not yet added to the output queue, in time linear in the input. Wikipedia adds that it can reject expressions with mismatched parentheses. You rarely need to name it, but knowing it lets you explain how your solution would grow.
Is Valid Parentheses still worth practising?
Yes, as a timed warm-up rather than a target. Valid Parentheses is filed under Apple, Amazon, ByteDance, LinkedIn, Meta, NVIDIA, Oracle and Snowflake, but its write-up links lean junior: 3 come from senior-or-above candidates and 6 from junior, new-grad or intern candidates. If you are an experienced hire, solve it once in a few minutes and move the saved time to calculators.
CodeBricks calls it the simpler version of parenthesis handling, matching openers and closers with a stack and no arithmetic. GeeksforGeeks' version pushes every opening bracket and calls the expression balanced if the stack is empty at the end. The corner case to state before you code is a closer that arrives when nothing is open. Tech Interview Handbook lists popping from an empty stack as a corner case, and GeeksforGeeks defines stack underflow as removing or accessing an element from an empty stack.
Our take: the useful signal here is the level split. A question with this level split is, in our view, a screen you are expected to clear quickly, so a slow, hesitant solution costs more than a missing follow-up would.
What is a call-trace reconstruction question, and who asks it?
Judging by the titles, it is a stack problem presented as event or log processing, and in the bank it is concentrated at one company. Stack Trace Reconstruction draws all of its write-up links from Anthropic, where a candidate reported it in a phone screen in 2026-07. Generate Function Profiling Events is the second member of the family, and both questions skew strongly toward senior-or-above write-ups.
The stack fits because the input is nested. Tech Interview Handbook says "Stacks are an important way of supporting nested or recursive function calls", and CodeBricks advises: "Whenever a problem involves nested structures, this push/pop pattern should come to mind."
Our take: practise this family as data modelling, because the stack is the easy part. Judging by the titles, expect nested call structure to rebuild, and confirm the input format from the statement. Before you code, decide what an exit without a matching entry means, what happens to calls still open at the end of the input, and whether two events can share a timestamp. If you are not interviewing at Anthropic, treat this family as a senior stretch problem rather than a core one.
When does a monotonic stack apply?
Only when the problem asks, for each element, for the nearest bigger or smaller element on one side, which is the narrow shape PracHub says it solves. The bank's representatives are Trapping Rain Water, filed under Apple, Amazon, ByteDance and Meta, plus Sliding Window Maximum, which applies the same idea with a monotonic deque over a moving window. PracHub's stack rule is short: "Reach for the stack only when the statement says nearest and says bigger or smaller".
GeeksforGeeks defines a monotonic stack as one that keeps its elements in a fixed increasing or decreasing order. GeeksforGeeks adds that when a push would break the order, elements are popped until the order is restored. Because each element is pushed and popped at most once, GeeksforGeeks notes, the operations run in linear time overall. PracHub's guide recommends storing indices rather than values and saying the amortized argument out loud to justify the O(n) claim. For daily-temperatures problems, PracHub says the nested loop is O(n²) and the interviewer is waiting for the better answer.
The misconception to drop is that every "nearest" or "largest" array problem needs this tool. PracHub cites real Meta, Google and Akuna Capital questions that look like monotonic-stack problems but are better solved with binary search on the answer, a suffix maximum or a state-machine DP. Tech Interview Handbook lists Largest Rectangle in Histogram among its stack practice questions. For that problem, PracHub notes that every pop hands you both boundaries, with the left one coming from the new stack top.
Our take: learn Trapping Rain Water with a stack, then with two pointers that need only constant extra space, since in our view the stack-free version is the natural follow-up. Solve Sliding Window Maximum with a deque kept in decreasing order, which is the queue form of the same idea. In our view, two problems done well are enough for this family; forcing the pattern onto sweep-shaped problems costs more than it saves.
Which other questions sit under the stack tag?
Two groups: nested decoding, which reuses the calculator's push-and-pop mechanics, and questions that carry the stack tag but ask something broader. Decode String (k[encoded]) is the dated nested-decoding example, from an Oracle phone screen in 2026-02. With a single dated example, treat nested decoding as a family to recognise, not one to rank.
Describe each of these by what it asks, not by its tag:
- Load Factor Calculation at Robinhood is linked from 5 write-ups, with a phone-screen report in 2026-03. Its links split 3 senior-or-above to 2 junior-or-below.
- Dropped Requests (Rate Limiter) was reported in a Snowflake phone screen in 2026-08. Treat it as a rate-limiting problem first and a stack problem second.
- Binary Tree Zigzag Level Order Traversal (LC 103) was reported in a Microsoft onsite in 2026-09. It is a level-order tree traversal that reverses direction on alternate levels.
- Maximal Square and Rectangle in Binary Matrix is filed under Databricks, Salesforce and Uber, with 1 write-up link. The square half is a grid DP; the rectangle half reduces each row to a histogram, which is where the monotonic stack returns.
Our take: these questions are why a tag filter alone is a weak study plan. When you pull your target company's stack questions, label each one by what it asks first, then decide whether the stack is the core or a helper.
Which companies and rounds report stack questions?
Meta, ByteDance and Amazon have the most stack questions filed, and phone screens carry most of the reports. The filed counts are Meta 14, ByteDance 12, Amazon 10, Uber 7, Google 7 and Oracle 6. These are reporting counts: they tell you what candidates wrote up, not how often a company asks stack questions.
The co-tags differ by company. Meta's set tilts toward strings, with 7 of its 14 also tagged strings. ByteDance's 12 include 4 strings-tagged and 3 arrays-tagged questions. Google has 2 backtracking-tagged stack questions among its 7, and Oracle has 3 strings-tagged and 2 backtracking-tagged among its 6. If your target is Meta, practise the stack inside string-parsing problems; for Google and Oracle, add one recursive problem to your list.
| Round | Reported stack questions | What the reports lean toward | What to prepare |
|---|---|---|---|
| Phone screen | 42 | Strings co-tag on 14 of the 42 | Calculator ladder, Valid Parentheses as warm-up |
| Onsite | 24 | Strings 8, backtracking 4, graphs 3 | Add the onsite reports Evaluate String Expression (Google) and Sliding Window Maximum (Uber), plus one backtracking-flavoured problem |
| Online assessment | 3 | Too few reports to lean anywhere | A refresher only |
A question can be reported in more than one round, so the round counts overlap.
A worked example: a Meta phone screen next week
Take a senior engineer with a Meta phone screen in a week. Meta's stack set tilts toward strings, and Basic Calculator I / II was reported in a Meta phone screen in 2026-09. Spend the first evening on Basic Calculator, which is filed under Meta, and the second on Basic Calculator I / II, after reading its statement to see which operators and parentheses it covers. Spend the third on Trapping Rain Water, then give Valid Parentheses one timed pass the night before as a warm-up.
What changes at senior and staff level?
The overall level split is close, and the questions that lean most toward senior write-ups are the call-trace questions and Evaluate String Expression. Write-ups link these questions 61 times from candidates who reported a senior, staff-plus or manager level and 52 times from candidates who reported a junior, new-grad or intern level. Levels are what candidates stated on their own write-ups.
| Question | Senior-or-above links | Junior-or-below links |
|---|---|---|
| Stack Trace Reconstruction | 9, one staff-plus or manager | 2 |
| Evaluate String Expression | 5 | 1 |
| Generate Function Profiling Events | 4 | 1 |
| Basic Calculator I / II | 5, one staff-plus or manager | 6 |
| Trapping Rain Water | 3, one staff-plus or manager | 4 |
| Valid Parentheses | 3 | 6 |
Basic Calculator draws only 2 of its 9 links from senior-or-above candidates. Questions linked from staff-plus or manager write-ups include Trapping Rain Water, Stack Trace Reconstruction and Basic Calculator I / II. The rows that lean senior are Stack Trace Reconstruction, Generate Function Profiling Events and Evaluate String Expression, so that is where your extra senior preparation goes.
Our take: on the senior-leaning questions, the stack is one step in modelling the input, such as an event log or a fuller expression grammar. State the edge-case behaviour, justify the complexity, and name strict versus non-strict comparisons before you write them. PracHub says naming that choice before you write the comparison "is cheap and reads as senior".
Down-leveling note (our view): if you are worried about being leveled down, use the senior-leaning questions above to show senior habits: define behaviour for malformed events, extend a grammar without a rewrite, and explain complexity before you are asked.
Which details trip candidates on stack questions?
The details that fail calculator questions are mechanical, so drill them as a checklist. CodeBricks names the order of pushes and pops, when to flush the current number and how to handle the sign as the details that matter. Each has a concrete form you can check before you run the code, and the monotonic stack has its own pair of traps.
- The trailing number. CodeBricks warns: "After the loop, there may be a trailing number that was never finalized."
- Pop order. At a closing parenthesis, CodeBricks pops the sign first, because it was pushed last, and then the saved result.
- Multi-digit numbers. CodeBricks accumulates digits until a non-digit character.
- Operand order in postfix. One candidate's study guide on Medium notes that the order of the two popped operands matters and lists division truncating toward zero as a constraint of Evaluate Reverse Polish Notation.
- Comparisons in a monotonic stack. PracHub says strict versus non-strict comparisons are where the bugs live, and that people memorize "next greater means decreasing stack" and then flip it under pressure.
Our take: write the calculator checks at the top of your scratch file before every attempt. Generic advice says to understand the stack; the failures in these walkthroughs are bookkeeping, and bookkeeping improves with a checklist rather than more theory.
How we counted
Counts come from TrueInterview's question bank as of 2026-10-19 and cover the stack-tagged coding questions described above. A question can be filed under several companies and reported in several rounds, so tallies overlap; write-up links count candidate write-ups that point to a question, split by the level each candidate reported. The families are our grouping by question title, and the questions are candidate-reported and reconstructed for practice, not an official list.
FAQ
What are the most common stack interview questions at big tech?
By write-up links, Basic Calculator I / II leads with 11, and Valid Parentheses and Basic Calculator follow with 9 each. Stack Trace Reconstruction matches the leader, but only from Anthropic write-ups, as the ranked table shows. Treat all of them as candidate-reported practice material rather than any company's list. For your own target, filter the practice bank by company and label each stack question by family before you decide what to drill.
Which LeetCode stack problems match what candidates report?
Tech Interview Handbook lists Trapping Rain Water and Asteroid Collision among its stack practice questions. Of the two, Trapping Rain Water has candidate reports in the ranked table, while Asteroid Collision is not among the questions ranked here. GeeksforGeeks offers a list of 50 stack coding problems from easy to hard. A list that long spreads your time across problems the reports do not single out, so start from the ranked table and add classics only to fill a family gap.
Do new grads and senior engineers get different stack questions?
Partly. Junior, new-grad and intern write-ups lean toward Valid Parentheses, while senior-or-above write-ups lean toward call traces and Evaluate String Expression. Both groups report Basic Calculator I / II. If you are a new grad, Valid Parentheses and Basic Calculator are the sensible first two problems. If you are senior, add a call-trace problem and Evaluate String Expression, and practise explaining edge-case behaviour before you code.
Is Evaluate Reverse Polish Notation still worth practising?
Only as a stepping stone to the infix calculators. GeeksforGeeks describes a postfix expression as one where the operator appears after its operands, evaluated by popping operands, applying the operator and pushing the result. The same candidate's Medium guide, one person's study notes, explains that an operator always applies to the two most recent operands. The calculators in the ranked table use the same mechanics with parentheses and precedence added, so a single session on postfix is enough before you move up.
Do I need Min Stack or a queue built from stacks?
Learn them as data-structure warm-ups, not as reported targets. Tech Interview Handbook lists Implement Queue using Stacks among its essential stack questions. For Min Stack, that one candidate's Medium guide says to store the history of minimums, not just the current minimum, so that the min-stack top knows the minimum up to that depth. Neither appears in the ranked table, so give each one pass and return to the calculator ladder.
Your practice plan
A three-week plan for someone working full time, at about an hour a day:
- First week. Solve Basic Calculator under a timer, then Basic Calculator I / II. Before each attempt, check the trailing-number flush, the sign-then-result pop order and multi-digit accumulation.
- First week. Give Valid Parentheses one timed pass as a warm-up, and state the empty-stack case before you code.
- Second week. Solve Evaluate String Expression and Simplify Expression, and explain how your solution would grow to all operators with parentheses.
- Second week. Solve Trapping Rain Water with a stack and then with two pointers, and Sliding Window Maximum with a decreasing deque. Say the amortized argument out loud each time.
- Third week, if you are senior or interviewing at Anthropic. Solve Stack Trace Reconstruction, and write down how you handle unmatched events and calls still open at the end before you code.
- Third week. Solve Decode String and one broader question from your target company, such as Dropped Requests (Rate Limiter) or Binary Tree Zigzag Level Order Traversal. Describe what each one asks before you reach for a stack.
Sources
- TrueInterview question bank — stack coding at big-tech companies — counted 2026-10-19
- Basic Calculator: Stack-Based Expression Evaluation - CodeBricks — checked 2026-10-19
- Stack cheatsheet for coding interviews | Tech Interview Handbook — checked 2026-10-19
- 772. Basic Calculator III - In-Depth Explanation — checked 2026-10-19
- Shunting yard algorithm - Wikipedia — checked 2026-10-19
- Stack Interview Questions - GeeksforGeeks — checked 2026-10-19
- Monotonic Stack Interview Pattern: Trigger, Template, and Traps | PracHub Knowledge Hub — checked 2026-10-19
- Introduction to Monotonic Stack - GeeksforGeeks — checked 2026-10-19
- Medium — checked 2026-10-19
Last reviewed: 2026-10-19.