摘要: #include "stdio.h" int Fbi(int i) /* 斐波那契的递归函数 */{ if( i < 2 ) return i == 0 ? 0 : 1; return Fbi(i - 1) + Fbi(i - 2); /* 这里Fbi就是函数自己,等于在调用自己 */} int m 阅读全文
posted @ 2017-10-06 10:36 真勇士王小山 阅读(1576) 评论(0) 推荐(0) 编辑
摘要: #include "stdio.h" #include "stdlib.h" #include "io.h" #include "math.h" #include "time.h" #define OK 1#define ERROR 0#define TRUE 1#define FALSE 0#de 阅读全文
posted @ 2017-10-06 10:31 真勇士王小山 阅读(315) 评论(0) 推荐(0) 编辑
摘要: #include "stdio.h" #include "stdlib.h" #include "io.h" #include "math.h" #include "time.h" #define OK 1#define ERROR 0#define TRUE 1#define FALSE 0#de 阅读全文
posted @ 2017-10-06 10:26 真勇士王小山 阅读(437) 评论(0) 推荐(0) 编辑
摘要: #include "stdio.h" #include "stdlib.h" #include "io.h" #include "math.h" #include "time.h" #define OK 1#define ERROR 0#define TRUE 1#define FALSE 0#de 阅读全文
posted @ 2017-10-06 10:21 真勇士王小山 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 双向链表 p->next->prior = p = p- >prior- >next 阅读全文
posted @ 2017-10-06 10:13 真勇士王小山 阅读(167) 评论(0) 推荐(0) 编辑
摘要: #include "string.h"#include "ctype.h" #include "stdio.h" #include "stdlib.h" #include "io.h" #include "math.h" #include "time.h" #define OK 1#define E 阅读全文
posted @ 2017-10-06 09:47 真勇士王小山 阅读(218) 评论(0) 推荐(0) 编辑
摘要: 1 首先://注意在C和C++里不同 在C中定义一个结构体类型要用 typedef: typedef struct Student { int a; } Stu; 于是在声明变量的时候就可:Stu stu1;(如果没有typedef就必须用struct Student stu1;来声明)这里的Stu 阅读全文
posted @ 2017-10-06 09:25 真勇士王小山 阅读(664) 评论(0) 推荐(0) 编辑
摘要: #include "stdio.h" #include "string.h"#include "ctype.h" #include "stdlib.h" #include "io.h" #include "math.h" #include "time.h" #define OK 1#define E 阅读全文
posted @ 2017-10-06 01:02 真勇士王小山 阅读(3813) 评论(0) 推荐(0) 编辑
摘要: 描述顺序存 结构需要3 个属性:• 存储空间的起始位置:数组 • 线性表的最大存储容量的数组长度 • 线性表的当前长度 LOC(ai)= LOC(ai) + (i-l)*c #include "stdio.h" #include "stdlib.h" #include "io.h" #include 阅读全文
posted @ 2017-10-06 00:07 真勇士王小山 阅读(559) 评论(0) 推荐(0) 编辑
摘要: 一,时间复杂度T 1. 用常数 取代运行时时中的所有加法常数2.在修改后的运行次中,只保留最高阶项3. 如果最高阶项存在且不是 ,则去除与这个项相乘的常敢 n n方 常数阶,线性阶,对数阶,平方阶,nlogn阶,立方阶,指数阶 对算法的分析 一种方法是计算所有情况的平均值,这种时间复杂度 计算方法称 阅读全文
posted @ 2017-10-05 17:59 真勇士王小山 阅读(173) 评论(0) 推荐(0) 编辑