Skip to content
Skip to page content
soylai.com

Data Structure: Stack — Part 1: The Stack and Its Operations

Beta
Lesson

Data Structure: Stack

Part 1 — what a stack is, its operations, and how to build one with a Python list.

In this lesson you will

  • Explain a stack as a last in, first out data structure with one open end, the top
  • Perform push, pop and peek, and test for an empty stack, using a Python list
  • Detect underflow and explain overflow for fixed-size stacks
  • Trace the contents of a stack after a sequence of operations
Part 1 at a glance