CS 239 - Data Storage and Data Structures


Introduction

As we begin to program larger applications, the decision about choosing the right "tool for the job" becomes more important.

Programs generally manipulate large quantities of data.

Choosing a data structure that fits the needs of the problem at hand can make programming easier and make processing more efficient.

Today we talk about fitting the data into the right containers. We will also begin to talk about abstract data types as separate from their concrete implementations.


Warehouse example: Bernstein

Categorizing Structures in Memory

homogeneous structures - the contents of the structure will be the same
heterogeneous structures - the contents of the structure may differ

Structures that use contiguous memory

Structures that use non-contiguous memory

Structures in the abstract

We can discuss a queue. (Think line at the grocery store).

What do we know about queues?

Does this conceptual view of a queue differ based on its implementation?

Again thinking of a queue...what are some operations that we might perform on a queue?

Do these conceptual operations depend on the underlying implementation?

Some conceptual structures and their "behaviors" and terms

Queue
Behaviors:

Terms:

Stack
Behaviors:

Terms:

Tree
Behaviors:

Terms:

Binary Tree
Behaviors:

Terms:

Implementation of structures - Arrays and Linked Lists

Queue.java (array) Queue.java (list)

Stack.java(array) Stack.java(list)