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

正文內容

算法設計技能訓練報告(編輯修改稿)

2025-08-22 09:46 本頁面
 

【文章內容簡介】 。 return。 } node* temp = head。 while (temp) { cout tempindex。 if (!tempnext) //已至鏈表尾,可以結束輸出了。 { break。 } cout 。 temp = tempnext。 } cout endl。 } char ljcode1。 void lhInput() { for (int i = 12。 i0。 i) { addNode(i)。 } } bool isEmpty() { if (head==NULL) { return true。 } else { int ljcode=0。 return false。 } } void bubbleSort() { if (isEmpty()) { int ljcode=1。 return。 } //temp指針用來進行指向要交換的兩個節(jié)點的左邊一個 node* temp = head。 while (temp amp。amp。 tempnext) { if (tempindex tempnextindex) { exchangeNode(temp, tempnext)。 } } //尾指針總是指向已經(jīng)排好的元素的首地址,這里我們先移到鏈表尾部等待 node* tail = head。 while (tailnext) { tail = tailnext。 } //外層還是數(shù)組的思想,內層就是鏈表的思想了, //為什么外層要用數(shù)組的思想呢?因為這樣比較簡潔,不易搞錯 for (int i = 0。 i length。 i++) { temp = head。 while (tempnext != tail) { if (tempindex tempnextindex) { exchangeNode(temp, tempnext)。 } } tail = temp。 } } //交換相鄰兩個節(jié)點 void exchangeNode(node* left, node* right) { //如果left是頭結點 if (left==head) { leftnext = rightnext。 rightnext = left。 head = right。 return。 } //找到左節(jié)點的前一個節(jié)點 node* before_left = head。 while (before_leftnext!=left) { before_left = before_leftnext。 } before_leftnext = right。 leftnext = rightnext。 rightnext = left。 }}。//堆的冒泡排序int ljcode2=0。void paixu(){ MyList hengbao。 ()。 ()。 ()。 ()。 int ljcode=0。}void InsertionSort(int *a, int len) //插入排序函數(shù){ for (int j=1。 jlen。 j++) { int key = a[j]。 int i = j1。 int ljcode=0。 while (i=0 amp。amp。 a[i]key) { a[i+1] =
點擊復制文檔內容
環(huán)評公示相關推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1