上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 77 下一页
摘要: 示例代码 : /** * 基数排序-单链表实现 */ #include <stdio.h> #include <stdlib.h> #include <time.h> #define Error(Str) FatalError(Str) #define FatalError(Str) fprintf 阅读全文
posted @ 2020-08-21 15:56 1点 阅读(248) 评论(0) 推荐(0) 编辑
摘要: 示例: 合并方法: 示例代码: #include <stdio.h> #define LEN 8 // 合并 void merge(int a[], int start, int mid, int end) { int n1 = mid - start + 1; int n2 = end - mid 阅读全文
posted @ 2020-08-20 16:14 1点 阅读(607) 评论(0) 推荐(0) 编辑
摘要: 按钮: <el-button type="primary" @click="exportBtn" class="ml20">导出</el-button> 方法:先调接口 exportBtn(){ if(this.tableData.length 0 ){ this.$message.error('暂 阅读全文
posted @ 2020-08-20 14:06 1点 阅读(922) 评论(0) 推荐(0) 编辑
摘要: 代码: #include <stdio.h> typedef int ElementType; int arr1[11] = {0, 2, 87, 39, 49, 34, 62, 53, 6, 44, 98}; #define LeftChild(i) (2 * (i) + 1) void Swap 阅读全文
posted @ 2020-08-20 11:02 1点 阅读(535) 评论(0) 推荐(0) 编辑
摘要: 在上文构建好2叉堆后 进行堆排序 在堆创建好后,每次取出堆顶元素,并且调整堆,把堆顶元素放在数组最后即可。 我们将堆顶元素与堆的最后一个元素进行交换 得到 此时要进行调整 调整都是从父节点、左孩子节点、右孩子节点三者中选择最大者跟父节点进行交换 对 3 17 8 进行调整 得到 还不符合 对 3 7 阅读全文
posted @ 2020-08-20 10:11 1点 阅读(271) 评论(0) 推荐(0) 编辑
摘要: 初始堆:堆排序是一颗完全 2 叉树 整形数组a[]={16,7,3,20,17,8} 按照完全2 叉树进行排序 得到 (1) 从非叶子节点开始调整 由于 20 7 17 这个小堆20 最大 我们把 20 提到 父节点 (2)由于在 堆 20 16 8 中 20 最大 我们提到跟节点 得到 (3)在 阅读全文
posted @ 2020-08-19 16:47 1点 阅读(8228) 评论(0) 推荐(0) 编辑
摘要: 转发: http://c.biancheng.net/cpp/html/2741.html #include <stdio.h> #include <stdlib.h> #define N 6 int partition(int arr[], int low, int high){ int key; 阅读全文
posted @ 2020-08-18 16:23 1点 阅读(1337) 评论(0) 推荐(0) 编辑
摘要: 代码: /* * @Author: your name * @Date: 2020-07-31 15:22:01 * @LastEditTime: 2020-08-18 13:51:39 * @LastEditors: your name * @Description: In User Settin 阅读全文
posted @ 2020-08-18 14:23 1点 阅读(262) 评论(0) 推荐(0) 编辑
摘要: https://github.com/zenorocha/clipboard.js 示例 <p class="mt30 url" >csccscs</p> <div class="moblie-inside-information textCenter"> <img src="/web/images 阅读全文
posted @ 2020-08-17 17:30 1点 阅读(207) 评论(0) 推荐(0) 编辑
摘要: 代码: #include <stdio.h> #include <stdbool.h> void BinaryInsertSort(int *a, int n) { int i, j, k, low, high, m; for (i = 1; i < n; i++) { low = 0; high 阅读全文
posted @ 2020-08-17 11:36 1点 阅读(288) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 77 下一页