Quiz #4 Review Flashcards
1
Q
For every node in PostOrder traversal:
A
Visit left
Visit right
print
2
Q
For every node in PreOrder traversal:
A
Print
Visit left
Visit Right
3
Q
For every node in InOrder traversal:
A
Visit left
Print
Visit Right
4
Q
key of PostOrder traversal:
A
root always prints last
5
Q
key of InOrder traversal:
A
least to greatest
6
Q
key of PreOrder traversal:
A
root always prints first
7
Q
BST benefit
A
they have speedy searches since all data is ordered properly around the root
8
Q
BST speed
A
Log2(n)
9
Q
Size =
A
of elements = n
10
Q
Leaves:
A
Elements with no kids
11
Q
Edges:
A
non-null links
12
Q
Edges formula:
A
n-1
13
Q
of null links formula:
A
n+1
14
Q
of null links:
A
Node has no leaf
15
Q
Height:
A
longest path from node to length