上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 31 下一页
摘要: #include <stdio.h> //最小值 //选择算法递归实现 //原理:每次从a[i]~a[n]中选择一个最大值/最小值放到序列首部(得到最值的方法时比较), //这样当i=n-1时正好求得一个排序序列 //时间复杂度分析:设原问题时间复杂度位T(n),共分成了1个子问题 //则T(n)= 阅读全文
posted @ 2021-04-29 23:30 nanfengnan 阅读(61) 评论(0) 推荐(0)
摘要: #include <stdio.h> //汉诺塔递归实现 void move(int n,char a,char b,char c) { if (n == 1) printf("\t%c->%c \n",a,c); //一个盘子直接从a挪到c else { move(n-1,a,c,b); //把n 阅读全文
posted @ 2021-04-27 00:55 nanfengnan 阅读(56) 评论(0) 推荐(0)
摘要: 1.操作系统定义 操作系统是一组能有效地组织和管理计算机硬件和软件资源,合理地对各类作业进行调度,以方便用户使用的程序的集合。 2.操作系统的目标 1.方便性 使计算机系统更容易使用2.有效性 提高系统资源利用率 提高系统吞吐量3.可扩充性 采用微内核结构和C/S模式,以便于增加新功能和修改老功能4 阅读全文
posted @ 2021-04-25 23:50 nanfengnan 阅读(100) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <stdlib.h> #define Maxsize 100 typedef char ElemType; //二叉树的链式存储结构 typedef struct BitNode { ElemType data; struct BitNode 阅读全文
posted @ 2021-04-15 22:19 nanfengnan 阅读(109) 评论(0) 推荐(0)
摘要: //字符串的模式识别算法 //BF算法 标签:暴力匹配算法,回溯法,穷举法的应用 思想:主串指针回溯 int IndexString(SqString S,SqString T) { int i=0,j=0; //这里面有一个代码的技巧 ,遇到两个有长度的序列比较,用while,判断他们长度,出去不 阅读全文
posted @ 2021-04-07 09:23 nanfengnan 阅读(95) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <stdlib.h> /* * 给出RNL,RLN,NRL是为了,有更多解决问题的方法 */ typedef struct node { char data; struct node *lchild,*rchild; }*BitTree,Bit 阅读全文
posted @ 2021-03-31 17:48 nanfengnan 阅读(123) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <stdlib.h> /* * 给出RNL,RLN,NRL是为了,有更多解决问题的方法 */ typedef struct node { char data; struct node *lchild,*rchild; }*BitTree,Bit 阅读全文
posted @ 2021-03-31 17:30 nanfengnan 阅读(72) 评论(0) 推荐(0)
摘要: #include <stdio.h> //兔子繁殖问题 /* * 问题描述: * 有一对小兔子,从出生起第3个月起每个月都生一对小兔子. * 小兔子长到三个月后每个月又生一对兔子,按此规律,设第一个月有一对刚出生的兔子, * 问第n个月后有多少对兔子. * * 1.分析 * 第一个月-第10个月: 阅读全文
posted @ 2021-03-31 11:48 nanfengnan 阅读(981) 评论(0) 推荐(0)
摘要: #include <stdio.h> //斐波那契数列的非递归实现 int f(int n) { int a,b,sum; sum=0; a=1;b=1; if (n==1||n==2) return 1; for (int i = 2; i < n; ++i) { sum=a+b; a=b; b= 阅读全文
posted @ 2021-03-31 11:25 nanfengnan 阅读(407) 评论(0) 推荐(0)
摘要: 1.分层 面对复杂的系统时,一个比较好的方法是分层次地描绘这个系统 核心思想 分层 1.首先用一张高层次的系统流程图描绘系统总体概貌,表明系统的关键功能. 2.然后分别把每个关键功能扩展到适当的详细程度,画在单独的一页纸上 2.数据流图(Data Flow Graph Data) 数据流图是一种图形 阅读全文
posted @ 2021-03-30 09:17 nanfengnan 阅读(530) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 31 下一页