
基础
醉雪吟霜
发现了知识的新大陆
展开
-
简单的排序应用代码实现
#include<stdio.h> #include<stdlib.h> #define NUM 5 #define TRUE 1 #define FALSE 0 #define OVERFLOW -2 #define LIST_INIT_SIZE 100 #define LISTINCREAMENT 10 #define EQ(a,b) ((a)==(b)) #define LT(a,b) ((a)<(b)) #define LQ(a,b) ((a)<=(b)) ty.原创 2021-06-12 17:41:22 · 156 阅读 · 0 评论 -
简单的查找应用代码实现
#include<stdio.h> #include<stdlib.h> #define TRUE 1 #define FALSE 0 #define OVERFLOW -2 #define LIST_INIT_SIZE 100 #define LISTINCREAMENT 10 #define EQ(a,b) ((a)==(b)) #define LT(a,b) ((a)<(b)) #define LQ(a,b) ((a)<=(b)) typedef int Stat.原创 2021-06-09 17:05:46 · 255 阅读 · 0 评论 -
无向图深度、广度遍历(邻接矩阵、邻接表)
#include<stdio.h> #include<stdlib.h> #include<conio.h> #include<malloc.h> #define MAX_VEX_NUM 20 typedef struct { char vertex[MAX_VEX_NUM]; int arcs[MAX_VEX_NUM][MAX_VEX_NUM]; int vex_num; int arc_num; }Mgraph; int LocateVex(Mg.原创 2021-05-19 20:12:06 · 699 阅读 · 0 评论 -
简单的二叉树遍历系统
#include<stdio.h> #include<stdlib.h> #include<string.h> #define OK 1 #define ERROR 0 #define OVERFLOW -1 #define STACK_INIT_SIZE 50 typedef int Status; typedef float ElemType; typedef struct BiTNode { char data; struct BiTNode *lchild,*原创 2021-05-07 17:09:24 · 286 阅读 · 2 评论 -
简单的单链表处理系统(初学者制)
#include<stdio.h> #include<stdlib.h> #include<windows.h> #define TRUE 1 #define FALSE 0 #define OVERFLOW 2 typedef int Status; typedef float ElemType; typedef struct LNode { ElemType data; struct LNode *next; }LNode,*LinkList; //创建单链表.原创 2021-03-26 20:52:05 · 182 阅读 · 0 评论 -
三元组处理器(动态分配内存)
实现抽象数据类型“三元组”,动态分配内存。每个三元组由任意三个实数的序列构成,基本操作包括:创建一个三元组,取三元组的任意一个分量,置三元组的任意一个分量,求三元组的最大分量,求三元组的最小分量,显示三元组,销毁三元组等。 #include<stdio.h> #include<stdlib.h> #include<windows.h> #define OK 1 #define ERROR 0 typedef int Status; typedef flo...原创 2021-03-19 09:25:52 · 1523 阅读 · 0 评论 -
顺序表处理功能模板
#include<stdio.h> #include<stdlib.h> #define LIST_INIT_SIZE 100 #define LISTINCREAMENT 10 #define TRUE 1 #define FALSE 0 #define OVERFLOW 2 typedef int Status; typedef float ElemType; typedef struct { ElemType *elem; int length; int listsiz.原创 2021-03-14 18:48:55 · 98 阅读 · 0 评论 -
简单的三元组处理系统(初学者制)
功能:实现对三元组的简单处理 运行结果: #include<stdio.h> #include<windows.h> #define OK 1; typedef int Status; typedef float ElemType; typedef struct { ElemType e[3]; }Triplet; //创建三元组 Status InitTriplet(Triplet &T,ElemType v0,ElemType v1,ElemType v2,Sta原创 2021-03-06 17:39:15 · 485 阅读 · 5 评论