freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

數(shù)據(jù)結(jié)構(gòu)實(shí)踐環(huán)節(jié)考核指導(dǎo)-資料下載頁(yè)

2025-06-17 16:52本頁(yè)面
  

【正文】 Key){BSTNode *parent=NULL, *p, *q,*child。p=*T。/******************************************************/while(p){if(pkey==Key) break。parent=p。請(qǐng)考生填寫(2)}/******************************************************/if (!p) {printf(沒(méi)有找到要?jiǎng)h除的結(jié)點(diǎn)\n)。return。}q=p。if (qlchild amp。amp。 qrchild)for (parent=q,p=qrchild。 plchild。 parent=p,p=plchild)。child=(plchild)?plchild:prchild。/************************************************/if (!parent) *T=child。else {請(qǐng)考生填寫(3)if (p!=q)qkey=pkey。}/************************************************/free(p)。}void InorderBST(BSTree T){ if(T!=NULL){InorderBST(Tlchild)。printf(%5d,Tkey)。InorderBST(Trchild)。}}附錄二:樣題參考答案樣題一答案:(1) iLlengthamp。amp。xLdata[i](2) for (j=Llength1。j=i。j) Ldata[j+1]=Ldata[j]。 Ldata[i]=x。 Llength++。(3) iLlengthamp。amp。xLdata[i](4) for(j=i+1。j=Llength1。j++)。Ldata[j1]=Ldata[j]。Llength。測(cè)試結(jié)果為:插入5后:將數(shù)據(jù)5插入到第8的位置上。96 64 52 48 43 33 18 12 5插入18后:重復(fù)插入,錯(cuò)誤!插入57后:將數(shù)據(jù)57插入到第2的位置上。96 64 57 52 48 43 33 18 12 5刪除48后:刪除原表中第4個(gè)位置以后的一個(gè)數(shù)據(jù)48。 96 64 57 52 43 33 18 12 5刪除20后:沒(méi)有找到要?jiǎng)h除的整數(shù)。96 64 57 52 43 33 18 12 5刪除12后:刪除原表中第7個(gè)位置以后的一個(gè)數(shù)據(jù)12。96 64 57 52 43 33 18 5樣題二答案:(1) for(i=n/2。i0。i) Heapify(i,n)。(2) Heapify(1,i1)。測(cè)試結(jié)果為:第一趟的結(jié)果為:17 62 53 25 45 36 7 6 12 78第五趟的結(jié)果為:7 25 12 6 17 36 45 53 62 78最后一趟的結(jié)果為:6 7 12 17 25 36 45 53 62 78樣題三答案:(1)InsertBST(amp。T,Key)。(2)p=(Keypkey)?plchild:prchild。(3)if(p==parentlchild)parentlchild=child。else parentrchild=child。測(cè)試結(jié)果為:刪除45前的中序遍歷序列為:6,7,12,17,25,36,45,53,62,78刪除45后的中序遍歷序列為:6,7,12,17,25,36,53,62,78刪除60:沒(méi)有找到要?jiǎng)h除的結(jié)點(diǎn)。10 /
點(diǎn)擊復(fù)制文檔內(nèi)容
職業(yè)教育相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1