Answer Sheet for Midterm Exam
1. (a) (b)
row col Val
a[0] 3 3 3
[1] 0 0 1
[2] 0 1 2
[3] 2 1 3
2.
3. (a) C (b) D
4. [1] n-3 [2] n [3] n/2+1 [4] n-4
5. (a) The tree is empty or is skewed to the left
(b) The tree is empty or has a single node only
(c) The tree is empty or is skewed to the right
6. (a) (b)
(c) No. has a right child.
7.
100-3-1
3020 0-100
p
3 3 rd
r
d r
n
d r
n
d r
n
d r
n
d r
n
d r
n
0 1 rd
2
0 0 rd
1
2 1 rd
3
a
H0
H1
H2
H0 H1 H2
a
c
e
f
b
d
g
h
i
c
e
f
h i
b
d g
a
a
8
6
35 102
26
56
70
42
2
88
99
- 1
- 2
- 3
- 4
- 5
- 6
前往页