BuildBot

Core Patterns

Stacks & queues

Lesson 4 of 5

Two ordering disciplines, last-in-first-out and first-in-first-out, and the problems each one solves.

What you'll learn

  • Distinguish last-in-first-out from first-in-first-out and when each fits
  • Use a stack to match, parse, and undo
  • Reach for a queue when fairness and order of arrival matter
Members only

A free account unlocks this lesson and every other one.

Runnable challenges, knowledge checks, and progress that syncs across your devices. No card needed.

Not sure yet? Try the free lesson first: Big-O & complexity