Stack Interview Questions
81 interview questions in our bank cover Stack, most of them Coding Questions. They average 3.0/5 difficulty — medium — and each one was reported by a candidate after a real interview. Companies known to ask about Stack: Amazon, ByteDance, Meta, Oracle, Rokt, and 15 more.
Practice these on the problems board →Companies that ask about Stack
Question mix
- Coding Questions81
Difficulty
- 1/5 — warm-up2
- 2/5 — easy10
- 3/5 — medium52
- 4/5 — hard17
Stack questions at Amazon
Longest Valid Parentheses Span
4/5Master sequence manipulation and index tracking with this intriguing interview challenge frequently featured by Amazon. Candidates are tasked with evaluating sequences of bracket characters to locate the most expansive valid section and calculating its span based on boundary positions. This exercise evaluates your ability to optimize linear scans and maintain state efficiently using stacks or dynamic programming techniques. To access the complete problem statement, optimal algorithms, and thoroughly explained model code, unlock the full guide with a subscription.
Coding QuestionsAmazonNext Greater Element in a Circular Array
3/5In this classic interview problem featured at Amazon, you are tasked with identifying the next greater numerical value for every position in a wrap-around sequence. Because the structure loops back to the beginning, standard linear scans fall short, requiring the use of a monotonic stack to achieve optimal linear time complexity. This challenge is a staple for evaluating stack-based algorithmic thinking. Unlock the complete problem context and detailed solution by subscribing today.
Coding QuestionsAmazonValid Parentheses String
1/5Practice a fundamental string validation exercise commonly utilized in Amazon technical screenings to test basic parsing and stack-based logic. Candidates must write a robust algorithm to verify whether grouping symbols within a given text are correctly ordered and paired. The challenge emphasizes clean code, edge-case management, and optimal linear-time performance. Access to the comprehensive problem analysis and fully tested reference implementation requires a subscription.
Coding QuestionsAmazonBasic Calculator with Postfix Notation
3/5A coding question about evaluating arithmetic written with operators after their operands. It covers operand order, signed numbers, integer division semantics and clear errors for malformed input.
Coding QuestionsAmazonMin Stack With O(1) Operations
3/5Mastering data structures efficiently is a common goal in technical evaluations, frequently appearing in interviews at companies like Amazon. This problem challenges you to build a specialized stack data structure that supports standard modifications alongside a retrieval mechanism for the smallest element. The core requirement is maintaining optimal constant time complexity for every operation without relying on compound storage per node. Preparing for this scenario sharpens your understanding of internal tracking and amortized efficiency. To view the complete problem description and an optimized reference solution, unlock the full subscription.
Coding QuestionsAmazon
Stack questions at ByteDance
Basic Calculator (with and without Parentheses)
4/5This ByteDance interview question requires you to build a robust calculator capable of evaluating complex mathematical expressions provided as strings. The calculator must correctly handle non-negative integers, standard binary operators (addition, subtraction, multiplication, division), spaces, and parentheses. Key challenges include accurately implementing operator precedence rules, managing integer division with truncation towards zero, and correctly processing unary minus operations. This problem is a classic test of parsing techniques, stack-based algorithms, and careful state management to correctly interpret and compute the expression. The full problem and model solution require a subscription.
Coding QuestionsByteDanceValid Parentheses with Wildcard '*' and DFS All Strings
3/5Reported as a common interview challenge at ByteDance, this problem explores string validation and combinatorial generation with wildcard characters that can represent multiple grouping symbols or empty spaces. The initial task requires verifying overall structural correctness in linear time, while the follow-up asks you to enumerate every unique valid permutation using depth-first search techniques. It effectively tests your command over state tracking, backtracking, and duplicate elimination. Gain access to the full problem description, algorithmic breakdown, and reference code with a subscription.
Coding QuestionsByteDanceLargest Rectangle in Histogram
4/5This classic algorithmic challenge, frequently asked in ByteDance interviews, requires you to efficiently compute the maximum rectangular area that can be formed within a histogram given an array of bar heights. The assessment evaluates your mastery of linear-time monotonic stack algorithms and your ability to optimize spatial geometry computations. To view the complete problem breakdown and optimal model implementation, a subscription is required.
Coding QuestionsByteDanceMinStack, MaxStack and Streaming Median
4/5Mastering advanced linear data structures is a common hurdle in technical evaluations, exemplified by this reported ByteDance interview challenge. Candidates are tasked with implementing specialized container collections capable of tracking running extremes in constant time alongside managing a continuous data stream for real-time statistical computations. This exercise rigorously examines your ability to combine foundational push-and-pop mechanisms with dual-heap architectures for optimal performance under tight constraints. Access to the complete problem breakdown and the optimal reference solution requires a subscription.
Coding QuestionsByteDanceRemove Duplicate Letters for Lexicographically Smallest Result
3/5A string question about deleting repeated letters so each appears once while keeping the result as early in dictionary order as possible. It rewards careful reasoning about which letters may safely be dropped and which must be kept.
Coding QuestionsByteDance
Stack questions at Meta
Remove Unmatched Brackets
4/5A coding question about repairing a string of letters and brackets by deleting as few brackets as possible, first with one kind of bracket and then with several kinds that must nest correctly. It tests how carefully you define a balanced string and how you show that the number of deletions cannot be improved.
Coding QuestionsMetaFewest Insertions to Balance Parentheses
3/5A string question about repairing a sequence of parentheses with as few additions as possible. It first asks only for how many are needed, then for a repaired string.
Coding QuestionsMetaEvaluate Arithmetic Expression With Parentheses
4/5A coding question on computing the value of an arithmetic expression written as text. The expression mixes four operators, nested brackets and negative numbers, and the result must follow the usual ordering rules.
Coding QuestionsMetaResolve a Unix cd Path
2/5Reported during Meta engineering interviews, this navigation puzzle challenges you to normalize Unix-style file system paths following a command. Given a starting working directory and a target destination string, your goal is to compute the resulting absolute path while correctly handling parent directory references, current directory markers, and redundant slashes. It is a fantastic test of stack-based parsing and edge-case management. Unlock the complete walkthrough, time complexity analysis, and clean reference implementation with a subscription.
Coding QuestionsMetaEvaluate an Arithmetic Expression Without Parentheses
3/5Encountered frequently during technical screens at Meta, this coding challenge requires you to safely parse and compute mathematical expressions containing basic arithmetic operators without relying on parentheses. You must correctly handle operator precedence where multiplication and division take priority over addition and subtraction, while also validating the expression string for malformed inputs or division by zero errors. Access to the full problem statement, test cases, and optimal model solution requires a subscription.
Coding QuestionsMeta
Stack questions at Oracle
Flatten Parentheses in a Plus-Minus Expression
3/5A coding question on rewriting an arithmetic expression of single-letter variables, signs and nested brackets into an equivalent flat form. Getting the sign of every variable right at any depth is the core, and very deep nesting rules out naive recursion.
Coding QuestionsOracleExpand Nested Repeat Encoding
3/5A string-parsing problem about turning a compact repeat notation with nested groups back into its full text. It checks care with multi-digit counts and with keeping each nesting level separate.
Coding QuestionsOracleSimplify Expression by Removing Parentheses
3/5Asked during an onsite interview at Oracle Labs, this string manipulation challenge tests your ability to parse algebraic expressions containing nested parentheses and distribute unary signs across variables. You are required to flatten the expression completely while adhering to mathematical rules for addition and subtraction over symbols. This problem tests stack utilization and careful parsing logic. The complete problem description, test cases, and reference solution require a subscription.
Coding QuestionsOracleTwo-Stack FIFO Queue with Amortized O(1) Operations
2/5A data-structure design question about building a first-in, first-out container on top of last-in, first-out storage only. It tests keeping arrival order correct when additions and removals interleave, handling the empty case cleanly, and arguing why the average cost per call stays constant even when one call is expensive.
Coding QuestionsOracle
Stack questions at Rokt
Implement a Text Editor
3/5Presented during technical rounds at Rokt, this challenge asks you to build a functional text editing system capable of handling insertions, deletions, reversals, and state snapshots. The evaluation centers on your choice of underlying data structures to maintain high performance across multiple interactive commands, particularly when managing history and state restoration. Crafting a robust solution demands careful consideration of memory and time efficiency. The full problem and model solution require a subscription.
Coding QuestionsRoktArithmetic Expression Evaluator with Parentheses
4/5Evaluate a text arithmetic expression that mixes the four basic operators with nested parentheses and returns an integer. The learner must respect precedence, left-to-right ties and truncating division, including on negative intermediate values.
Coding QuestionsRoktImplement a Calculator Supporting Basic Operations
3/5A coding question on evaluating a text expression that mixes the four basic arithmetic operations with ordinary precedence and whole-number division. It checks operator precedence, left-to-right evaluation, division that drops the fraction, and long inputs with stray spaces.
Coding QuestionsRokt
Stack questions at Apple
Balanced Brackets Check
2/5A coding question on matching bracket characters of three kinds in a string and deciding whether they are properly paired and nested. It covers wrong closing types, closing brackets that appear too early, and openings left unclosed at the end.
Coding QuestionsAppleLazy Sorted-Order Iterator over a Binary Search Tree
3/5A coding question about building an ascending-order iterator over a binary search tree. The iterator must produce one value per call, keep memory proportional to the tree height rather than its size, and stay correct with several independent iterators; a discussion follow-up covers concurrent updates.
Coding QuestionsAppleExpand a Nested Repeat Encoding
3/5A coding question on turning a compact text notation, where counted groups can sit inside other groups, back into its full written-out form. The learner must handle multi-digit counts and any nesting depth.
Coding QuestionsApple
Stack questions at Google
Evaluate a Nested Math Expression
3/5A coding question on parsing and evaluating nested arithmetic function calls from a string. It covers the exact grammar, argument order, negative values, whitespace and invalid input, and expects the parser to cope with very deep nesting.
Coding QuestionsGoogleNext Greater Element to the Right
3/5A coding question about finding, for every position in a list of integers, the closest later value that is strictly bigger, with a linear-time requirement and attention to duplicates and negative numbers.
Coding QuestionsGoogleString Decompression with Nested Counts
3/5A coding question on expanding a compact string notation where bracketed groups carry a repeat count and may contain further groups. The task is to rebuild the full text while keeping the surrounding plain characters in place.
Coding QuestionsGoogle
Stack questions at Figma
Validate Brackets & Parse Nested Rich Text
3/5Master a two-part text manipulation challenge commonly featured in engineering evaluations at Figma. The first phase evaluates your ability to verify structural correctness in character sequences containing paired delimiters, while the second phase requires transforming hierarchical syntax into nested collection formats. This problem tests fundamental concepts in recursion and linear data structures. To view the full problem statement, detailed explanations, and complete model solution, a paid subscription is required.
Coding QuestionsFigmaDocument / Layer — Apply, Undo, Commit Batch, Redo
3/5Master state management and command patterns with this popular Figma technical interview exercise. Candidates are asked to construct a hierarchical document model containing customizable layers, then implement functionality for property adjustments, rollbacks, grouped batch operations, and forward execution. While the underlying computational logic remains straightforward, success hinges on designing a pristine object architecture capable of handling intricate specifications cleanly. To explore the complete problem statement and review an optimized reference implementation, an active platform subscription is required.
Coding QuestionsFigma
More Stack questions
Max Stack
4/5Designing custom data structures with advanced retrieval capabilities is a popular theme in technical evaluations, including this Latitudeai interview question. You are tasked with building an extended stack container that supports standard stack operations alongside efficient retrieval and removal of the maximum element present in the collection. The challenge emphasizes amortized time complexity and careful pointer management. Gain access to the comprehensive problem description and reference implementation with a subscription.
Coding QuestionsLatitudeaiIn-Memory Key-Value Database with Transactions
3/5As reported in technical evaluations for Otter.ai, this problem requires candidates to build a lightweight, in-memory data store that handles fundamental retrieval and modification actions alongside transactional block controls. Developers need to manage state changes carefully, allowing users to stage updates, apply them permanently, or discard them as needed while keeping track of visibility rules across different operational blocks. This tests architectural thinking, state management, and data structures. To view the complete problem description and professional solution, a subscription is necessary.
Coding QuestionsOtter.aiImplement Text Editor with Undo and Redo
3/5Featured in Notion coding interviews, this task challenges you to simulate a text editing environment capable of handling continuous typing alongside efficient undo and redo actions in constant time complexity. It evaluates your command over linear data structures, history tracking, and pointer management. The complete problem requirements, performance constraints, and reference implementation are available to subscribers only.
Coding QuestionsNotionGet Function Execution Time
3/5Reconstruct how long each function actually ran from a log of starts and finishes, where a higher-priority task suspends whatever was running. This Capital One question is the classic exclusive-time problem: a stack holds the suspended work, and each log entry charges elapsed time to whatever sits on top. You will pause the parent on a nested start, resume it on the matching finish, and get the inclusive-versus-exclusive boundary right. The full problem and the reference solution require a subscription.
Coding QuestionsCapital OneCollision
3/5A coding question on toy cars moving left or right along a road at equal speed, where meeting cars fight by strength. The task is to report which cars are never destroyed, with ties destroying both.
Coding QuestionsMathWorksString-Command Stream Calculator
3/5A coding question on evaluating a list of arithmetic commands against a running value, including commands whose operand is itself a list of commands. It tests recursion, careful input handling and clear error behaviour.
Coding QuestionsSnowflakeString Manipulation (Remove Adjacent A-B or C-D Pairs)
3/5String reduction puzzles often appear in technical screens to evaluate your proficiency with sequential data processing and stack-based algorithms. This Zalando interview question requires you to repeatedly eliminate specific adjacent character combinations until no further reductions are possible, regardless of the sequence of operations. It tests your skill in managing dynamic string mutations and optimizing runtime efficiency. Unlocking the full problem description and optimal model solution requires a subscription.
Coding QuestionsZalandoTwo-Stack FIFO Queue
2/5A data structure design question about producing first-in-first-out behaviour from last-in-first-out containers. Learners implement insertion, front access, removal and an emptiness check, and reason about the cost of a single operation versus a sequence of them.
Coding QuestionsMicrosoftValidate Non-Nesting Parentheses with Content Rules
3/5Encountered in Lenovo technical rounds, this coding challenge tests your string parsing and validation skills by requiring you to verify specific structural constraints on enclosing characters like brackets and parentheses. You must ensure proper closure, prohibit identical types from nesting within each other, and mandate that non-empty content exists inside every pair. Discover the full problem statement and optimal algorithmic solution with a subscription.
Coding QuestionsLenovoMax Stack with peekMax and popMax
4/5Enhance a standard linear data structure to support rapid maximum retrieval and specialized removal capabilities alongside traditional operations. Featured in hiring evaluations at LinkedIn, this problem tests your mastery of amortized complexity, internal pointer management, and auxiliary data structures. You will weigh simple baseline implementations against highly optimized logarithmic alternatives. To view the complete instructions and detailed code implementation, a subscription is required.
Coding QuestionsLinkedInLargest Rectangle Under a Bar Chart
4/5A coding question about a bar chart: find the largest rectangle that fits beneath the bars, resting on the baseline. It tests correct handling of zero-height bars, equal neighbours and very large inputs.
Coding QuestionsZiplineOne-Move Balanced Parentheses
3/5This MathWorks coding challenge evaluates your ability to manipulate and validate sequences of grouping symbols efficiently. The problem tests your algorithmic thinking regarding string transformations, requiring you to determine whether a given text of brackets is already properly matched or can achieve correct balance by relocating at most a single element. You will need to design an optimized approach to handle structural checks without brute-forcing every potential shift. Access to the complete problem description, architectural breakdown, and expert model solution requires a subscription.
Coding QuestionsMathWorksRecipe Shopping Cart with Ingredient Bulk Discounts (Undo/Redo)
3/5Build a flexible e-commerce basket management system that handles item dependencies, cumulative quantity discounts, and historical state changes, as seen in Decagon technical screens. This problem evaluates your skill in maintaining relational states, aggregating inventory metrics, and implementing undo-redo functionality cleanly. You will practice structuring modular data classes to handle complex business rules without performance degradation. Unlock the full exercise guidelines and reference code by subscribing.
Coding QuestionsDecagonGood Binary Strings
4/5This BNP Paribas interview challenge requires examining specific characteristics of binary sequences based on balance and prefix constraints. Candidates are tested on their ability to manipulate strings and evaluate structural validity efficiently. The task evaluates foundational algorithmic thinking and combinatorial reasoning. Access to the complete problem breakdown and the optimized reference solution requires an active subscription.
Coding QuestionsBNP ParibasData Structures Characteristics
3/5Prepare for your upcoming technical interview with General Motors by exploring the foundational traits of essential computer science containers. This curated challenge evaluates your ability to compare and contrast various organizational strategies, examining the trade-offs, performance strengths, and specific operational contexts best suited for each architecture. You will review how different memory layouts impact retrieval and modification efficiency across sequential and hierarchical layouts. Access to the comprehensive breakdown and expert answers requires an active subscription.
Coding QuestionsGeneral MotorsRemove Adjacent Duplicates in String (k=3 then general k)
3/5This Attentive interview question explores text manipulation by requiring candidates to repeatedly eliminate consecutive repeating character sequences of a specified length. As characters disappear, newly formed adjacent duplicates must also be collapsed until the text reaches a stable state. The problem evaluates your mastery of stack-based data structures and algorithmic efficiency for string processing tasks. Unlock the full problem details and a comprehensive expert solution by getting a subscription.
Coding QuestionsAttentiveImplement Redo/Undo for a Text Document
3/5Explore state management and history tracking challenges through a text editor simulation reported during technical interviews at Notion. This exercise requires you to build an interface that supports appending content alongside sequential state reversal and reapplication capabilities. It evaluates your grasp of linear data structures, pointer management, and edge-case handling for interactive software systems. Unlock the full problem details, comprehensive unit testing strategies, and a production-grade model solution with a subscription.
Coding QuestionsNotionSimplified Path for GPS Recorder
3/5In this engaging interview question reported at Axon, you are tasked with streamlining a sequence of geographic coordinates gathered by a tracking device. The objective is to filter out redundant intermediate locations that fall precisely along a straight trajectory, preserving only the vital turning points. This challenge evaluates your geometric reasoning and data reduction skills using chronologically ordered spatial inputs. The complete problem description and optimal model solution require a subscription.
Coding QuestionsAxonStamping The Sequence
4/5Asked during a Nuro interview, this problem challenges you to reconstruct the exact sequence of stamping operations needed to transform a blank placeholder string into a target pattern. You must work backward from the final state, systematically uncovering valid stamp placements until the initial configuration is fully restored. This puzzle tests your aptitude for reverse-engineering complex transformations and greedy problem-solving techniques. Access to the comprehensive problem statement and verified solution requires a subscription.
Coding QuestionsNuroEvaluate a Basic Arithmetic Expression (Calculator II)
3/5Reported as a standard technical assessment at Otter.ai, this problem requires you to parse and compute mathematical expressions adhering to standard operator precedence rules without parentheses. You will need to handle sequential operations, integer division truncation, and whitespace management efficiently within strict time limits. This challenge tests your mastery of stack-based parsing algorithms and string manipulation techniques. To view the comprehensive problem text and fully articulated code solution, a subscription is required.
Coding QuestionsOtter.aiSingle-Pass S-Expression Parser with Error Positions
3/5Build a hand-written parser for a Lisp-like syntax of numbers, names and nested parentheses, scanning the text once. The hard part is precise error reporting: which mistake is found first, and at which index. A last stage pushes nesting far past the interpreter's recursion limit.
Coding QuestionsBasetenStack-Based String Evaluator (PUSH/POP/DUP/+/-)
3/5This interview question, reported from Jump, asks you to build a parser that processes a sequence of arithmetic operations and memory manipulation commands using a Last-In-First-Out data structure. It assesses your competency in handling tokenized streams, managing data structures safely, and detecting execution errors like underflows or invalid instructions. You will need to write robust parsing logic that accurately tracks state transitions. Get access to the full problem details and a thoroughly explained model solution with a subscription.
Coding QuestionsJumpValid Parentheses
2/5Reported as a screening question from C3.ai, this fundamental parsing challenge asks you to verify whether a given string of mixed brackets is properly nested and closed in the correct order. It serves as a benchmark test for evaluating your proficiency with stack data structures and linear time validation logic. Perfecting this pattern is a crucial milestone for tackling more intricate syntax analysis and compilation tasks in future interviews. The full problem text and validated reference implementation are available to subscribers.
Coding QuestionsC3.aiNested Pattern String Expansion
3/5A coding question on expanding a compact text format in which a group of text carries a repeat count and groups may sit inside other groups. Multi-digit counts, ignored spaces and deep nesting must all come out right.
Coding QuestionsCiscoEvaluate Arithmetic Expression with Precedence
3/5A parsing question about evaluating arithmetic strings with four operators and no parentheses. The learner must respect operator precedence and a specific rounding rule for division.
Coding QuestionsDoorDashRetention Policy Collision
3/5Managing hierarchical data dependencies and overlapping constraints is a frequent challenge in enterprise software engineering interviews at Box. This problem explores how governance directives migrate across infinite tree structures and assesses your ability to detect rule conflicts. The exercise tests advanced tree traversal techniques, interval management, and spatial tracking algorithms. Unlock the complete problem statement and the professional reference solution with a paid subscription.
Coding QuestionsBoxCode Editor Folding with Brace Matching and Preserved Nested Fold State
3/5An object-design coding question about the collapse and expand feature of an editor for curly-brace code: pair up block boundaries, then keep the displayed text correct as blocks are toggled. It tests whether inner blocks remember being collapsed when an outer block is closed and reopened, and whether rendering stays linear.
Coding QuestionsJane StreetStack-Language Interpreter and Jump-Debugging Program Rewriter
3/5A coding question on a small stack language whose values are strings and whose programs can branch. You execute such programs, then rewrite them to print a debug value before each unconditional branch without changing the interpreter, keeping every branch destination correct after instructions shift.
Coding QuestionsJane StreetSurviving Asteroids After Collisions
3/5A coding question on a line of moving objects with sizes and directions. You determine which of them are left after every head-on meeting has been settled, and report their sizes in the original order.
Coding QuestionsIMC TradingValid Parentheses
1/5As a frequently asked Snowflake interview question, this fundamental parsing task requires you to verify whether a sequence of grouping symbols is correctly nested and paired. You will need to process strings efficiently using appropriate data structures like stacks to ensure that every opening symbol has a corresponding closer in the correct order. This problem is a staple for testing basic algorithmic fluency. The full problem description and expert solution are available exclusively to subscribers.
Coding QuestionsSnowflakeBasic Calculator with Operators, Variables, and Functions
3/5This reported Tesla interview question challenges you to build a comprehensive expression parser that starts with basic arithmetic and progressively incorporates advanced features such as exponentiation, grouping symbols, logical operators, variable assignments, and custom routines. This puzzle evaluates your ability to design robust interpreters and handle complex grammar rules efficiently. To explore the complete problem statement, comprehensive test cases, and an optimized reference solution, a subscription is required.
Coding QuestionsTeslaExclusive Time of Functions
3/5Featured in Uber technical screenings, this problem asks you to calculate the net execution duration for multiple routines running on a single processing unit based on sequential start and completion logs. The challenge tests your proficiency with stack-based data structures and timeline tracking, requiring you to properly isolate active processing periods from nested sub-calls. Access to the full problem description, edge-case breakdowns, and a verified model implementation requires a paid subscription.
Coding QuestionsUberCooking App Cart with Nested Transactions
4/5This advanced coding challenge, reported from Decagon interview loops, requires you to design a robust shopping cart system that manages item quantities and complex discount rules while supporting nested database-style transactions. You will need to implement transactional boundaries, including savepoints, rollbacks, and commits, testing your ability to maintain internal state integrity under multi-layered modifications. It is a great test of object-oriented design and stack-based state management. To view the complete problem statement and implementation details, a subscription is required.
Coding QuestionsDecagonExcel Redo and Undo Simulation
3/5This Airtable interview question asks you to replicate the history management features found in modern spreadsheet software, specifically handling state reversals and re-applications. You must design a robust system that tracks user actions sequentially while supporting forward and backward navigation without corrupting chronological integrity. Unlock the complete problem description, interaction walkthroughs, and optimized implementation details with a subscription.
Coding QuestionsAirtableDays Until No Plant Dies
4/5A coding question about a row of plants that thins out day after day as plants with more pesticide than their left neighbour die together. Learners return how many days have deaths, for rows of up to one hundred thousand plants.
Coding QuestionsWalmart LabsCommand Executor with Undo and Tags
3/5This Netflix interview question asks you to design a flexible command execution engine that supports both global history tracking and tag-based selective undo operations. It evaluates your command design patterns, state management strategies, and efficient data structure selection for fast retrieval and removal. To access the full problem requirements and expert solution code, a subscription is required.
Coding QuestionsNetflixExpand Nested (group){k} Repeats
3/5A string-processing question about expanding a compact notation in which a count written after a bracketed group says how many times the group appears. Groups can sit inside other groups several levels deep, and a count can be zero or have many digits.
Coding QuestionsWaymoMin Stack (Basic Data Structure Exercise)
2/5Featured in an OKX coding evaluation, this fundamental data structure problem asks candidates to design a specialized container that supports standard stack operations alongside constant-time retrieval of its smallest element. Programmers must handle various command inputs efficiently while delivering correct responses for insertions, deletions, and lookup queries under large input scales. The challenge tests fundamental algorithmic thinking, time-complexity awareness, and clean data structure implementation. The complete problem statement, constraints, and reference solution require a paid subscription.
Coding QuestionsOKXValid Parentheses Check
2/5String parsing and validation form the foundation of many core computer science fundamentals, frequently appearing in screening interviews at companies like WeRide. This challenge requires you to evaluate a sequence of mixed bracket types and verify whether they are correctly nested and properly closed in the right order. It serves as an excellent test for your understanding of stack data structures and linear time complexity parsing. Unlock the complete problem statement and a clean model solution with a subscription.
Coding QuestionsWeRideRemove All Adjacent Duplicates in a String
2/5This Whatnot interview question challenges you to repeatedly eliminate adjacent matching characters from a text string until no further reductions are possible. The core task involves efficiently processing character sequences to handle cascading deletions without incurring high time complexity. It evaluates your mastery of linear data structures, specifically utilizing stacks for string manipulation. Unlock the full problem details and the optimal model solution by acquiring a subscription.
Coding QuestionsWhatnotImplement a Calculator with Brackets
4/5In this classic expression evaluation challenge reported from WeRide, you must construct a robust arithmetic calculator that correctly handles basic operations along with parentheses and operator precedence rules. The task evaluates your ability to parse structured text strings efficiently while respecting mathematical hierarchy and integer division behaviors. Tackling this problem hones your stack-based parsing skills and algorithmic logic for complex string manipulation. Unlock the full problem details and reference solution by obtaining a subscription.
Coding QuestionsWeRideDesign a Max Stack (Optimal)
4/5This Zipline interview question challenges you to build an advanced container structure that tracks standard insertion and removal tasks while efficiently retrieving and extracting its largest element in constant time. Candidates are evaluated on their ability to combine multiple data storage patterns to maintain performance guarantees during complex modifications. The complete problem statement, comprehensive test cases, and a fully optimized model solution require a subscription.
Coding QuestionsZiplineCompress a text editor operation stream into insert/delete/skip operations
3/5Featured in Replit interview loops, this problem asks you to take a sequence of low-level text editing actions and compress them into a streamlined set of higher-level instructions. The challenge tests your proficiency in string manipulation, state tracking, and optimization algorithms under cursor boundary conditions. Unlock the full problem statement, test cases, and complete solution code by subscribing today.
Coding QuestionsReplitSimulate Stack
3/5A coding question about validating an order of operations on a last-in-first-out structure. Given the order in which items go in and a proposed order in which they come out, the learner decides whether that exit order is achievable.
Coding QuestionsRubrikEvaluate an Expression with Plus, Minus and Parentheses
4/5A coding question on turning a text expression that mixes addition, subtraction, negation and nested brackets into its integer value, without any built-in evaluator. It checks careful handling of signs in front of grouped terms, multi-digit numbers, spacing and very deep nesting.
Coding QuestionsNetflixFIFO Queue from Two Stacks
2/5A coding question on building a first-in, first-out queue out of two last-in, first-out stacks, with push, pop and an error on an empty queue.
Coding QuestionsGoldman SachsModify the String
3/5Remove repeated letters from a string so that every letter survives exactly once, aiming for the dictionary-largest possible outcome. The problem checks whether you can reason about order-preserving choices and keep a running candidate result. Subscribers can open the full statement and solution.
Coding QuestionsYahooCalculator with Parentheses
3/5Evaluating a string that mixes numbers, plus and minus signs, spaces and nested parentheses. The task checks how well you track signs across nested groups while scanning the input once.
Coding QuestionsDockerFunction Inclusive and Exclusive Time
3/5A coding question on turning a chronological start/end event log into per-function timings. It tests how nested calls are tracked, the difference between total time and time excluding direct callees, and consistent handling of timestamps.
Coding QuestionsLinkedInImplement Queue using Stacks
2/5A data structure design question about building a first-in-first-out queue from two last-in-first-out containers. It focuses on when elements are moved between the containers and what that costs on average.
Coding QuestionsMicrosoftRemove Adjacent Duplicate Characters
3/5A coding question about a string in which neighboring equal letters keep cancelling in pairs. It checks that deletions which expose new pairs are handled and that a long input finishes quickly.
Coding QuestionsBlue Origin
Studied alongside
Stack interview FAQ
- How many Stack interview questions are there?
- 81 reported questions, mostly Coding Questions.
- Which companies ask Stack questions?
- Amazon (5), ByteDance (5), Meta (5), Oracle (4), Rokt (3), Apple (3), Google (3), Figma (2).
- How hard are Stack questions?
- They average 3.0 out of 5: 2 at 1/5, 10 at 2/5, 52 at 3/5, 17 at 4/5.