Data structures Flashcards

1
Q

Abstract Data Type (ADT)

A

An interface for interacting with data

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

ADT Examples

A

Lists, stacks, sets, queues, maps, trees

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

Data Structure

A

Implementation of ADT

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

Data Structure Examples

A

Array, Linked List, Stack, Queue, Binary Tree, BST, Heap, Hash Table

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

Hash Function

A

maps an object (of some type) to an integer

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

Hash Map Drawbacks

A

Requires a lot of extra memory and hash function must avoid collisions

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

Root

A

Top node in a tree

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

Siblings

A

Nodes with the same parents

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

Descendant

A

Node reachable by repeated proceeding from parent to child

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

Ancestor

A

Node reachable by repeaded proceeding from child to parent

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

Leaf

A

A node with no children

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

Edge

A

Connection between one node to another

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

Path

A

Sequence of nodes and edges connecting a node with a descendant

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

Level

A

The level of a node is defined by 1 + the number of connections between the node and the root

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

Height

A

The height of a node is the number of edges on the longest downward path between the root and the leaf

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

BST

A

node-based data structure in which each node has no more than two child nodes. Each child must either be a leaf node or the root of another binary search tree. The left sub-tree contains only nodes with keys less than the parent node; the right sub-tree contains only nodes with keys greater than the parent node.