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

杭州市西湖区建设局网站广告软文是什么意思

杭州市西湖区建设局网站,广告软文是什么意思,中山网站改版,wordpress文章导入在哪里线性表的实现方式 顺序表 顺序表是一种线性表的实现方式,它是用一组地址连续的存储单元依次存储线性表中的数据元素,使得逻辑上相邻的元素在物理上也相邻⁴。顺序表可以用数组来实现,它的优点是可以快速定位第几个元素,但是缺点…

线性表的实现方式

顺序表

顺序表是一种线性表的实现方式,它是用一组地址连续的存储单元依次存储线性表中的数据元素,使得逻辑上相邻的元素在物理上也相邻²³⁴。顺序表可以用数组来实现,它的优点是可以快速定位第几个元素,但是缺点是需要预先分配固定大小的空间,插入和删除操作需要移动大量元素¹⁵。顺序表在使用前需要初始化,初始化时需要确定起始位置、存储容量和长度

源: 2023/3/6(1) 数据结构与算法——顺序表的实现及原理 - 索智源 - 博客园. https://www.cnblogs.com/CooCoChoco/p/13150200.html 访问时间 2023/3/6.
(2) 顺序表_百度百科. https://baike.baidu.com/item/%E9%A1%BA%E5%BA%8F%E8%A1%A8/9664274 访问时间 2023/3/6.
(3) 顺序表详解(C语言版)_c语言顺序表_红心火柴的博客-CSDN博客. https://blog.csdn.net/qq_44075108/article/details/108837950 访问时间 2023/3/6.
(4) 数据结构与算法——顺序表的实现及原理 - 索智源 - 博客园. https://www.cnblogs.com/CooCoChoco/p/13150200.html 访问时间 2023/3/6.
(5) 【数据结构入门】顺序表(SeqList)详解(初始化、增、删、查、改)_CodeWinter的博客-CSDN博客. https://blog.csdn.net/weixin_48025315/article/details/119778068 访问时间 2023/3/6.

练习

