Explain the difference between a Queue and a Stack.
Role: Software Engineer
Category: Software Engineering Fundamentals
Difficulty: easy
Interview Round: Other
Overview: Asks for the difference between a queue and a stack: how each adds and removes elements and when to choose one over the other. It tests understanding of access order, the cost of each operation and how to implement a queue efficiently, and how the choice of container changes a graph search.