u
u
5
t n
~ ( cfw_ (
h Sx(Qvubv(Y
h W1 h d a ` y ! 31
g TXxy f f u(x @ g x(Q~usf(Y06X2bi( qcSXqY
e h g W 3 d h W 1 h 3 1 1 d y 1 ! h W dd
hY cfw_Y(b g v&4XqqT g p43 i#v4#(xSxx4 g T6v4cfw_(x g ~(
q 1 d d 1 ! ` 3 h d ` 3 W 3 d ! ! e W 3 d y
! y d
CSE 5311 Section 003 Fall 2004
Quiz 6 Solution
November 17, 2004
This is a closed-book, closed-notes, closed-computer, closed-neighbor quiz.
1. Consider the following PRAM CRCW algorithm Factorial(L,n) that stores the values n . . . 1
in a singly-linked l
CSE 5311 Section 003 Fall 2004
Quiz 5 Solution
November 3, 2004
This is a closed-book, closed-notes, closed-computer, closed-neighbor quiz.
1. (3 points) Show the minimum spanning tree of the following graph.
1
a
6
2
b
c
7
d
5
a
3
e
4
1
b
2
c
MST
f
d
5
e
CSE 5311 Section 003 Fall 2004
Quiz 4 Solution
October 20, 2004
This is a closed-book, closed-notes, closed-computer, closed-neighbor quiz.
1. Consider a data structure that inserts keys in constant time, except that after every 10th key
is inserted, the
CSE 5311 Section 003 Fall 2004
Quiz 3 Solution
October 6, 2004
This is a closed-book, closed-notes, closed-computer, closed-neighbor quiz.
1. (5 points) Show the nal B-tree that results from inserting the keys A, B, C, D, E, F, G, H
and I (in this order)
CSE 5311 Section 003 Fall 2004
Quiz 2 Solution
September 22, 2004
This is a closed-book, closed-notes, closed-computer, closed-neighbor quiz.
1. Consider the problem of sorting, in worst-case linear time, an array A of 10,000 9-digit social
security numbe
CSE 5311 Section 003 Fall 2004
Quiz 1 Solution
September 8, 2004
This is a closed-book, closed-notes, closed-computer, closed-neighbor quiz.
1. Below is pseudocode for the iterative algorithm SortedInsert, which inserts the key k into
an already sorted ar
33 1 5r ra x 3 f y a
qf 4q0BuBqV`4u e (SQqnvi@ e
fv1sq e wiqr4 e d q43 tQusQqV`@ e v! vs e v~4qrQqi
p p ! a p a e f 3 1 5r ra x 1 a Y y f ! y Y c33 1 pa a f f
a 1 !3
t440xyXv4pvQaT43 tHQusQqV`svP e Ti e &qiqivqihq@PQT d
! p 1 f p Y f 3 1 5r ra xr ! !
A
B
D
N
H
K
Q
T
F
A
C
D
B
Insert B
H
F
K
Q
T
N
Insert C
j ` 1 br
qi e 0&!
p u ! p ! 1 p u ! b f ! w b 3 y f b f b r f x 1
odq#q e Tod(u(4Yiqiv4@ e Ygv! vYYgqYhP@ e ~ e P&! a
F
A
D
N
H
K
Q
T
5 b p w y ! w b r ! 3 b p f !
ncfw_Yvvw v4hz@YYs04g~43 g@ e
k
X ! ! r ! v ! X ! r v v ! 1 i e r ! r e 1 X a 1 r ! r
4f q # YHssYW#2Q`4uTtYk`s(Sv
1 q Y ur q a q `4Htfa 4`(QuuPf q f401 q f&4dT
a 3 b e X e h
e 3 1 ! 1 h ! ! ! e r 1 w r e d r r ! X 5 b
43 k
e r ! e1 X a
Yuug`r `Tt
1 r
t! `Fa q `4H4 q n@fa 0!
CSE 5311 Section 003 Fall 2004
Quiz 7 Solution
December 1, 2004
This is a closed-book, closed-notes, closed-computer, closed-neighbor quiz.
1. Consider the following set of points.
(a) (2 points) Draw the convex hull on the above set of points.
See above.