- 博客(2)
- 收藏
- 关注
原创 链表的冒泡和插入排序
冒泡:注意代码的两个位置 每一趟(外循环)都从首节点开始找 每一次(内循环)比较后链表后移 void BubbleSortLink(LinkList *L) //交换结点数据域---冒泡排序实现 { int len = LenLink(L);//获取链表长度 LinkList *p = NULL; int i, j, temp; for (i = 0; i < len - 1; i++) { p = L->next;//位置1
2021-08-05 08:37:15
120
1
原创 银行家算法
银行家算法实现 #include <stdio.h> #include <stdlib.h> #define true 1 #define false 0 int Nprocess; int Nresourse; typedef int bool; int Available[100] = {0}; //可申请各类资源数量 int Max[100][100] = {0}; //最大需求矩阵 int Allocation[100][100] = {0}.
2020-12-09 20:01:32
137
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人