- 1、本文档共18页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
vb中一维二维数组应用(国外英语资料)
vb中一维二维数组应用(国外英语资料)
A one-dimensional array
The sorting
One, selection sort:
The data is already placed in an array of one-dimensional arrays, requiring a small to large order.
An array of
20
4
36
......
45
109
3
The subscript
one
2
3
......
N - 2
N - 1
n
Ordering process:
Select the minimum value from item 1 to n, and then exchange the first item with the minimum.
Select the lowest value from item 2 to n, then exchange the second with the minimum.
3,...
Select the lowest value from n-1 to n, and then exchange the n-1 item with the minimum.
Note: minimum and subscripts are stored by temporary variables.
So, you need two layers of loops: the outer loop I performs n minus 1, and the inner loop j executes n minus I minus 1 times
For I = 1 to n - 1
Minimum and subscripts are stored by temporary variables
TmpVal = the first item I value
The first item I subscript tmpId =
For j = I + 1 to n
If tmpVal the JTH term value, then:
TmpVal section j = value
The first item j subscript tmpId =
next
Change the I term to the minimum term
Next
From big to small?
Bubble sort:
The data is already placed in an array of one-dimensional arrays, requiring a small to large order.
An array of
20
4
36
......
45
109
3
The subscript
one
2
3
......
N - 2
N - 1
n
Two methods: floating and sinking of large Numbers.
The sequence of the floating sequence of decimal places: from the NTH term to the k th term, in order of the two terms, if the m term is less than the m-1 term, then the two terms are exchanged. From 2 to n (k)
The first execution: the result is the smallest value in item 1 to the NTH term in item 1
If the NTH term is less than the n-1 term, the NTH term is swapped with the n-1 term.
2, if the n-1 term is less than the n-2 term, the n-1 term is swapped with the n-2 term.
3,...
If the second term is less than the first term, the second term will be exchanged with the first item.
Second execution: the result is the lowest value in the second term to the NTH term in the second term
If th
您可能关注的文档
- linux的strace命令(详解)(国外英语资料).doc
- linux检测网络配置命令(国外英语资料).doc
- linux系统命令全集(txt版)(国外英语资料).doc
- linux目录架构及常用命令(国外英语资料).doc
- Linux系统如何安装php(国外英语资料).doc
- Linux系统巡检常用命令(国外英语资料).doc
- Linux练习题(国外英语资料).doc
- LINUX系统管理技术手册(第2版)(国外英语资料).doc
- Linux虚拟机vmware_tool工具安装(国外英语资料).doc
- linux随堂笔记 日志类型 系统备份(国外英语资料).doc
- 2024年安徽马鞍山和县事业单位招考聘用45人笔试上岸历年高频考点(难、易错点)附带答案详解.docx
- 2024年2月江苏镇江扬中市事业单位招考聘用65人笔试上岸历年高频考点(难、易错点)附带答案详解.docx
- 2024年2月湖北监利市事业单位人才引进51人笔试上岸历年高频考点(难、易错点)附带答案详解.docx
- 2024年山西国际商务职业学院招考聘用8人笔试上岸历年高频考点(难、易错点)附带答案详解.docx
- 2024年2月浙江宁波职业技术学院招考聘用高层次高技能人才115人笔试上岸历年高频考点(难、易错点)附带答案详解.docx
- 2024年内蒙古赤峰市红山区引进教师92人笔试上岸历年高频考点(难、易错点)附带答案详解.docx
- 2024年2月湖南常德汉寿县血吸虫病防治站招考聘用笔试上岸历年高频考点(难、易错点)附带答案详解.docx
- 2024年2月陕西省核工业二一五医院卫生专业技术人才招考聘用41人笔试上岸历年高频考点(难、易错点)附带答案详解.docx
- 2024年2月江苏泰州市姜堰中医院招考聘用合同制工作人员31人笔试上岸历年高频考点(难、易错点)附带答案详解.docx
- 高二物理期末试卷带答案.docx
最近下载
- 固体物理:第十一章 自旋玻璃.ppt
- 警察礼仪(PPT页)(最新整理版).pptx VIP
- Chapter1-林子雨-大数据技术原理与应用-大数据概述(年2月17日版本)44.ppt
- 【建筑专业】03J609 防火门窗.pdf
- 第6课《老山界》核心素养教学设计-统编版语文七年级下册.docx VIP
- 商场地产潮玩解压计划夏日集市方案.pptx VIP
- 新版高速公路基础知识必考重点题库.doc VIP
- 普通高等学校毕业生就业协议书(三方协议).pdf VIP
- JJG 1118-2015电子汽车衡(衡器载荷测量仪法).docx VIP
- 2023年深圳百合外国语学校小升初面试英语模拟题及答案.docx
文档评论(0)