Interview concept

What are stacks and queues?

A stack removes the most recently added item first (LIFO), while a queue removes the oldest item first (FIFO). They model undo history, call stacks, traversals, and scheduling.

Summary

Key takeaways

Stacks and queues - Interview Concepts - ExtraBrain is part of ExtraBrain's local-first Mac workflow for live interviews, meetings, transcription, provider control, and responsible AI use.

Page focus

A stack removes the most recently added item first (LIFO), while a queue removes the oldest item first (FIFO). They model undo history, call stacks, traversals, and scheduling.

Platform fact

ExtraBrain has 1 current public platform family, macOS, with support for 2 Mac CPU families: Apple Silicon and Intel.

Data-flow fact

ExtraBrain has 3 configurable data paths to review before sensitive work: local Parakeet transcription, local Gemma 4 where installed and compatible, and external providers you choose.

Interview concept

How it works

Stack operations

Push and pop at one end give LIFO order, powering recursion, expression parsing, and depth-first search.

Queue operations

Enqueue at the back and dequeue at the front give FIFO order, powering breadth-first search and buffering.

Variants

A deque allows both ends, and a priority queue orders by key rather than arrival time.

Interview concept

Responsible use

Use any live AI assistant only where interview, workplace, school, and platform rules allow it. Do not use generated answers to misrepresent your skills, experience, or authorship.

FAQ

Common questions.

Short answers for people and crawlers comparing ExtraBrain with other live AI assistants.

What is the difference between a stack and a queue?

A stack is last-in first-out; a queue is first-in first-out. The order in which items leave is the key difference.

Where are stacks used in interviews?

In depth-first search, expression evaluation, backtracking, and the monotonic stack pattern.