Top 50 Stack Interview Questions
The most frequently asked Stack questions across all roles and companies, ranked by real interview frequency. Updated daily.
Traverse a graph from a start node using BFS and DFS, returning the visit order for each traversal.
Siemens
Simple Tire
InformaticaSimulate FIFO queue operations using two LIFO stacks with amortized O(1) processing.
Help at Home
Generac Power Systems
Sabre SystemsCompute water trapped between elevation bars using an O(n) two-pointer scan with constant extra space.
Fourkites
ByteDance
DataminrSimulate Unity Editor undo-stack operations using only queue behavior and preserve LIFO results.
DWS GroupPPrivate Practice
Cambia Health SolutionsProblem Given the head of a singly linked list, reverse the list, and return the new head node. The linked list is defined as follows: python class ListNo...
Constellation Energy
Meta IT
Schneider ElectricFlatten a nested array into a single list using recursion or an explicit stack while preserving left-to-right order.
SentinelOne
Bask Health
Solytics PartnersUse a stack to determine whether delimiters in a Raptive configuration string are properly opened and closed.
Raptive
Brex
Equity TrustValidate a parentheses string using a stack to ensure matching bracket types and correct nesting in O(n) time.
Salesforce
ICF
Intuitive SurgicalSign up to see every question
Create a free account to unlock this list and practice real interview questions.