摘要:
/* ****************二叉树有关算法*************** */#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{ 阅读全文
摘要:
#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 阅读全文
摘要:
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] =... 阅读全文