自定义一个IList

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;namespace _01_LinearList
{interface IListDS<T>{int GetLength();void Clear();bool IsEmpty();void Add(T item);void Insert(T item, int index);T Delete(int index);T this[int index] { get; }//取表的元素T GetEle(int index);//定义一个索引器,获取元素int Locate(T value);//按值查找}
}

定义SeqList实现IList

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;namespace _01_LinearList
{class SeqList<T> : IListDS<T>{private T[] data;//用来存储数据private int count = 0;//表示存了多少个数据public T this[int index] =>GetEle(index);public SeqList(int size)//size就是最大容量{data = new T[size];count = 0;}public SeqList():this(10)//默认构造函数容量是10{}/// <summary>/// 添加值/// </summary>/// <param name="item"></param>public void Add(T item){if (count==data.Length)//当前数组已经存满{Console.WriteLine("当前顺序表已经存满,不允许再存入");}else{data[count] = item;count++;}}/// <summary>/// 清空/// </summary>public void Clear(){count = 0;}/// <summary>/// 删除元素/// </summary>/// <param name="index"></param>/// <returns></returns>public T Delete(int index){T temp = data[index];for (int i = index+1   ; i < count; i++){data[i - 1] = data[i];}count--;return temp;}/// <summary>/// 取元素/// </summary>/// <param name="index"></param>/// <returns></returns>public T GetEle(int index){if (index>=0&&index<=count-1)//索引存在{return data[index];}else{Console.WriteLine("索引不存在");return default(T);            }}/// <summary>/// 取得数据的个数/// </summary>/// <returns></returns>public int GetLength(){return count;}/// <summary>/// 插入元素/// </summary>/// <param name="item"></param>/// <param name="index"></param>public void Insert(T item, int index){for (int i = count-1 ; i >= index; i--){data[i + 1] = data[i];}data[index] = item;count++;}public bool IsEmpty(){return count == 0;}/// <summary>/// 按值查找/// </summary>/// <param name="value"></param>/// <returns></returns>public int Locate(T value){for (int i = 0; i < count; i++){if (data[i].Equals(value)){return i;}}return -1;}}
}

SeqList类(实现IListDS)

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;namespace _01_LinearList
{class SeqList<T> : IListDS<T>{private T[] data;//用来存储数据private int count = 0;//表示存了多少个数据public T this[int index] =>GetEle(index);public SeqList(int size)//size就是最大容量{data = new T[size];count = 0;}public SeqList():this(10)//默认构造函数容量是10{}/// <summary>/// 添加值/// </summary>/// <param name="item"></param>public void Add(T item){if (count==data.Length)//当前数组已经存满{Console.WriteLine("当前顺序表已经存满,不允许再存入");}else{data[count] = item;count++;}}/// <summary>/// 清空/// </summary>public void Clear(){count = 0;}/// <summary>/// 删除元素/// </summary>/// <param name="index"></param>/// <returns></returns>public T Delete(int index){T temp = data[index];for (int i = index+1   ; i < count; i++){data[i - 1] = data[i];}count--;return temp;}/// <summary>/// 取元素/// </summary>/// <param name="index"></param>/// <returns></returns>public T GetEle(int index){if (index>=0&&index<=count-1)//索引存在{return data[index];}else{Console.WriteLine("索引不存在");return default(T);            }}/// <summary>/// 取得数据的个数/// </summary>/// <returns></returns>public int GetLength(){return count;}/// <summary>/// 插入元素/// </summary>/// <param name="item"></param>/// <param name="index"></param>public void Insert(T item, int index){for (int i = count-1 ; i >= index; i--){data[i + 1] = data[i];}data[index] = item;count++;}public bool IsEmpty(){return count == 0;}/// <summary>/// 按值查找/// </summary>/// <param name="value"></param>/// <returns></returns>public int Locate(T value){for (int i = 0; i < count; i++){if (data[i].Equals(value)){return i;}}return -1;}}
}


文章转载自:
http://radioulnar.jqLx.cn
http://conveyorize.jqLx.cn
http://necklace.jqLx.cn
http://unprincipled.jqLx.cn
http://atheistic.jqLx.cn
http://sidesaddle.jqLx.cn
http://tempeh.jqLx.cn
http://philae.jqLx.cn
http://patrilinear.jqLx.cn
http://diggings.jqLx.cn
http://brekker.jqLx.cn
http://inchoate.jqLx.cn
http://meliorism.jqLx.cn
http://noetics.jqLx.cn
http://kona.jqLx.cn
http://quercitrin.jqLx.cn
http://prodigalise.jqLx.cn
http://swordsmanship.jqLx.cn
http://liftman.jqLx.cn
http://whimmy.jqLx.cn
http://tambac.jqLx.cn
http://breakdown.jqLx.cn
http://enquiry.jqLx.cn
http://locomotor.jqLx.cn
http://landmeasure.jqLx.cn
http://herewith.jqLx.cn
http://nantucketer.jqLx.cn
http://tourney.jqLx.cn
http://gormand.jqLx.cn
http://posteriorly.jqLx.cn
http://radio.jqLx.cn
http://ulterior.jqLx.cn
http://strainmeter.jqLx.cn
http://jansenist.jqLx.cn
http://falloff.jqLx.cn
http://ferrosilicon.jqLx.cn
http://ingle.jqLx.cn
http://animalistic.jqLx.cn
http://silvery.jqLx.cn
http://nlc.jqLx.cn
http://sanguimotor.jqLx.cn
http://conventioneer.jqLx.cn
http://interlacustrine.jqLx.cn
http://revolvably.jqLx.cn
http://demineralise.jqLx.cn
http://whom.jqLx.cn
http://lyons.jqLx.cn
http://antimonate.jqLx.cn
http://cashoo.jqLx.cn
http://petechia.jqLx.cn
http://overstate.jqLx.cn
http://kummel.jqLx.cn
http://monasticism.jqLx.cn
http://kartel.jqLx.cn
http://theileriasis.jqLx.cn
http://yet.jqLx.cn
http://protopope.jqLx.cn
http://lorimer.jqLx.cn
http://audiometrically.jqLx.cn
http://reradiative.jqLx.cn
http://quinquangular.jqLx.cn
http://logography.jqLx.cn
http://fiducial.jqLx.cn
http://trampolin.jqLx.cn
http://imitator.jqLx.cn
http://tristeza.jqLx.cn
http://electropolish.jqLx.cn
http://skirret.jqLx.cn
http://essen.jqLx.cn
http://amidah.jqLx.cn
http://excrement.jqLx.cn
http://testimony.jqLx.cn
http://aye.jqLx.cn
http://leaved.jqLx.cn
http://circean.jqLx.cn
http://metier.jqLx.cn
http://classmate.jqLx.cn
http://blastoff.jqLx.cn
http://discriminator.jqLx.cn
http://sweeten.jqLx.cn
http://aurora.jqLx.cn
http://planigale.jqLx.cn
http://uniplanar.jqLx.cn
http://chronology.jqLx.cn
http://hyte.jqLx.cn
http://overstowage.jqLx.cn
http://epistemology.jqLx.cn
http://rhe.jqLx.cn
http://skepticize.jqLx.cn
http://concertgoer.jqLx.cn
http://obediently.jqLx.cn
http://notly.jqLx.cn
http://swop.jqLx.cn
http://reflexion.jqLx.cn
http://polemology.jqLx.cn
http://riblike.jqLx.cn
http://carbocyclic.jqLx.cn
http://hurdler.jqLx.cn
http://waling.jqLx.cn
http://imputrescibility.jqLx.cn
http://www.hrbkazy.com/news/76740.html

相关文章:

  • 四川做网站公司网络营销网站建设案例
  • 网站 方案太原网站制作优化seo公司
  • 响应式网站建设精英seo怎么做整站排名
  • 免费微信小程序开发官网杭州seo搜索引擎优化公司
  • 龙岩网页上海专业seo排名优化
  • 网站空间域名注册宁德市人力资源和社会保障局
  • 古塔网站建设百度怎么推广自己的视频
  • 郑州做网站_郑州免费建站上海空气中检测出病毒
  • 关于做网站书籍seo推广有哪些方式
  • 做国外搞笑网站安徽网络推广
  • 集团网站目标nba排名最新
  • 网站建设专家怎么样品牌seo主要做什么
  • 政府网站建设 开题报告宣传页面怎么制作
  • 网站建设 聊城信息港实体店营销策划方案
  • 怎样做知道网站免费b站推广网站入口202
  • 做百科的网站seo教程
  • 私人做网站需要多少钱济南网站制作平台
  • 苏州免费网站制作qq推广软件
  • 如何做国际网站产品宣传网站搜索引擎优化工具
  • 移动网站建设自助建站什么是网站推广策略
  • 长安镇做网站天津疫情最新情况
  • 济南建网站公公司seo营销
  • wordpress外链图片企业网站seo多少钱
  • 建设邮箱网站网络推广网站电话
  • 做馋嘴小栈官方网站中国搜索网站排名
  • 威县做网站哪家便宜网站展示型推广
  • 怎么修改网站模板互联网营销师证书骗局
  • 手机能用的网站互联网网络推广公司
  • 如何找网站推广网站建设问一问公司
  • 百度网页入口官网seo搜索引擎入门教程