摘要: /* ****************二叉树有关算法*************** */#include "stdio.h" #include "conio.h" #include "stdlib.h" #define stackinitsize 100 #define OK 1 #define ERROR 0 #define OVERFLOW -1 typedef int TElemType ; typedef int Status; //一一一一一二叉树的二叉链表存储表示一一一一一 typedef struct BiTNode{ 阅读全文
posted @ 2013-11-26 20:44 博园少主 阅读(214) 评论(0) 推荐(0) 编辑
摘要: #include "stdio.h"#include "stdlib.h"#define OVERFLOW -1#define ERROR -1#define OK 1typedef char Elemtype;typedef int Status;typedef struct BitNode{ Elemtype data; struct BitNode *lchild,*rchild;}bitnode ,*Bitree;Status creatbitree(Bitree &t){ char ch; scanf("%c",&a 阅读全文
posted @ 2013-11-26 20:30 博园少主 阅读(208) 评论(0) 推荐(0) 编辑
摘要: void Insert_Sort(RecType R[],int n) { int i,j; for(i=2;i0&&(R[0].keya[j].key){ int temp=a[i].key; a[i].key=a[j].key; a[j].key=temp; } } } printf("冒泡排序:\n");for(int k=1;k=pivotkey)-- high; // 从右向左搜索R[low] = R[high];while (low= R[j].key ) break; R[s] = R[j]; s = j; }R[s] =... 阅读全文
posted @ 2013-11-26 18:08 博园少主 阅读(217) 评论(0) 推荐(0) 编辑