Purpose of
data structures
- Computer programs
processes
information
- In order to process
information
efficiently:
- Information
must be stored
in a certain way
|
- There are many
different
storage techniques
to
store
information
- Each
storage technique
provides an
access strategy to the
stored
data
- Each
storage technique
has its
strengths and
its weaknesses
|
- Sample
data structures:
- Dynamic
array:
flexible
- Queue:
first-in-first-out access
- Stack:
first-in-last-out access
|
|
Overview data structures
discussed in this course
- Dynamic
array:
- More flexible than
static
array
|
- Set:
- Each value is
stored
at most
once
|
- Map
(a.k.a
associative array):
- Fast
look up based on
keys
|
|
Overview data structures
discussed in this course
- Queue:
- Provides first-in-first-out
access to the
stored
data
|
- Stack:
- Provides first-in-last-out
access to the
stored
data
|
- Deque
(double-ended
queue):
- Combines
the queue and the
stack
|
- Priority
queue:
- Accesses the
largest
value
first
|
|
❮
❯