BST Flashcards

1
Q

Tree

A

A tree represents a hierarchical relationship between nodes.

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

Root

A

The top node in a tree- has no parents.

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

Leaves

A

Nodes that have no children.

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

Interior Node

A

Any node that is not a root or a leaf.

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

Height of a Tree

A

The length of the lo gnest path from the root to a leaf in that tree.

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

Binary Tree

A

A tree in which each node can have a maximum of two children.

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

Full Binary Tree

A

Every node, other than the leaves, has two children.

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

Complete Binary Tree

A

Every level, except possibly the last, is completely filled, and all nodes are as far left as possible.

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

Tree Levels

A

The root of the tree is at level 0, the level of any other node in the tree is one more than the level of it’s parent.

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

Preorder Traversal

A

The root is visirted before it’s left and right subtrees.

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

Depth-First Search

A

DFS explores a path all the way to a leaf before backtracking and exploring another path.

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

Inorder Traversal

A

The root is visited between the subtrees.

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

Postorder Traversal

A

The root is visited after both subtrees.

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

Breadth-First Search (BFS)

A

BFS explores nodes nearest the root before exploring nodes further away.

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

Binary Search Tree Structure

A

The value of the node itself is larger than the value of every node in its left subtree and the value of the node itself is smaller thna the value of every node in its right subtree.

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