摘要:
//排序:/* 1、录入学生基本信息 2、直接插入排序 3、冒泡排序 4、快速排序 5、简单选择排序 6、堆排序 7、2-路归并排序 8、输出学生信息*/#include#includetypedef struct{ char name[20]; int num; int score;... 阅读全文
摘要:
//查找:#include#include#includetypedef struct{ int *elem; int length;}SStable;typedef struct SYlist{ int num; int *Key; int *start;}SYlist;void Creat... 阅读全文
摘要:
//邻接矩阵:#include#include#define MAX_VERTE_NUM 20#define Stack_size 100#define Stackincreament 10int visited[MAX_VERTE_NUM];typedef int AdjMatrix[MAX... 阅读全文
摘要:
//邻接表:#include#include#define MAX 100#define Stack_size 100#define Stackincreament 10#define MAX_VERTE_NUM 20int visited[MAX_VERTE_NUM];typedef stru... 阅读全文
摘要:
/*(1)采用下列方法之一建立二叉树的二叉链表:① 输入完全二叉树的先序序列,用#代表虚结点(空指针),如ABD###CE##F##,建立二叉树的二叉链表。② 已知二叉树的先序遍历序列和中序遍历序列,或者已知二叉树的中序遍历序列和后序遍历序列,建立二叉树的二叉链表。③ 将一棵二叉树的所有结点存储... 阅读全文
摘要:
//顺序表:#include#include#define maxlength 20#define listincreament 10typedef struct { int *elem; int length; int listsize;}sqlist;void T_creat(sqlist ... 阅读全文
摘要:
//链表操作:#include#includetypedef struct pNode{ int data; struct pNode *next;}*linklist,node;void creat(linklist &la,int n){ linklist p,pre; la=(linkli... 阅读全文
摘要:
//括号匹配:#include#include#define Stack_size 100#define Stackincreament 10typedef struct{ char *base; int top; int stacksize;}sqstack;void initstack(sq... 阅读全文
摘要:
//进制转换:#include#include#define Stack_size 100#define Stackincreament 10typedef struct{ int *base; int top; int stacksize;}sqstack;void initstack(sqs... 阅读全文