Module M08 · 8 of 35 in teaching order · Beginner

Stacks

Last in, first out: implementations, expression handling and the monotonic stack.

Lessons

  1. How a stack works: push, pop and peek on the end of a dynamic array, underflow, amortized O(1) costs, matching brackets, and the stack types of four languages.

Topics this module covers

The full module scope. Topics without a lesson above are not written yet.

  • LIFO
  • operations
  • array/linked implementations
  • underflow/overflow
  • expressions
  • balanced delimiters
  • monotonic stack

Builds toward