
C
学习数据结构与算法
fancyZT
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
数据结构C-9-矩阵与广义表(多维矩数组、稀疏矩阵相加、相乘、十字链表、广义表)
1.多维数组 //多维数组-指针 #include<stdio.h> #include<stdlib.h> #define OK 1 #define ERROR -1 #define TRUE 1 #define FALSE -1 #define OVERFLOW -2 #define MAX_ARRAY_DIM 8 typedef int Status; typedef ...原创 2020-03-12 19:57:38 · 362 阅读 · 0 评论 -
数据结构C-8-字符串
1 //定长顺序存储 #include<stdio.h> #include<stdlib.h> #define MAXSIZE 255 #define OK 1 #define ERROR -1 #define TRUE 1 #define FALSE -1 typedef int Status; typedef unsigned char SString[MAXSIZE+...原创 2020-03-04 22:36:52 · 267 阅读 · 0 评论 -
数据结构C-7-队列的建立与实现(顺序-动态、链式)
1.动态顺序队列 #include <stdio.h> #include<stdlib.h> #define MAX_SIZE 100 typedef int ElemType; typedef struct{ ElemType *base;//动态分配 int front; int rear; }Queue; void InitQueue(Queu...原创 2020-03-01 21:51:52 · 358 阅读 · 0 评论 -
数据结构C-6-栈的应用(数制转换、括号匹配、行编辑、简单表达式计算)
1.数制转换 //数制转换 #include<stdio.h> #include<stdlib.h> #define MAX_SIZE 100 #define STACKINCREMENT 10 typedef int ElemType; typedef int Status; typedef struct Stack{ ElemType *base; El...原创 2020-03-01 21:49:40 · 418 阅读 · 0 评论 -
数据结构C-5-栈的建立与实现(顺序栈、链栈)
1.静态顺序栈 #include<stdio.h> #include<stdlib.h> #define MAX_STACK_SIZE 100 typedef int ElemType ; typedef struct Stack{ ElemType stack_array[MAX_STACK_SIZE]; int top; }Stack; void Ini...原创 2020-03-01 21:46:33 · 390 阅读 · 0 评论 -
数据结构C-4-静态链表与双向链表
1、静态链表的操作 //静态链表 #include<stdio.h> #include<stdlib.h> #define MAXSIZE 1000 #define OK 1 #define ERROR -1 typedef int ElemType; typedef int Status; typedef struct{ ElemType data; in...原创 2020-02-25 15:53:41 · 300 阅读 · 0 评论 -
数据结构C-3-单链表和单循环链表(合并、删除重复结点、一元多项式)
1、单链表的合并 #include<stdio.h> #include<stdlib.h> typedef int ElemType; typedef int Status; typedef struct LNode{ ElemType data; struct LNode *next; }LNode,*LinkList; void InitList(L...原创 2020-02-25 15:51:22 · 335 阅读 · 0 评论 -
数据结构C-2-顺序表基本操作之程序
#include <stdio.h> #include <stdlib.h> //静态分配 //#define LIST_MAX_LENTH 100 //typedef struct ElemType{ // ElemType Elem_array[LIST_INIT_SIZE]; // int length; //}Sqlist; //动态分配 #defi...原创 2020-02-21 21:41:57 · 340 阅读 · 0 评论 -
数据结构C-1-抽象数据结构与算法时间测试程序
#include <stdio.h> #include <stdlib.h> //输入三个整数并判断其排列顺序及最大值 #define TRUE 1 #define FALSE 0 #define OK 1 #define ERROR 0 #define INFEASIBLE -1 #define OVERFLOW -2 //预定义类型 typedef int Statu...原创 2020-02-19 17:25:57 · 283 阅读 · 0 评论