Maggie HTTN
Data Structures • Instructional Design Case Study

Queue (Abstract Data Type)

A queue models FIFO (First In, First Out) behavior. Items enter at the rear and leave from the front.

This page is designed not only to explain the queue concept, but to demonstrate how visual structure, scaffolding, and cognitive design principles support beginner learning.

Focus: clear mental model → operations → comparison → application → reflection.

Learning Objectives

By the end of this lesson, learners will be able to:

  • Define FIFO and describe how a queue organizes data.
  • Explain the difference between enqueue, dequeue, and front/peek.
  • Apply queue operations correctly in simple problem scenarios.
  • Differentiate queue behavior from stack behavior.
  • Recognize real-world systems that follow queue logic.

(Bloom’s Taxonomy levels: Remember → Understand → Apply → Analyze)

Learner Context

Target audience: beginner computer science students or non-CS majors encountering data structures for the first time.

Design priority: reduce cognitive overload while strengthening conceptual mental models before introducing code.

Core Concept

FIFO (First In, First Out)

The first item inserted is the first item removed. This mirrors real-world waiting lines, reinforcing a familiar mental model.

Core Operations

  1. Enqueue: Add an item to the rear.
  2. Dequeue: Remove the front item.
  3. Front / Peek: View the front item without removing it.
  4. isEmpty: Check if the queue has no elements.

Contrast Case: Stack vs Queue

Stack
LIFO — Last In, First Out Newest leaves first Used in recursion & DFS
Queue
FIFO — First In, First Out Oldest leaves first Used in BFS & scheduling

Real-World Applications

  • Printer job scheduling
  • CPU task management
  • Network packet buffering
  • Breadth-First Search traversal

Visual Demonstration

The animation visualizes enqueue and dequeue transitions, reinforcing cause → effect mapping.

Formative Assessment

  • If three items are enqueued (A, B, C), which item leaves first?
  • What happens if dequeue is called on an empty queue?
  • In BFS, why is a queue necessary instead of a stack?

Transfer & Extension

Learners are encouraged to identify queue behavior in real systems around them, strengthening abstraction and transfer from concept → system design.

Instructional Design Approach

1. Cognitive Load Theory (Sweller)
  • Chunked content into cards.
  • One idea per visual block.
  • Reduced extraneous decoration.
2. Mayer’s Multimedia Principles
  • Coherence: removed unnecessary text.
  • Signaling: headings guide attention.
  • Segmenting: learners control video playback.
  • Dual Coding: text + animation reinforce memory.
3. Gagné’s Events of Instruction
  • Gain attention (real-world examples)
  • Present content (core rules)
  • Provide guidance (comparison)
  • Elicit performance (assessment questions)
  • Enhance retention (transfer prompts)
4. Constructivist Approach
  • Connect new concept to prior knowledge (real-world line).
  • Encourage active reasoning (contrast stack vs queue).
  • Support reflection (common mistakes + self-check).
Teaching Flow:
Mental model → Vocabulary → Operations → Contrast → Application → Reflection → Transfer