![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构
冰镇苏打水
这个作者很懒,什么都没留下…
展开
-
Linux
int lsbZero(int x) { return 11111111110&x; }原创 2017-11-08 03:03:00 · 132 阅读 · 0 评论 -
顺序队列的实现
#include #include typedef int ElementType; //定义队列元素类型 struct Queue{ ElementType *Data; //数据数组 int Front, Rear; //队列头、尾指原创 2017-11-10 22:03:02 · 173 阅读 · 0 评论 -
链式堆栈
#include #include typedef struct SNode * Pointer; struct SNode { int data; Pointer next; }; Pointer CreateStack(); Pointer Push(int x, Pointer S); int IsEmpty(Pointer S); int Pop(Pointer S);原创 2017-11-02 20:21:18 · 158 阅读 · 0 评论 -
顺序堆栈(数组)
#include #include typedef struct Stack * SNode; struct Stack{ int *Data; //储存数据的数组 int Top; //指针当前停留位置 int MaxSize; //数组最大值 }; SNode CreateStack(int MaxSize); /原创 2017-11-01 15:00:08 · 198 阅读 · 0 评论 -
PTA 两个有序链表序列的合并
02-线性结构1 两个有序链表序列的合并(15 分) 本题要求实现一个函数,将两个链表表示的递增整数序列合并为一个非递减的整数序列。 函数接口定义: List Merge( List L1, List L2 ); 其中List结构定义如下: typedef struct Node *PtrToNode; struct Node { ElementType Dat原创 2017-11-15 22:16:48 · 1827 阅读 · 0 评论 -
树的创建及层序先中后序遍历
#include #include"Queue.h" typedef BinTree Element; //定义队列元素类型 typedef int ElementType; typedef struct TNode *BinTree; struct TNode { ElementType data; BinTree left原创 2017-11-25 18:56:59 · 188 阅读 · 0 评论