- 博客(8)
- 资源 (1)
- 收藏
- 关注
原创 图的建立总结
#include <stdio.h> #include <stdlib.h> #define MAXVEX 20 typedef char VertexType; typedef int EdgeType; typedef struct EdgeNode{ int adjvex; // EdgeType weight;//权值 struct EdgeNode * ne
2015-12-19 20:51:30 409
原创 图的建立
#include <stdio.h> #include <stdlib.h> #define MAXVEX 20 typedef char VertexType; typedef int EdgeType; typedef struct EdgeNode{ int adjvex; // EdgeType weight;//权值 struct EdgeNode * ne
2015-12-19 20:21:58 482
原创 二叉树Q
#include <stdio.h> #include <stdlib.h> typedef char TElmType; typedef struct BiNode{ TElmType data; struct BiNode *lchild,*rchild; }BiTNode,*BiTree;void CreateBiTree(BiTree *T) { TElmType c
2015-12-17 23:09:28 336
原创 求二叉树的深度
int Depth(BiTree *T) { int d=0; if (*T) { int ld = Depth(&((*T)->lchild)); int rd = Depth(&((*T)->rchild)); d = ld >= rd ? (ld+1) : (rd+1); } return d; } ld和rd在这
2015-12-17 22:42:21 208
原创 删除一棵树
void DestroyBiTree(BiTree *T) { if (*T) { if ((*T)->lchild) DestroyBiTree(&((*T)->lchild)); if ((*T)->rchild) DestroyBiTree(&((*T)->rchild)); free(*T);
2015-12-17 21:18:53 929 1
原创 二叉树二叉树虐我千万遍劳资今天终于搞明白了哈哈哈哈哈
#include <stdio.h> #include <stdlib.h> typedef char TElmType; typedef struct BiNode{ TElmType data; struct BiNode *lchild,*rchild; }BiTNode,*BiTree; void CreateBiTree(BiTree *T) { TElmType
2015-12-17 17:26:50 458
原创 链表222222222222222
#include <stdio.h> #include <malloc.h>typedef struct node { int data; struct node * next; }Node;int main() { Node * Head; Node * q; Node * last; Node * delet; Head = (Node*)
2015-12-17 08:32:41 327
原创 栈栈栈栈栈栈栈栈栈栈栈栈栈栈栈栈栈栈栈栈栈栈栈栈栈栈栈
#include <stdio.h> #include <malloc.h> #include <stdlib.h>typedef struct node { int * base; int * top; int stacksize; }Sqstack; void InitStack(Sqstack *S) { S->base = (int *)malloc(size
2015-12-17 08:30:45 2220
aes算法的c实现
2011-04-17
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人