-
Description:
对整型有序关键码序列进行折半查找,待排序序列以数组存储。如果找到待查记录,返回找到的位置下标,并删除该关键码记录;如果没找到待查记...
Description:
对整型有序关键码序列进行折半查找,待排序序列以数组存储。如果找到待查记录,返回找到的位置下标,并删除该关键码记录;如果没找到待查记录,返回0,并将待查记录插入到适当位置,即该查找属于动态查找。输出查找过程中每一轮的low,mid,high 值,以及与给定值相比较的关键码值,并输出最后找到的位置,及变化后的数组。
注意:该数组为整型,数组中关键码存储位置为r[1]~r[n],r[0]留作它用,且关键码个数大于4.
Input Format:
第一行输入数组中记录个数n
第二行输入n个有序的整型关键码,以空格隔开
接下来输入三个待查关键码,每个关键码占一行
Output format:
对于每个关键码,分别输出:
找到给定值之前的每一轮的low,mid,high及相比较的待查找序列中的关键码,以空格隔开
接下来一行输出查找到的位置
接下来一行输出变化后的待查找序列
-Description:
The key codes for integers ordered sequence of binary search until the sorting sequence to an array of storage. If you find a complete set of records, returns to find the location of the next standard, and delete the key code is recorded if not find a complete set of records, returns 0, and a complete set of records inserted into the appropriate location, that is, the search was part of search. Find out the process for each one of the low, mid, high value, as well as compared to the value given the key code value and output of the last to find the locat
- 2023-05-15 19:40:03下载
- 积分:1
-
算法设计手册
The Algorithm Design Manual
by
Steven S. Skiena
- 2022-02-03 05:41:37下载
- 积分:1
-
Win32 API大全,全面的api函数,排版也很不错,大家收藏一下吧
Win32 API大全,全面的api函数,排版也很不错,大家收藏一下吧-Win32 API Guinness, comprehensive api function, layout is also very good, we Favorites yourself
- 2022-06-11 11:23:11下载
- 积分:1
-
与平台无关的图像库
与平台无关的图像库-platform-independent image library
- 2022-10-31 16:45:03下载
- 积分:1
-
用windows系统API获取bios信息
通过GetSystemFirmwareTable function这个方法读取到SMBIOS里面的内容,是个不错的例子,分享下啦~~
- 2022-02-07 10:52:49下载
- 积分:1
-
一个VB小程序,用于在windows98/95下显示系统的安装序列号
一个VB小程序,用于在windows98/95下显示系统的安装序列号-a small program for windows98/95 shown in the installation sequence,
- 2022-02-20 17:21:04下载
- 积分:1
-
vb编写的一个实现主明细报表的一个压顶枯无可奈何花落去
vb编写的一个实现主明细报表的一个压顶枯无可奈何花落去-vb prepared a detailed statement of the realization of the main roof of a pressure can do nothing about the flowers to dry
- 2022-02-21 02:20:37下载
- 积分:1
-
mnbnmbnb Nb nbnbnghghghjvbvbvghftfgfgvc
mnbnmbnb nbnbnghghghjvbvbvghftfgfgvc-mnbnmbnb nb nbnbnghghghjvbvbvghftfgfgvc
- 2022-03-21 14:42:12下载
- 积分:1
-
VC++编程,有源代码,对MSDN和其他文件帮助系统进行压缩。
VC++编程,有源代码,对MSDN和其他文件帮助系统进行压缩。-VC++ Programming, source code, and other documents on the MSDN help system for compression.
- 2022-10-10 11:10:03下载
- 积分:1
-
点对点语音通讯
C++ 实现的 在Windows操作系统下的 简单语音交流,通过连接IPaddress 地址进行连接,然后可以在本机上面进行调试测试,能够进行简单的收发语音信息,对新手有挺大帮助的 ,你们可以下载下来好好学习
- 2022-04-12 05:57:17下载
- 积分:1