顺序表
typedef struct{
elemtype elem[maxsize];
int length;
}Seqlist;
链表
typedef struct node {
Datatype data;
struct node* next;
}Lnode,*Linklist;
顺序栈
typedef struct {
elemtype elem[maxsize];
int top;
}Seqstack;
链栈
typedef struct Stacknode {
Datatype data;
struct Stacknode* next;
}slStackytpe;
循环队列
typedef struct {
elemtype elem[maxsize];
int front,rear,length;
}CCeQuene;
链队列
typedef struct node {
Datatype data;
struct node* next;
}QNode;
typedef struct {
QNode* front;
QNode* rear;
}LQNode;
顺序存储二叉树
typedef struct {
elemtype elem[maxsize+1];
int nodemax;
}Bitree;
二叉链表
typedef struct node {
Datatype data;
struct node* lchild;
struct node* rchild;
}*BItree;
邻接矩阵
typedef struct {
int arc[max][max];
Vextype vex[max];
int vexnum;
int arcnum;
}AdjM;
邻接表
typedef struct arcnode {
int vex;
//int weight;
struct arcnode* next;
}arcnode;
typedef struct vexnode {
char vexdata;
struct arcnode* head;
}vexnode;
typedef struct {
vexnode vervex[max];
int numvex;
int arcnum;
}AdjL;