c数据结构
c数据结构
Y.Z-Rus
这个作者很懒,什么都没留下…
展开
-
C单链表
参考书 <<c语言数据结构和算法>> 清华大学出版社 #include <stdio.h> typedef int ElemType; typedef struct Node { ElemType data; struct Node* next; } Node; typedef struct LINKLIST { int length; ...原创 2019-09-04 13:03:45 · 105 阅读 · 0 评论 -
C双向链表
#include <stdio.h> typedef int ElemType; typedef struct Node { ElemType data; struct Node* next; struct Node* prior; }Node; typedef struct DoubleList { int length; Node header; }Doubl...原创 2019-09-04 13:06:29 · 94 阅读 · 0 评论 -
C单循环链表
#include <stdio.h> typedef int ElemType; typedef struct Node { ElemType data; struct Node* next; }Node; typedef struct CircleList { int length; Node header; }CircleList; void InitList(Cir...原创 2019-09-04 13:09:03 · 129 阅读 · 0 评论 -
C循环双链表
#include <stdio.h> #include <stdlib.h> typedef int ElemType; typedef struct Node { int data; struct Node* prior; struct Node* next; }Node; typedef struct circle_doublelist { Node hea...原创 2019-09-04 13:10:47 · 87 阅读 · 0 评论 -
C顺序栈
#include <stdio.h> #define MAXSIZE 100 typedef struct SqStack { void* data[MAXSIZE]; int top; }SqStack; void InitStack(SqStack* ); int StackEmpty(SqStack* ); int StackLength(SqStack* ); void...原创 2019-09-04 13:12:24 · 87 阅读 · 0 评论 -
C链式栈
#include <stdio.h> typedef struct Node { struct Node* next; }Node; typedef struct StackNode { Node node; void* data; }StackNode; typedef struct LinkStack { int length; StackNode* top; }L...原创 2019-09-04 13:13:45 · 142 阅读 · 1 评论 -
c顺序队列
#include<stdio.h> #define MAXSIZE 100 typedef struct SqQueue { int rear; void* data[MAXSIZE]; }SqQueue; void InitQueue(SqQueue* ); int QueueEmpty(SqQueue* ); int QueueLength(SqQueu* ); void ...原创 2019-09-04 13:14:58 · 141 阅读 · 0 评论 -
c链式队列
#include <stdio.h> typedef struct Node { struct Node* next; }Node; typedef struct QueueNode { Node P; void* data; }QueueNode; typedef struct LinkQueue { int length; QueueNode* front; Qu...原创 2019-09-04 13:16:37 · 106 阅读 · 0 评论 -
c循环队列
#include <stdio.h> #define MAXSIZE 100 typedef struct cqueue { int front; int rear; void* data[MAXSIZE]; }cqueue; void InitQueue(cqueue* ); int QueueEmpty(cqueue* ); int QueueLength(cqueue*...原创 2019-09-04 13:19:22 · 520 阅读 · 0 评论