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

正文內(nèi)容

數(shù)據(jù)結(jié)構(gòu)b樹的圖書管理系統(tǒng)-閱讀頁

2024-09-28 02:43本頁面
  

【正文】 則合并到左兄弟節(jié)點(diǎn)中 ) // 刪除操作 // 將 p 所指的結(jié)點(diǎn)的第 i個(gè)數(shù)據(jù)項(xiàng)刪除掉。p, int i) { while (pptr[i] != NULL) { // 這里我么要選擇刪除的位置,具體見上面的分析。 while (qptr[0] != NULL) q = qptr[0]。 pkey[i] = qkey[1]。 p = q。 k pkeynum。 pptr[k] = pptr[k + 1]。 } // delet //合并操作 // 將節(jié)點(diǎn) p 和 p1 及其父節(jié)點(diǎn)合并 void merge(BTree amp。p1, BTree amp。 // 父節(jié)點(diǎn)的相應(yīng)數(shù)據(jù)項(xiàng)下移 pptr[pkeynum + 1] = p1ptr[0]。 i = p1keynum。 pptr[pkeynum + 1 + 1] = p1ptr[i]。 } // for_i p1ptr[0] = qptr[pos] = NULL。 // 跟新個(gè)節(jié)點(diǎn)的數(shù)目 p1keynum = 0。 // 二、如果我們查找到我們要?jiǎng)h除的節(jié)點(diǎn)為父節(jié)點(diǎn)的不為第 0 號(hào)節(jié)點(diǎn),那么我 //們要判斷和她相鄰的左兄弟是否滿足 = s 1 的條件:是,移動(dòng),否則合并。p, BTree amp。i, int s) { BTree p1 = qptr[i]。 華東交通大學(xué) 08 級(jí)軟件工程( 1)班 —— 張志福 8 pkey[pkeynum] = qkey[i]。 p1ptr[0] = p1ptr[1]。 p1ptr[1] = NULL。 } else merge(p, p1, q, i)。p, BTree amp。i, int s) { BTree p1 = qptr[i 1]。amp。 k = 2。 pptr[k] = pptr[k 1]。 pkey[1] = qkey[i]。 qkey[i] = p1key[p1keynum]。 p1ptr[p1keynum] = NULL。 i = p1keynum。 } // RightAdjust void DeleteBTree (BTree amp。 bool flag = false。 while (!flag amp。 p) { delet (p, i)。 else { i = 0。 if(q) while (i = qkeynum amp。 qptr[i] != p) i++。 else RightAdjust(p, q, i, s)。 } /// while if (Tkeynum == 0) { if (!p) { T= NULL。 } p = Tptr[0]。 T = p。 } // if } // DeleteBTree //5B 樹的顯示 // 樹的打印采用啦層次遍歷的操作,為了使得結(jié)果更為形象。T) { if (T == NULL) return。 i = Tkeynum。 printf(\n***********************\n)。 j = Tkeynum。 } // for_j } // Print //B樹的銷毀 華東交通大學(xué) 08 級(jí)軟件工程( 1)班 —— 張志福 9 void DestroyBTree(BTree amp。 BTree p = T。 i = pkeynum。 } // for_i T= NULL。 // 這里實(shí)現(xiàn)了一次輸入多本書相關(guān)的信息。T) { while (true) { printf(Please input the new book39。 if (scanf(%d, amp。 printf(Please input the new book39。 scanf(%d, amp。 tmp = SearchBTree(T, book)。 key[].stand_stocks += 。 } else { = 。 printf(Please input the book39。 the editor39。 scanf(%s %s, , )。 } // else PrintBTree(T)。T) { printf(Please input the deleted book39。 scanf(%d, amp。 tmp = SearchBTree(T, book)。 if ( == 0) printf(The book doesnot in the Library..\n)。 } //3》借閱 void BorrowBook (BTree amp。s isbn..)。)。 if ( == 0) printf(The book doesnot in the Library..\n)。 } else { int id, j。 scanf(%d, amp。 j = ++reader[id].。 printf(Please input the date you borrow it..(20202024))。reader[id].date[j].borrow_date)。 key[].stand_stocks。 } // else } // else } // BorrowBook //4》歸還 void ReturnBook (BTree amp。s isbn..)。)。 if ( == 0) printf(The book doesnot in the Library..\n)。 printf(Please input your Library_Card_ID..)。id)。 key[].stand_stocks++。 } // else } // ReturnBook int main() { int key。 do { printf(\n\n)。 printf(\t\t** A Simple Library Management System **\n)。 printf(\t\t** 1. CompileToStock 2. CleanupOfStock **\n)。 printf(\t\t** 3. BorrowBook 4. ReturnBook **\n)。 printf(\t\t** 5. PrintBTree 6. DestroyBTree **\n)。 printf(\t\t******************************************\n)。 scanf(%d, amp。 switch(key) { case 1: CompileToStock(T)。 case 2: CleanOfStocks(T)。 case 3: BorrowBook(T)。 case 4: ReturnBook(T)。 case 5: PrintBTree(T)。 case 6: DestroyBTree(T)。 //case 3: } system(pause)。 } while (key)。
點(diǎn)擊復(fù)制文檔內(nèi)容
教學(xué)課件相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1