Linear Structures

Variations on a Theme

Nathan Tenney

WSU Tri-Cities

Abstract Data Type

List ADT

List Implementations

The STL Implementations

Skip List

Skip List

Skip List

Skip List

List Problems

Self-Organizing Lists

Move-To-Front

Count Method

Transpose Method

Insertion of Items

Ordering Method

Comparison of Methods

Comparison of Methods

Sparse Tables

Sparse Tables

Sparse Tables

Sparse Tables

Stacks

Stacks

Application: Symbol Balancing

Application: Symbol Balancing

Application: Postfix Math

Calculating the cost of a shopping trip

Application: Postfix Math

Application: Postfix Math

Application: Postfix Math

Read 6

  _
  _
  _
Top of stack -> 6

Application: Postfix Math

Read 5

  _
  _
Top of stack -> 5
  6

Application: Postfix Math

Read 2

  _
Top of stack -> 2
  5
  6

Application: Postfix Math

Read 3

Top of stack -> 3
  2
  5
  6

Application: Postfix Math

Read +

  _
Top of stack -> 5
  5
  6

Application: Postfix Math

Read 8

Top of stack -> 8
  5
  5
  6

Application: Postfix Math

Read *

  _
Top of stack -> 40
  5
  6

Application: Postfix Math

Read +

  _
  _
Top of stack -> 45
  6

Application: Postfix Math

Read 3

  _
Top of stack -> 3
  45
  6

Application: Postfix Math

Read +

  _
  _
Top of stack -> 48
  6

Application: Postfix Math

Read *

  _
  _
  _
Top of stack -> 288

Application: Function Calls

Queues

Queues

Queues

Queues

Queues

Priority Queues

Priority Queues

Priority Queues