Data Types Flashcards

1
Q

Primitive data types

A

The set depends on the language. Best definition: a data type that isn’t built from other data types and can only represent a single value.

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

Composite data type

A

Any data type that can be constructed from primitive data types. Often called a structure or aggregate. Examples include arrays, tuples / structs / records, unions and tagged unions.

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

Abstract data type

A

Class of objects whose behavior is defined by a set of values and a set of operations. Lists, sets, stacks, queues, trees, graphs

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

Linear data structures

A

Linear data structures are data structures whose elements form a sequence. Interesting example: system image: a serialized copy of the entire state of a computer system.

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

Array

A

Linear data structure, useful because the indices can be computed at run time

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

Lists

A

Dynamic / growable array

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

Linked list

A

Each item is comprised a reference link and a value

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

Tree

A

A tree can be defined recursively as a root node and its child nodes

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

Data structure operations

A

Insert, delete, search, traversal

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

Tree uses

A
  • Representing hierarchical data
  • Storing data in a way that makes it efficiently searchable
  • Routing algoritms
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Binary tree

A
  • Defined recursively as the set (L, S, R)
  • In computing, binary trees are typically used along with a labeling function associating each node with a value which makes them efficient for searching and sorting
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Full binary tree

A

Each node has 0 or 2 children

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

Perfect binary tree

A

All interior nodes have 2 children and all leaf nodes are on the same level

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

Balanced binary tree

A

Has the minimum possible maximum depth

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

B-tree

A

A generalization of the binary search tree in that a node can have more than 2 children.

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

Heap order property

A

Every child is greater than (min heap) or less than it’s parent (max heap)