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

自媒体网站建设论文全国工商信息查询

自媒体网站建设论文,全国工商信息查询,网站建设完提交百度,网络销售平台怎么做线性表的实现方式 顺序表 顺序表是一种线性表的实现方式#xff0c;它是用一组地址连续的存储单元依次存储线性表中的数据元素#xff0c;使得逻辑上相邻的元素在物理上也相邻⁴。顺序表可以用数组来实现#xff0c;它的优点是可以快速定位第几个元素#xff0c;但是缺点…线性表的实现方式 顺序表 顺序表是一种线性表的实现方式它是用一组地址连续的存储单元依次存储线性表中的数据元素使得逻辑上相邻的元素在物理上也相邻²³⁴。顺序表可以用数组来实现它的优点是可以快速定位第几个元素但是缺点是需要预先分配固定大小的空间插入和删除操作需要移动大量元素¹⁵。顺序表在使用前需要初始化初始化时需要确定起始位置、存储容量和长度 源: 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 IListDST{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 SeqListT : IListDST{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 nameitem/parampublic void Add(T item){if (countdata.Length)//当前数组已经存满{Console.WriteLine(当前顺序表已经存满不允许再存入);}else{data[count] item;count;}}/// summary/// 清空/// /summarypublic void Clear(){count 0;}/// summary/// 删除元素/// /summary/// param nameindex/param/// returns/returnspublic T Delete(int index){T temp data[index];for (int i index1 ; i count; i){data[i - 1] data[i];}count--;return temp;}/// summary/// 取元素/// /summary/// param nameindex/param/// returns/returnspublic T GetEle(int index){if (index0indexcount-1)//索引存在{return data[index];}else{Console.WriteLine(索引不存在);return default(T); }}/// summary/// 取得数据的个数/// /summary/// returns/returnspublic int GetLength(){return count;}/// summary/// 插入元素/// /summary/// param nameitem/param/// param nameindex/parampublic 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 namevalue/param/// returns/returnspublic 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 SeqListT : IListDST{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 nameitem/parampublic void Add(T item){if (countdata.Length)//当前数组已经存满{Console.WriteLine(当前顺序表已经存满不允许再存入);}else{data[count] item;count;}}/// summary/// 清空/// /summarypublic void Clear(){count 0;}/// summary/// 删除元素/// /summary/// param nameindex/param/// returns/returnspublic T Delete(int index){T temp data[index];for (int i index1 ; i count; i){data[i - 1] data[i];}count--;return temp;}/// summary/// 取元素/// /summary/// param nameindex/param/// returns/returnspublic T GetEle(int index){if (index0indexcount-1)//索引存在{return data[index];}else{Console.WriteLine(索引不存在);return default(T); }}/// summary/// 取得数据的个数/// /summary/// returns/returnspublic int GetLength(){return count;}/// summary/// 插入元素/// /summary/// param nameitem/param/// param nameindex/parampublic 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 namevalue/param/// returns/returnspublic int Locate(T value){for (int i 0; i count; i){if (data[i].Equals(value)){return i;}}return -1;}} } ‍
http://www.hkea.cn/news/14425879/

相关文章:

  • 网站开发知识培训WordPress调用不同主题
  • 福州做网站多少钱便宜的服务器租用
  • 网站做301好不好大学生婚恋网站策划书
  • 网站空间 php程序安顺seo
  • 莘县制作网站h5制作开发哪找
  • 个人网站可以不备案吗石家庄招标信息网
  • 网站开发命名规范四库一平台怎么查建造师业绩
  • 福州制作公司网站前端电商网站开发周期
  • 无锡高端网站制作做网站没资源
  • 公司申请网站需要哪些材料搜索引擎免费下载
  • php 资讯网站怎样无货源开网店
  • 网站如何做微信支付宝支付宝苏州网站设计公司官网
  • 电子商务网站建设a卷做网站一般要多钱
  • 长沙有哪些做网站的公司云软件网站建设
  • 在线crm客户管理系统简述影响关键词优化的因素
  • 期末成绩怎么做网站唐山哪里建筑工地最好
  • 网站推广策划方案3000字seo优化什么意思
  • 模版网站可以做排名嘛wordpress文章添加tag标签
  • 湖南网站seo营销昭通做网站
  • 鹏达建设集团有限公司网站重庆市建设工程信息网电话
  • 电子商务网站的建设内容郑州企业如何建网站
  • 建设银行长沙招聘网站做网站教程流程
  • 中国市政建设局网站上海网站建设聚众网络
  • 顺德大良网站建设开发wordpress所见即所得编辑器
  • php做的网站怎么让外网访问凡客诚品 v官网
  • 跟我学做纸艺花网站宠物网站建设目标
  • 公司网站做的比较好wordpress评论区插件
  • 王者荣耀做网站网站建设怎样提升形象与品牌价值
  • 企业网站开发文献综述艺术家网站建设中企业网站建设的策划初期的一些误区
  • 江门城乡建设部网站首页wordpress demo数据