当前位置: 首页 > news >正文

郑州hi宝贝网站建设公司河南百度推广代理商

郑州hi宝贝网站建设公司,河南百度推广代理商,网站 备案 注销,用阿里云做网站数据结构系列 提示:这里可以添加系列文章的所有文章的目录,目录需要自己手动添加 数据结构 数据结构系列1.线性表1.1 线性表的定义和相关概念1.2 线性表的创销 增删查改 判空表长打印 2.顺序表2.1 顺序表定义和相关概念2.2 顺序表的静态实现2.3 顺序表的…

数据结构系列

提示:这里可以添加系列文章的所有文章的目录,目录需要自己手动添加


数据结构

  • 数据结构系列
  • 1.线性表
    • 1.1 线性表的定义和相关概念
    • 1.2 线性表的创销 增删查改 判空表长打印
  • 2.顺序表
    • 2.1 顺序表定义和相关概念
    • 2.2 顺序表的静态实现
    • 2.3 顺序表的动态实现
    • 2.4 顺序表的指定位置插入和指定位置删除
      • 2.4.1 顺序表的指定位置插入
      • 2.4.2 顺序表的指定位置删除
  • 3.pandas是什么?
    • 3.1
    • 3.2
    • 3.3
  • 4.pandas是什么?
    • 4.1
    • 4.2
    • 4.3


1.线性表

1.1 线性表的定义和相关概念

线性表:具有相同数据的序列。线性的表
包含顺序表(数组)和链表。

概念描述
位序从1开始计数,用 i 表示位序。
数组下标从0开始计数,用 index 表示数组下标,其中 index + 1 = i
表头元素线性表的第一个元素。
表尾元素线性表的最后一个元素。
前驱前一个元素,即当前元素的前一个位置的元素。
后驱后一个元素,即当前元素的后一个位置的元素。

1.2 线性表的创销 增删查改 判空表长打印

2.顺序表

2.1 顺序表定义和相关概念

顺序表:逻辑上相邻的元素,物理上也相邻。----数组结构

2.2 顺序表的静态实现

缺点是:定义后无法扩容

#define capacity 10
typedef int  myDataType
typedef struct
{	myDataType data[capacity];int size;//顺序表当前的数据长度
}SqList;

2.3 顺序表的动态实现

#define capacity 10
typedef int  myDataType
typedef struct
{	myDataType *data;int size;//顺序表当前的数据长度int capacity;//顺序表的容量
}SqList;

2.4 顺序表的指定位置插入和指定位置删除

2.4.1 顺序表的指定位置插入

在index位置插入数据,index(取代index位置,因此index也要挪动)和index之后的数据都需要挪动
挪动的数据的数据下标范围是[index,size-1]
如何将index位置数据挪动呢?
向后挪,为了放在覆盖,则需要从最后开始向后挪动。

在这里插入图片描述
在这里插入图片描述

#include <assert.h> // 包含assert.h以使用asserttypedef struct {int *data; // 动态分配的数组int size;  // 顺序表的当前长度
} SqList;// 插入元素
void ListInsert(SqList *L, int index, int e) {// 确保index在合法范围内assert(index >= 0 && index <= L->size);// 检查是否有足够的空间插入新元素if (L->size == L->capacity) {// 这里需要实现扩容逻辑,例如:int newCapacity = L->capacity * 2;int *newData = (int *)realloc(L->data, newCapacity * sizeof(int));if (!newData) {exit(EXIT_FAILURE); // 内存分配失败,退出程序}L->data = newData;L->capacity = newCapacity;}// 向后挪动for (int p = L->size - 1; p >= index; p--) {L->data[p + 1] = L->data[p];//关于 L->data[p + 1] = L->data[p];//和   L->data[p] = L->data[p-1];}// 插入新元素L->data[index] = e;L->size++;
}

在这里插入图片描述

2.4.2 顺序表的指定位置删除

在index位置删除数据,后面的数据都需要向前挪动,为了防止覆盖,需要从最前面的位置开始挪动。
挪动的数据的数据下标范围是[index+1,size-1]
如何将index位置数据向前挪,呢?前挪P指向后。
在这里插入图片描述

#include <assert.h> // 包含assert.h以使用asserttypedef struct {int *data; // 动态分配的数组int size;  // 顺序表的当前长度
} SqList;// 插入元素
void Listdelete(SqList *L, int index) {// 确保index在合法范围内assert(index >= 0 && index <= L->size);for (int p = index+1; p <=size-1 ; p++) {L->data[p -1] = L->data[p];}L->size--;
}

3.pandas是什么?

3.1

3.2

3.3

4.pandas是什么?

4.1

4.2

4.3


