Overview

There is one more linear abstract data type for you to learn, and this one comes in surprisingly useful. The ability to simply place an item on a stack and remove items last-in, first-out can be used to elegantly solve many problems. Today, we’ll focus on how we can use the humble stack ADT.

Basic Learning Objectives

Before class, you should be able to:

  • Explain what a stack is and how items are added and removed
  • Define LIFO
  • Explain the balanced parentheses problem

Advanced Learning Objectives

After class, you should be able to:

  • Implement your own version of a stack
  • Use a stack to solve a problem

Readings

You should read the reading assignment through Moodle:

Checks

No additional checks.