摘要: 1 //---------有向图的十字链表表存储表示------- 2 3 #include 4 #include 5 6 #define MAX_VERTEXT_NUM 20 7 8 typedef int InfoType; 9 typedef char VertextType; 10 11 typedef struct ArcBox 12 { 13 int headVex; 14 int tailVex; 15 struct ArcBox *headLink; 16 struct ArcBox *tailLink; 17 ... 阅读全文
posted @ 2013-11-25 13:22 若。只如初见 阅读(3340) 评论(0) 推荐(0) 编辑
摘要: 1 #define _CRT_SECURE_NO_WARNINGS 2 #include 3 #include 4 #include 5 6 #define MAX_SIZE 255 // 定义字符串的最大长度 7 8 typedef unsigned char SString[MAX_SIZE]; //数组第一个保存长度 9 //BF 10 int BFMatch(char *s,char *p) 11 { 12 int i,j; 13 i=0; 14 while(i < strlen(s)) 15 { 16 ... 阅读全文
posted @ 2013-11-25 12:41 若。只如初见 阅读(276) 评论(0) 推荐(0) 编辑
摘要: //---------图的邻接表存储表示-------#include#include#define MAX_VERTEXT_NUM 20typedef int InfoType;typedef char VertextType;typedef struct ArcNode{ int adjvex; struct ArcNode *nextArc; InfoType *info;}ArcNode;typedef struct VNode{ VertextType data; ArcNode *firstArc;}VNode, AdjList[MAX_VERTEXT... 阅读全文
posted @ 2013-11-25 12:36 若。只如初见 阅读(552) 评论(0) 推荐(0) 编辑