会员
周边
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
董晓算法
博客园
首页
新随笔
联系
订阅
管理
2026年11月10日
红黑树_代码
摘要: 红黑树_代码_哔哩哔哩_bilibili // 红黑树1(哨兵版,C++,引用传参,双旋、单旋分开写) #include <stdio.h> #include <stdlib.h> typedef enum { RED, BLACK } Color; // 红黑树结点 (三叉链表) typedef
阅读全文
posted @ 2026-11-10 08:31 董晓
阅读(24)
评论(0)
推荐(0)
2026年11月3日
平衡二叉树_代码
摘要: 平衡二叉树_代码_哔哩哔哩_bilibili // 平衡二叉树1(结点存平衡因子,C++:引用传参) #include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <limits.h> // 平衡因子宏定义 #define
阅读全文
posted @ 2026-11-03 07:43 董晓
阅读(24)
评论(0)
推荐(0)
2026年11月1日
二叉搜索树_代码
摘要: 二叉搜索树_代码_哔哩哔哩_bilibili // 二叉搜索树1(递归版,C++:指针引用传参,删除:用指针摘除后继) #include <stdio.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> //二叉搜索树结点定
阅读全文
posted @ 2026-11-01 09:13 董晓
阅读(18)
评论(0)
推荐(0)
2026年10月30日
分块查找
摘要: 分块查找_哔哩哔哩_bilibili /* * 分块查找(索引顺序查找) * * 适用条件:查找表"分块有序" * ① 块内无序:每一块内部记录的关键字可任意排列; * ② 块间有序:后一块所有记录的关键字均大于前一块的最大关键字; * ③ 索引表按各块最大关键字 maxkey 递增有序。 * *
阅读全文
posted @ 2026-10-30 07:33 董晓
阅读(14)
评论(0)
推荐(0)
2026年10月29日
折半查找
摘要: 折半查找_哔哩哔哩_bilibili // 折半查找 O(logn) #include<stdio.h> #include<stdlib.h> #include<stdbool.h> //顺序查找表定义 typedef struct{ int *elem; int Len; }SSTable; //
阅读全文
posted @ 2026-10-29 10:41 董晓
阅读(14)
评论(0)
推荐(0)
2026年10月28日
顺序查找
摘要: 顺序查找_哔哩哔哩_bilibili // 顺序查找 O(n) #include<stdio.h> #include<stdlib.h> //顺序表定义 typedef struct{ int *elem; //动态数组基址 int Len; //表的长度 }SSTable; //顺序查找 int
阅读全文
posted @ 2026-10-28 10:30 董晓
阅读(19)
评论(0)
推荐(0)
2026年10月27日
关键路径_代码
摘要: 关键路径_代码_哔哩哔哩_bilibili //关键路径 O(V+E) C++编译 #include<stdio.h> #include<stdlib.h> #include<stdbool.h> #define MAXV 100 //最大顶点数 #define MAXA 1000 //最大弧数 /
阅读全文
posted @ 2026-10-27 08:36 董晓
阅读(14)
评论(0)
推荐(0)
2026年10月25日
拓扑排序_代码
摘要: 拓扑排序_代码_哔哩哔哩_bilibili // 拓扑排序 O(V+E) C++编译 #include<stdio.h> #include<stdlib.h> #include<stdbool.h> #define MAXV 1000 //最大顶点数 //////////////////////链栈
阅读全文
posted @ 2026-10-25 08:05 董晓
阅读(18)
评论(0)
推荐(0)
2026年10月21日
最短路径_Floyd 算法_代码
摘要: 最短路径_Floyd 算法_代码_哔哩哔哩_bilibili // Floyd 算法模板 O(n^3) 路径递归输出 #include<stdio.h> #include<stdlib.h> #include<stdbool.h> #define INF 1e9 #define MAXV 110 i
阅读全文
posted @ 2026-10-21 11:15 董晓
阅读(21)
评论(0)
推荐(0)
2026年10月20日
最短路径_Dijkstra 算法_代码
摘要: 最短路径_Dijkstra 算法_代码_哔哩哔哩_bilibili // Dijkstra 算法模板 O(n^2) #include<stdio.h> #include<stdlib.h> #include<stdbool.h> #define MAXV 1000 #define INF 21474
阅读全文
posted @ 2026-10-20 08:24 董晓
阅读(30)
评论(0)
推荐(0)
下一页