-
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
-
访问联系人服务
访问联系人服务-所带源代码,是很好的示例.-Visit the Contact service-
- 2022-11-13 22:20:03下载
- 积分:1
-
usb 通讯
这只是demo 用于usb通讯,这是通过系统api函数来枚举获取并打开usb设备进行通讯,实现上位机和下位机通过usb口进行通讯,以往都是一串口通讯,这提高了通讯的速度。
- 2022-01-28 19:21:21下载
- 积分:1
-
C# socket传输
服务端,客户端。实现两个部分通信。~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~
- 2022-06-27 00:43:32下载
- 积分:1
-
本文档包含有关原理matlab的细节。关于各种文件…
This document contains details about fundamentals of matlab. about various file types,outputs,windows in matlab software,displaying images and sample codes and outputs.
- 2022-05-07 23:59:13下载
- 积分:1
-
将菜单转换成树TreeView
将菜单转换成树TreeView-menu will be converted into tree TreeView
- 2022-03-24 08:45:33下载
- 积分:1
-
一个封装的进度条类.可以替换自己的颜色显示百分比
一个封装的进度条类.可以替换自己的颜色显示百分比-The progress of a package of classes. Can replace their percentage of the color display
- 2022-08-24 11:17:26下载
- 积分:1
-
用vc6.0写的win32控制台子窗口程序
用vc6.0写的win32控制台子窗口程序-Vc6.0 written using win32 console sub-window procedure
- 2022-01-24 14:23:17下载
- 积分:1
-
Maxspace Studio Package
Maxspace Studio Package
- 2022-07-21 17:45:41下载
- 积分:1
-
库存系统
库存管理系统的销售和购买的选项来修改它,如你所愿,也不要忘记分享它再一次请不要不客气
- 2022-05-15 16:08:24下载
- 积分:1