随笔分类 - AUSTOj
摘要:#include <stdio.h> #define MAXSIZE 20 //记录最大个数typedef struct{int data[MAXSIZE+1]; //data[0]可闲置或作监视哨int length; //顺序表长度}SqList; //创建顺序表void CreateSqLis
阅读全文
摘要:#include <stdio.h>#include <malloc.h>#include <algorithm>using namespace std; //顺序存储结构typedef struct{ int *elem; //指向数据元素基址,0号不存元素 int length;}SSTable
阅读全文
摘要:#include <stdio.h>#include <malloc.h>#include <string.h> #define MaxVex 10 //假设当前顶点数最多为10个int visited[MaxVex]; //用来存放当前顶点是否遍历过 //*****定义邻接矩阵****typede
阅读全文
摘要:#include <stdio.h>#include <malloc.h>#include <stdlib.h> using namespace std; typedef char ElemType; //定义二叉树结点值的类型为字符型 //全局变量int LEAFCOUNT=0;int NODEC
阅读全文
摘要:#include <stdio.h>#include <malloc.h>#define MAXQSIZE 10 //最大队列长度,实际使用MAXQSIZE-1 typedef int ElemType; //1.循环队列(☆☆☆☆少用一个存储单元☆☆☆☆☆)typedef struct{ // 补
阅读全文
摘要:#include<stdio.h> //若用printf,scanf,getchar,putchar,gets,puts函数需包含该头文件#include<malloc.h> //用malloc,free,realloc函数需包含该头文件#define MAXSIZE 100 //初始分配存储空间#
阅读全文
摘要:LinkList可以定义指向List的指针 1.当函数参数为LinkList L时,意味着只改变或操作List的内容,而不需要改变L这个指针 如 Status GetElem(LinkList L,int i,ElemType) 2.当参数为LinkList &L时,意味着需要改变或操作L这个指针本
阅读全文
摘要:#include<stdio.h> //若用printf,scanf,getchar,putchar,gets,puts函数需包含该头文件#include<malloc.h> //用malloc,free,realloc函数需包含该头文件#define MAXSIZE 100 //设线性表初始分配空
阅读全文
摘要:#include<stdio.h> //若用printf,scanf,getchar,putchar,gets,puts函数需包含该头文件#include<malloc.h> //用malloc,free,realloc函数需包含该头文件#define MAXSIZE 100 //设线性表初始分配空
阅读全文
摘要:以下代码是我根据老师提供的部分源码及自我的认知补充注释 #include<stdio.h> //头文件#include<malloc.h> //malloc,free,realloc函数头文件#define MAXSIZE 100 //设线性表初始分配空间大小typedef int ElemType
阅读全文