摘要: 讲了一个快速排序, 利用分治思想, 看完感觉和归并有点像. 接下来准备看看算法还有不少书. 感觉数据结构和算法就能看很久了... #include <stdio.h> void QuickSort(int* a, int low, int high); int FindPos(int* a, int 阅读全文
posted @ 2025-06-14 00:28 鲲特牌 阅读(6) 评论(0) 推荐(0)
摘要: 这两天看完了树, 可惜没讲图. 接下来还找了一堆课和教材. 也不知道那个好一些. 写了一个静态的树, 讲了先序中序和后序. #include <stdio.h> #include <stdlib.h> struct BTNode { char data; struct BTNode* pLchild 阅读全文
posted @ 2025-06-14 00:25 鲲特牌 阅读(6) 评论(0) 推荐(0)
摘要: 前两天看的递归, 一直没发文章. 写了三个小程序用于理解递归的含义. // 递归 求阶乘 #include<stdio.h> long recurise(long num) { if (1 == num) return 1; else return recurise(num-1) * num; } 阅读全文
posted @ 2025-06-14 00:21 鲲特牌 阅读(5) 评论(0) 推荐(0)