2nd 10 Flashcards

1
Q

blank is made up of a finite set of nodes that is

either blank or consists of a node called the blank together with

two binary trees, called the left and right blank, which are disjoint from each other and from the root.

A

binary search tree
empty
root
subtrees

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

each node is either a leaf or internal node with exactly two non-empty children.

If the height of the tree is d, then all leaves except possibly level d are completely full. The bottom level has all nodes to the left side.

A

Full binary tree:

Complete binary tree:

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

A full binary tree with 1 internal node must have blank

A

two leaf nodes.

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

what theorem states that The number of leaves in a non-empty blank tree is one more than the number of internal nodes.

A

full binary tree

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

Any process for visiting the nodes in some order is called a blank

A

traversal.

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

Any traversal that lists every node in the tree exactly once is called an blank of the tree’s nodes.

A

enumeration

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

blank Visit each node before visiting its children.

blank Visit each node after visiting its children.

blank Visit the left subtree, then the node, then the right subtree.

A

Preorder traversal:

Postorder traversal:

Inorder traversal:

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