随笔 - 168  文章 - 1  评论 - 1  阅读 - 19万

随笔分类 -  数据结构

定长顺序串的实现
摘要:string.h #define MAXSTRLEN 255#define ERROR 0#define OK 1 typedef int Status;typedef char String[MAXSTRLEN + 1]; //初始化字符串Status StrAssign(String T, ch 阅读全文
posted @ 2017-10-19 15:35 paulversion 阅读(1037) 评论(0) 推荐(0) 编辑
循环队列
摘要:circleQeueu.h 头文件 #define MAXQSIZE 3#define OK 1#define ERROR 0typedef struct { int *base; int front; int rear; }Queue; typedef int Status; //初始化一个队列S 阅读全文
posted @ 2017-10-13 18:31 paulversion 阅读(196) 评论(0) 推荐(0) 编辑
练队列的实现
摘要:queue.h 文件 #pragma once typedef struct QNode { int data; struct QNode *next; }QNode,*QueuePtr; typedef struct { QueuePtr front; QueuePtr rear; }LinkQu 阅读全文
posted @ 2017-10-13 16:56 paulversion 阅读(350) 评论(0) 推荐(0) 编辑
c语言行编辑程序
摘要:static.h 头文件 typedef struct bufferStatic{ char *top; char *base; int staticSize; }bufferStatic; typedef int Status; //初始化栈Status InitStatck(bufferStat 阅读全文
posted @ 2017-09-25 17:13 paulversion 阅读(763) 评论(0) 推荐(0) 编辑
C语言栈的实现
摘要:static.h #define STATIC_INIT_SIZE 100#define STATICINCREMENT 10#define ERROR 0#define OK 1typedef struct { int *base;//定义栈底 int *top;//定义栈顶元素 int stat 阅读全文
posted @ 2017-09-22 17:35 paulversion 阅读(3130) 评论(0) 推荐(0) 编辑
双向链表
摘要:typeStructDefine.h typedef struct DuLNode { int data; struct DuLNode *prior; struct DuLNode *next; }DuLNode,*DuLinkList; typedef int Status; //初始化一个空指 阅读全文
posted @ 2017-09-22 15:57 paulversion 阅读(201) 评论(0) 推荐(0) 编辑
静态链表的合并
摘要:typestruct.h #define MAX_SIZE 1000 typedef struct { int data; int cur;}compont,SLinkLIist[MAX_SIZE]; //初始化一个空的静态链表void InitSpace_SL(SLinkLIist S); //从 阅读全文
posted @ 2017-09-21 18:25 paulversion 阅读(436) 评论(0) 推荐(0) 编辑
静态链表的创建
摘要:typeDefine.h 头文件 #define MAXSIZE 100 typedef struct { int data; int cur; }component,SLinkList[MAXSIZE];//SLinkList类型为1000长度的数组 //初始化静态链表void InitSpace 阅读全文
posted @ 2017-09-21 16:09 paulversion 阅读(1266) 评论(0) 推荐(0) 编辑
链表
摘要:function.h 头文件 typedef struct LNode { struct LNode *next; int data; }LNode,*LinkList;//*LinkList等价于typedef int* p;p为指向int类型的指针 typedef int Status; //初 阅读全文
posted @ 2017-09-19 17:17 paulversion 阅读(192) 评论(0) 推荐(0) 编辑
将非递减有序排列(L L1)归并为一个新的线性表L2 线性表L2中的元素仍按值非递减
摘要:#include "stdio.h"#include "stdlib.h"#include "function.h"void main(){ Sqlist L,L1,L2; InitList(&L); InitList(&L1); InitList(&L2); ListInsert(&L, 1, 3 阅读全文
posted @ 2017-09-15 20:01 paulversion 阅读(984) 评论(0) 推荐(0) 编辑
C语言合并两个集合(L,L1) 将L1中不在L中的元素插入到L线性表中
摘要:void main(){ Sqlist L,L1; InitList(&L); InitList(&L1); ListInsert(&L, 1, 2); ListInsert(&L, 2, 3); ListInsert(&L, 1, 1); ListInsert(&L1,1,1); ListInse 阅读全文
posted @ 2017-09-15 18:20 paulversion 阅读(776) 评论(0) 推荐(0) 编辑
c语言线性表
摘要:#include "stdio.h"#include "stdlib.h"#define LIST_INIT_SIZE 100 //线性表存储空间的初始分配量#define LISTINCREMENT 10 //线性表存储空间的分配增量#define OK 1;#define ERROR 0; ty 阅读全文
posted @ 2017-09-15 16:05 paulversion 阅读(572) 评论(0) 推荐(0) 编辑
c语言三元组
摘要:// Triplet.cpp : 定义控制台应用程序的入口点。//#include "stdio.h"#include "stdlib.h"#define OK 1#define ERROE 0 typedef int Status; typedef int *Triplet;//定义Triplet 阅读全文
posted @ 2017-09-15 16:03 paulversion 阅读(2991) 评论(0) 推荐(0) 编辑
线性表(顺序表的创建)
摘要:// orderList.cpp : 定义控制台应用程序的入口点。// #include "stdafx.h"#include "stdlib.h"#define LIST_INIT_SIZE 100 //线性表存储空间的初始分配量#define LISTINCREMENT 10 //线性表存储空间 阅读全文
posted @ 2017-09-12 19:44 paulversion 阅读(787) 评论(0) 推荐(0) 编辑
创建一个三元组
摘要:// Triplet.cpp : 定义控制台应用程序的入口点。// #include "stdafx.h"#include "stdlib.h"#define OK 1#define ERROE 0 typedef int Status; typedef int *Triplet;//定义Tripl 阅读全文
posted @ 2017-09-12 19:42 paulversion 阅读(2139) 评论(0) 推荐(0) 编辑
线性顺序表
摘要:#include<stdio.h>#include<stdlib.h> #define LIST_INIT_SIZE 100#define LIST_INCREMENT 10 typedef char* Status;; int *p, *q; typedef struct { int *elm; 阅读全文
posted @ 2017-05-11 16:27 paulversion 阅读(172) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示