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

正文內(nèi)容

c課件簡單鏈表及其應(yīng)用(編輯修改稿)

2024-11-13 00:54 本頁面
 

【文章內(nèi)容簡介】 點 結(jié)點 n … 新結(jié)點 pNew pEnd head (a) 加入前 pNew=new node。 next next … data data 頭結(jié)點 結(jié)點 n … next data 結(jié)點 n+1 head (b) 加入后 pEndnext=pNew。 pEnd=pNew。 pEnd pNew ? 鏈表創(chuàng)建結(jié)束 next 0 next next … data data 頭結(jié)點 結(jié)點 n … 新結(jié)點 pNew pEnd head (a) 結(jié)束前 pNew=new node。 (b) 結(jié)束后 pEndnext=0; delete pNew。 next 0 … data data 頭結(jié)點 結(jié)點 n … pEnd head . 鏈 表的輸出 void ShowList(node* head) { if(head==0) { coutList is empty!endl。 return。 } node *temp=head。 cout now the items of list are: \n。 while(temp!=0){ cout tempdataendl。 temp=tempnext。 } } . 鏈 表某個結(jié)點的訪問 node* access(node* head,int n) { if(head==0) { coutList is empty!endl。 return 0。} node *temp。 temp=head。 for(int i=1。in。i++) { if(tempnext==0) { cout“要訪問的結(jié)點數(shù)大于鏈表的結(jié)點數(shù) .”?\n?。 return 0。 } temp=tempnext。 } return temp。 } . 統(tǒng)計 鏈 表結(jié)點的個數(shù) int node
點擊復(fù)制文檔內(nèi)容
教學(xué)課件相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1