数据结构
文章平均质量分 78
xiaochaocnn
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
递归的创建和访问二叉树
#include#includetypedef char TElemType;typedef int status;typedef struct BiTNode{ TElemType data;//树的节点的值 struct BiTNode *lchild,*rchild;//定义树的左孩子指针和右孩子指针}BiTNode,*BiTree;//先序创建二叉树status原创 2013-04-25 21:44:07 · 437 阅读 · 0 评论 -
集合的交并差链式表示
#include#includetypedef struct ListNode{int data;struct ListNode *next;}ListType;//创建ListType *createlist(int n){// int n;ListType *head,*s,*r;head=(ListType *)malloc(sizeof(ListType原创 2013-04-21 09:37:29 · 957 阅读 · 0 评论 -
数据结构之顺序表(集合的交并差)
//c语言#include#include#define LIST_INIT_SIZE 100 //线性表存储空间的初始分配量#define LISTINCREASE 10 // 线性表存储空间的分配增量typedef int ElemType;typedef int Status;typedef struct{ ElemType *elem;/* 存储空间的首地址 */原创 2013-03-24 10:34:17 · 4948 阅读 · 2 评论 -
停车场管理系统(用栈和队列实现)
#include#include#include#define True 1#define False 0#define ok 1#define Error 0#define Infeasible -1#define Overflow -2#define price 0.05//--*-*-*-*-*-*-*-*-车辆信息定义*-*-*-*-*-*-*//typedef原创 2013-04-21 09:34:30 · 3083 阅读 · 0 评论 -
最小生成树(普里姆算法)
#include#include#include#include //#define INFINITY INT_MAX//用整型最大值代替无穷大#define MAX_VERTEX_NUM 20//最大的顶点的个数#define MAX_NAME 3//定点字符串的最大长度+1typedef int VRType;typedef char VertexType[MAX_NAME]原创 2013-05-17 16:28:11 · 707 阅读 · 0 评论 -
图的深度遍历和广度遍历
#include#include#include "queue.h"#define MAX_VERTEX_NUM 20typedef int VertexType;typedef struct ArcNode{ int adjvex;//该弧所指向的顶点的位置 struct ArcNode *nextarc;//指向下一条弧的指针}ArcNode;typedef struc原创 2013-05-17 16:26:11 · 920 阅读 · 0 评论
分享