Skip to main content

Stacks and Queues

Overview​

Peanut butter and jelly, Batman and Robin, Rick and Morty... stacks and queues are another iconic duo.

There are two components to this lesson:

  1. myGA module: Stacks and Queues
    • If the above link does not take you to the correct module, you can find the lesson in your myGA dashboard.
  2. In-Class Exercise: Bracket Matching

Learning Objectives​

By the end of this lesson, you'll be able to:

  • Distinguish between a stack and a queue.
  • Determine situations in which you’d use a stack or queue over another data structure.
  • Build a stack and a queue using a linked list or an array.

Prerequisites​

  • Big O notation

Duration​

1.5 hours total:

  • 0.5 hour myGA
  • 1 hour in class

Additional Resources​