2020年8月15日

各种排序(c语言)

摘要: typedef int ELemType; // 冒泡排序 void bubbleSort(ELemType arr[], int len) { int i, j, temp; for (i = 1; i < len; i++) { for (j = 0; j < len - i; j++) { i 阅读全文

posted @ 2020-08-15 00:07 哈哈哈天蝎 阅读(186) 评论(0) 推荐(0)

堆排序(c语言)

摘要: #include <stdio.h> void heapify(int arr[], int root, int len) { int L = root * 2 + 1; int R = root * 2 + 2; int maxIndex = root; int temp; // 如果L还在数组当 阅读全文

posted @ 2020-08-15 00:01 哈哈哈天蝎 阅读(270) 评论(0) 推荐(0)

导航