Chapter 8 Flashcards

(8 cards)

1
Q

Array

A
  • Array – block of data where all elements are of the same type.
  • The elements are accessed by indices (indexes)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Aggregate type

A
  • Aggregate type (struct/record) – block of data where different elements can have different types.
  • The elements are called fields and are accessed by names.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Lists

A
  • List – collection of data whose entries are arranged sequentially.
  • The beginning of a list is called head and the end is called tail.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Stacks

A
  • Stack – list in which entries are removed and inserted only at the head.
  • The head of a stack is called top, and the tail is called bottom.
  • Inserting an entry to a stack is called pushing, and removing an entry is called popping.
  • Stack is a LIFO (last-in-first-out) structure.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Queues

A
  • Queue – list in which entries are removed only at the head and inserted only at the tail.
  • Inserting an entry to a queue is called enqueuing, and removing an entry is called dequeuing.
  • Queue is a FIFO (first-in-first-out) structure.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Tree

A
  • Tree – collection of data whose entries have an hierarchical organization.
  • Each position in a tree is called a node, the single node at the top is called root node, and the nodes at the bottom are called leaf nodes.
  • A node’s immediate descendants are called children and its immediate ascendant is called its parent.
  • A child node together with its nodes below is called a subtree of the parent node.
  • A tree where each node has at most two children is called a binary tree.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Static versus dynamic data structures

A

whether the shape or size of the structure changes over time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Pointer

A

location in memory that contains an address to some other location in memory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly