算法
qq_28161649
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
C语言链表
// list.h头文件 #ifndef _List_H struct Node; typedef struct Node *PtrToNode; typedef PtrToNode List; typedef PtrToNode Position; List MakeEmpty(List L); int IsEmpty(List L); int IsLast(Position原创 2017-10-31 12:36:48 · 206 阅读 · 0 评论 -
数据结构与算法分析生成N节点随机二叉查找树
/*生成n节点随机二叉查找树,该树具有从1到n的不同关键字*/ #include #include typedef struct Node *Position; typedef struct Node *Tree; Tree makeRandomTree(int lower,int upper); void printTree(Tree T); int RandInt(int i原创 2017-11-21 15:15:27 · 984 阅读 · 0 评论 -
数据结构预算法分析计算后缀表达式(可计算小数)
/*计算后缀表达式(加强版),可运算‘+ - * /’可以多位数并且可以带小数进行运算,两个运算数据之间用空格隔开,如:1.1 2.2+ 遇到#符号,运算结束 打印运算结果*/ //头文件 #ifndef _Three19a_H typedef struct Node *PtrToNode; typedef PtrToNode Stack; typedef PtrToNode Posi原创 2017-11-15 12:59:04 · 1054 阅读 · 0 评论 -
数据结构与算法分析计算后缀表达式
//头文件 #ifndef _Three19_H typedef struct Node *PtrToNode; typedef PtrToNode Stack; typedef PtrToNode Position; Stack CreateStack(); int PopTop(Stack s); void Push(Stack s,char c); struct Node原创 2017-11-14 18:29:30 · 373 阅读 · 0 评论 -
数据结构与算法分析语言平衡符号
/*语言平衡符号*/ #include #include #include "three18.h" //建栈 Stack CreateStack() { Stack s; s=(Stack)malloc(sizeof(struct Node)); if(s==NULL) { printf("error");原创 2017-11-14 17:03:18 · 776 阅读 · 0 评论 -
数据结构与算法分析3.3-3.5
//头文件 #ifndef _List_H typedef struct Node *PtrToNode; typedef PtrToNode List; typedef PtrToNode Position; List CreatList(void); void Insert(int i,Position p,List l); Position findPrevious(Lis原创 2017-11-07 09:29:26 · 320 阅读 · 0 评论 -
数据结构与算法分析3.10
/*Josephus 问题 N个人从1到N编号,围坐成一个圆圈。从1号开始传递一个热土豆。经过M次传递后拿着热土豆的人被清除离座,围坐的圆圈缩紧,由坐在被清除的人后面的人拿起热土豆继续进行游戏,最后剩下的人取胜*/ //头文件 #ifndef _Josephus_H typedef struct Node *PtrToNode; typedef PtrToNode Positio原创 2017-11-14 16:47:51 · 265 阅读 · 0 评论 -
c语言栈
//头文件 #ifndef _Stack_h struct Node; typedef struct Node *PtrToNode; typedef PtrToNode Stack; int IsEmpty(Stack S); Stack CreateStack(void); void DisposeStack(Stack S); void MakeEmpty(Stack S原创 2017-11-01 20:12:20 · 219 阅读 · 0 评论 -
数据结构与算法分析中缀变后缀
//头文件 #ifndef _Three20_H typedef struct Node *PtrToNode; typedef PtrToNode Stack; typedef PtrToNode Position; Stack CreateStack(); char PopTop(Stack s); void Push(Stack s,char c); struct Nod原创 2017-11-15 14:11:48 · 327 阅读 · 0 评论
分享