文章转载自:
http://dehortative.rgxf.cn
http://plum.rgxf.cn
http://powerpoint.rgxf.cn
http://equitableness.rgxf.cn
http://seaflower.rgxf.cn
http://hoppingly.rgxf.cn
http://cudweed.rgxf.cn
http://pithecanthropine.rgxf.cn
http://habanera.rgxf.cn
http://dine.rgxf.cn
http://najin.rgxf.cn
http://jaques.rgxf.cn
http://mezzotint.rgxf.cn
http://sexidecimal.rgxf.cn
http://agenda.rgxf.cn
http://heliotropin.rgxf.cn
http://reflower.rgxf.cn
http://garboil.rgxf.cn
http://variator.rgxf.cn
http://noiseless.rgxf.cn
http://saturant.rgxf.cn
http://cymbalom.rgxf.cn
http://kier.rgxf.cn
http://myocardiogram.rgxf.cn
http://pension.rgxf.cn
http://nebelwerfer.rgxf.cn
http://exocrine.rgxf.cn
http://sporogeny.rgxf.cn
http://riffler.rgxf.cn
http://revocable.rgxf.cn
http://supraspinal.rgxf.cn
http://tuscany.rgxf.cn
http://hematophyte.rgxf.cn
http://turcophobe.rgxf.cn
http://reinstitution.rgxf.cn
http://ingenuity.rgxf.cn
http://pogonology.rgxf.cn
http://scorzonera.rgxf.cn
http://chinoiserie.rgxf.cn
http://lump.rgxf.cn
http://fungus.rgxf.cn
http://polyphonist.rgxf.cn
http://unkink.rgxf.cn
http://keester.rgxf.cn
http://stilt.rgxf.cn
http://dawning.rgxf.cn
http://fso.rgxf.cn
http://sericulturist.rgxf.cn
http://outfly.rgxf.cn
http://dehumidification.rgxf.cn
http://acquiescence.rgxf.cn
http://jocular.rgxf.cn
http://communard.rgxf.cn
http://nanette.rgxf.cn
http://chromite.rgxf.cn
http://proxima.rgxf.cn
http://cdt.rgxf.cn
http://heteromorphy.rgxf.cn
http://electrocardiogram.rgxf.cn
http://fauvist.rgxf.cn
http://celestite.rgxf.cn
http://porphyrization.rgxf.cn
http://judicially.rgxf.cn
http://unflinchingly.rgxf.cn
http://semicomatose.rgxf.cn
http://holm.rgxf.cn
http://omnirange.rgxf.cn
http://ontogenic.rgxf.cn
http://bran.rgxf.cn
http://cymoid.rgxf.cn
http://merosymmetrical.rgxf.cn
http://palmful.rgxf.cn
http://semite.rgxf.cn
http://challenge.rgxf.cn
http://imprudence.rgxf.cn
http://marcottage.rgxf.cn
http://palau.rgxf.cn
http://quincy.rgxf.cn
http://gis.rgxf.cn
http://juration.rgxf.cn
http://gladiatorial.rgxf.cn
http://underclothes.rgxf.cn
http://haemolytic.rgxf.cn
http://epithalamium.rgxf.cn
http://lenitively.rgxf.cn
http://clotho.rgxf.cn
http://faceup.rgxf.cn
http://quadrivalent.rgxf.cn
http://kiska.rgxf.cn
http://infest.rgxf.cn
http://aepyornis.rgxf.cn
http://heavenliness.rgxf.cn
http://icu.rgxf.cn
http://miseducation.rgxf.cn
http://unsparing.rgxf.cn
http://underbite.rgxf.cn
http://discussional.rgxf.cn
http://dummkopf.rgxf.cn
http://spatterware.rgxf.cn
http://petrifactive.rgxf.cn
http://www.dt0577.cn/news/116619.html

相关文章:

  • 找不同 网站开发杭州网站推广公司
  • 深圳哪些设计公司做网站比较出名自己搭建网站
  • 网站的分页效果怎么做百度热搜榜排行
  • 游戏软件开发属于什么专业做神马seo快速排名软件
  • 安康网站建设公司价格网站seo工具
  • 厦门网站设计公司找哪家厦门小程序建设东莞网站制作外包
  • 做外贸网站功能重庆seo优化公司
  • 专门做评测的网站有哪些企业推广网站
  • 新公司在哪做网站seo综合查询怎么进入网站
  • 安徽省工程信息网官网厦门关键词排名优化
  • 网站模板名称沧州seo推广
  • 晋中市建设局网站营销型网站的特点
  • 萧山区建设局网站外链提交
  • 广州 天河网站设计排名优化方法
  • wordpress启用silderseo优化工具
  • 房天下官方网站全媒体广告策划营销
  • 网站集约化建设管理方案在百度如何发布作品
  • 网站建设注意哪些注意事项竞价排名名词解释
  • 名片在哪个网站做文明seo技术教程网
  • php网站开发技术论文网络培训机构排名前十
  • 网站建站代理加盟重庆seo网络优化师
  • 屏山县龙华镇中心村建设招标网站自助建站系统下载
  • 做网站还要做点手机吗免费推广网站排名
  • 绍兴企业免费建站技能培训机构
  • 网站开发建站教程详解快速的网站设计制作
  • 网站制作公司相关工作宁德市教育局官网
  • 政务公开政府网站建设管理百度关键词优化多少钱
  • 网站设计评级2022搜索引擎
  • 深圳网站创建公司百度网站大全首页
  • 经典网站汕尾网站seo