![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构预算法(c语言实现)
主要想记录所有遇到的有关数据结构的知识。
浪子T
这个作者很懒,什么都没留下…
展开
-
C语言链表
题目:编写一个函数将一个线性表L(有r个元素且任何元素均不为0)分拆成两个线性表,使L中大于0的元素存放在A中,小于0的元素存放在B中,且A、B两个线性表均为有序序列。#include<stdio.h>#include<malloc.h>#include<assert.h>#include "stdlib.h"typedef int Elemtype;typedef struct seqList{ Elemtype data; struct seqLis原创 2020-10-18 16:36:48 · 497 阅读 · 2 评论 -
c语言(结构体)实现顺序表
先创建了这三个文件:SeqList.h头文件是用来声明,Main.cpp文件是主函数文件,SeqList.cpp是用来实现函数。SeqList.h代码如下:#ifndef _SEQLIST_H_#define _SEQLIST_H_#include<stdio.h>#include<malloc.h>#include<assert.h>#define SEQLIST_INIT_SIZE 8 // 容量大小,可以自己设置typedef int ElemT原创 2020-10-06 13:19:05 · 2060 阅读 · 2 评论