Trees terminology Flashcards

1
Q

Child

A

Self-explanatory

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

Parent

A

Self-explanatory

Each node has exactly one parent, except root

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

Root

A

The “highest”/”oldest” element in the tree

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

Binary tree

A

A type of tree where each node can have at most two children

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

Left/Right child

A

For binary trees, self-explanatory

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

Ancestors

A

Nodes on the path to the root

parent, parent’s parent, etc.

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

Decendants

A

Children, children’s children, etc.

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

Subtree

A

A subset of a tree containing a node and its decendants

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

Leaf

A

A node with no children

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

Height (of a node)

A

The distance from a node to the deepest leaf of its subtree

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

Depth (of a node)

A

Length of the path from the root to that node

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

Balance factor

A

The height of the right subtree minus the height of the left subtree

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