-
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
-
医院管理系统
医院管理系统,c#,由前台和后台共同组成,可以连接数据库,用到的数据库是sqlsever.
- 2023-08-15 09:45:03下载
- 积分:1
-
单词检索
资源描述代码使用C++编写,运用AVL树,你可以简单的查找单词,本次查找是基于数组存储,因此内存不是很大,若想导入跟多单词建议开辟栈内存,检索速度还是很快的,适合初学者了解检索算法,排序算法而用的,希望对初学数据结构的有帮助
- 2022-05-16 07:23:45下载
- 积分:1
-
关于USB驱动的一些源代码,对写USB驱动的人有一定帮助
关于USB驱动的一些源代码,对写USB驱动的人有一定帮助-On the USB drive some of the source code, to write USB drive to help people have a certain
- 2022-01-21 17:36:20下载
- 积分:1
-
expect source code for UNIX
expect source code for UNIX
- 2022-12-09 04:30:03下载
- 积分:1
-
在VC6.0系列无线局域网的移动终端(MT)的测试环境。
一个在vc6.0环境下编的无线局域网中移动终端(mt)的测试程序.-an environment in vc6.0 series of wireless LAN mobile terminal (mt) of the test.
- 2023-04-21 10:15:03下载
- 积分:1
-
在vc++环境中,实现一个简单的电子表程序
在vc++环境中,实现一个简单的电子表程序-in vc environment, the realization of a simple electronic watches procedures
- 2023-05-20 06:40:03下载
- 积分:1
-
A very good c++ Learning video, was very detailed and thorough! Suitable for c++...
一部很好的c++学习视频,讲得非常详细,透彻!适合c++初学者使用,学习!-A very good c++ Learning video, was very detailed and thorough! Suitable for c++ Beginners use to learn!
- 2023-05-18 18:10:10下载
- 积分:1
-
转盘代码
可实现点击选择转盘区域,也可拖动转盘,转盘不同区域来切换不同界面
- 2022-12-24 23:50:04下载
- 积分:1
-
快速排序算法是排序中相对来说比较好的算方法,大家可以看看啊...
快速排序算法是排序中相对来说比较好的算方法,大家可以看看啊 -Quicksort sorting algorithm is in relatively good balance method, we can look at ah Hehe
- 2023-02-24 14:45:04下载
- 积分:1