cMergesortdI
sertio
sortIIGive
thefu
ctio
descriptio
softhefollowi
gthreepseudocodeprogramspleasefilli
thebla
kli
es24poi
ts1Thefu
ctio
istodeletethemaximumeleme
ti
amaxheap12poi
tsEleme
tTypeDeleteMaxPriorityQueueHi
tiChildEleme
tTypeMaxEleme
tLastEleme
tMaxEleme
t①LastEleme
tHEleme
tsHSizefori1i2SizeiChildChildi2if②ChildifLastEleme
tEleme
tsChild
3
f浙江大学20072008学年秋季学期《数据结构基础》课程期末考试
③elsebreakHEleme
tsiLastEleme
tretur
MaxEleme
t2Thefu
ctio
istosortalistofNeleme
tsAi
o
decreasi
gorderbyShellsortwithShell’si
creme
ts6poi
tsvoidShellsortEleme
tTypeAi
tNi
tijI
creme
tEleme
tTypeTmpforI
creme
tN2I
creme
t0I
creme
t2foriI
creme
tiTmpAiforji①jI
creme
tif②AjAjI
creme
telsebreakAjTmp3Thefu
ctio
istofi
dmaximumsumvalueofthesubseque
cei
A0A1A2…AN16poi
tsi
tMaxSubseque
ceSumi
tAi
tNi
tThisSumMaxSumjThisSumMaxSum0forj0jThisSum①ifThisSumMaxSumMaxSumThisSumelseifThisSum②retur
MaxSum
4
f浙江大学20072008学年秋季学期《数据结构基础》课程期末考试
IIIPleasewriteordrawyoura
swersforthefollowi
gproblemso
thea
swersheet41poi
ts
1Pleaselistathedepthfirstsearchseque
cebcthemi
imumspa
i
gtreeNoteAlltheadjace
tverticesaretobevisitedbyalphabeticalorder15poi
ts2I
sertthe
umbers40286721003809138i
toa
i
itiallyemptybi
arysearchtreePleaseshowatheresulti
gbi
arysearchtree10poi
tsa
dbtheresulti
gbi
arysearchtreeafter72isdeleted3poi
ts3Thearrayreprese
tatio
ofthedisjoi
tsetsisgive
by242235692Pleaselisttheresulti
garrayeleme
tsafteri
voki
gU
io
79withu
io
bysizeKeepi
mi
dthattheeleme
tsare
umberedfrom1to95poi
ts4Give
alistofNeleme
tsa
da
i
tegerkPleasedescribetwodiffere
talgorithmsforfi
di
gthekthlargesteleme
ta
dgivethetimecomplexities8poi
tsIVIfeachvertexi
a
u
directedweightedgraphhasa
umberofballoo
sassig
edExplai
howtomodifyDijkstrasalgorithmsothatifthereismoretha
o
emi
imumpathfromvtowapathwiththemaximum
umberofballoo
sischose
15poi
tsNoteTVballoo
co
tai
sthe
umberofballoo
satvertexVvoidDijkstraTableT
5
fr