摘要:
#include "stdio.h"#includetypedef struct BSTreeNode{ int m_nValue; struct BSTreeNode *m_pLeft; struct BSTreeNode *m_pRight; }BSTreeNode,*BStd;BSTre... 阅读全文
摘要:
#include "stdio.h"#includetypedef struct BSTreeNode{ int m_nValue; struct BSTreeNode *m_pLeft; struct BSTreeNode *m_pRight; }BSTreeNode,*BStd;BSTre... 阅读全文
摘要:
#include/**选择类排序,每天一道算法题 *按照从小到大的顺序进行排序 * *///遍历序列void traverseArray(int *p,int length){ int i=0; for(;ip[j]) index=j; } temp=p[i... 阅读全文
摘要:
#include/**交换类排序,每天一道算法题 *按照从小到大的顺序进行排序 * 毛施平*///冒泡排序 void traverseArray(int *p,int length){ int i=0; for(;i1) { lastChangeIndex=1; for(j=0;... 阅读全文
摘要:
#include/** 插入排序算法 每天一道算法题 */void traverseArray(int *p,int length){ int i=0; for(;i-1&&temptemp) high=m-1; else low=m+1; ... 阅读全文
摘要:
#include#include#define MAX_VERTEX_NUM 10typedef char VertexType;typedef struct ArcNode//边 { int adjvex; struct ArcNode *nextarc; in... 阅读全文
摘要:
#include#include#define MAX_VERTEX_NUM 20 typedef struct ArcBox{ int tailvex,headvex;//该弧的头和尾定点的位置 struct ArcBox *hlink,*tlink;//分别为弧头和弧尾相同的弧的链域 int *... 阅读全文
摘要:
#include#include#define MAXSIZE 20typedef char TEelemtype;typedef struct BiTNode{TEelemtype data;struct BiTNode *lchild,*rchild;}BiTNode,*BiTree;//队列... 阅读全文
摘要:
第一次在博客园写博客,因为在准备找工作,复习数据结构和算法部分,现在将实现的代码贴出来,欢迎勘误。 1 //线索二叉树的相关操作 2 #include 3 #include 4 typedef char TElemtype; 5 typedef enum {Link,Thread} Poi... 阅读全文
|