![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构
小小隐士
这个作者很懒,什么都没留下…
展开
-
顺序线性表的闲谈
#include<stdio.h> #include<malloc.h> #define maxsize 100 typedef int ElemType; typedef struct SqList { ElemType data[maxsize]; int length; }SqList; void InitList(SqList **L); void destory(S原创 2015-07-25 22:20:27 · 279 阅读 · 0 评论 -
两个表指定条件的笛卡尔连接
#include<stdio.h> #include<malloc.h>#define maxcol 10 typedef int ElemType; typedef struct dlist { ElemType data[maxcol]; struct dlist *next; }Dlist; typedef struct hlist { int row; int原创 2015-07-28 23:56:10 · 670 阅读 · 0 评论 -
一元多项式的存储合并
#include<stdio.h> #include<malloc.h> #define MAX 20//多项式的最多项数 typedef struct POLY//定义存放多项式的系数和指数 { double coef;//系数 int exp;//指数 }polyarray[MAX]; typedef struct pnode { double coef; int原创 2015-08-10 17:31:23 · 593 阅读 · 0 评论 -
单链表的一系列操作
#include<stdio.h> #include<malloc.h> #define bool char #define true 1 #define false 0 typedef char ElemType; typedef struct LNODE { ElemType node; struct LNODE *next; }LNODE; void initlistlink(原创 2015-07-26 23:12:17 · 309 阅读 · 0 评论 -
双链表一系列操作
#include<stdio.h> #include<malloc.h>typedef int bool; #define false 0//后面没分号; #define true 1 typedef char Elemtype; typedef struct Snode { Elemtype data; struct Snode *prior; struct Snode *next; }s原创 2015-08-04 12:30:53 · 308 阅读 · 0 评论 -
有序表操作
void listinsert(LNODE *h,ElemType e)//有序单链表的插入算法 { LNODE *res = h,*q; while(res->next&&res->next->node<e) res = res->next; q=malloc(sizeof(LNODE)); q->node = e; q->next = re原创 2015-08-04 21:53:34 · 433 阅读 · 0 评论