-
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
-
DOS programmer s reference manual, the fourth edition English formerly known a...
《DOS程序员参考手册》第四版;英文原名为“DOS Programmer s Reference, 4th
Edition”,作者是美国的Terry Dettman及AllenL.Wyatt, Sr. 。本书是Que的保留书
目,内容完整,解释清楚,在介绍DOS编程技术的书籍中,本书是多年来最有影响、最受欢
迎的书籍之一。
- DOS programmer s reference manual, the fourth edition English formerly known as DOS Programmer s Reference, 4thEdition , the authors are of the United States Terry Dettman and AllenL.Wyatt, Sr.. This book is a reservation Que bibliography, content integrity, and to explain clearly, in the introduction of DOS programming books, this book is the most influential over the years, one of the most popular books.
- 2022-06-21 00:08:19下载
- 积分:1
-
著名游戏《贪吃蛇》的源码,使用VC6打开并且编译。欢迎指正。...
著名游戏《贪吃蛇》的源码,使用VC6打开并且编译。欢迎指正。-famous game "huge memory," the source, the use of open and VC6 compiler. Welcome correction.
- 2022-05-12 12:33:04下载
- 积分:1
-
一系列的类别,有模板,运营商
一个array的类,有模板,运算符-An array of categories, there are templates, operator
- 2022-05-26 20:03:50下载
- 积分:1
-
此程序为数据结构赫夫曼编码与译码程序,具有简单实用的优点...
此程序为数据结构赫夫曼编码与译码程序,具有简单实用的优点-Written for Huffman Coding and Encoding of data constrution, easy and useful.
- 2022-03-20 01:26:45下载
- 积分:1
-
vc实现的windows平台下GE MMT列车监控协议
vc实现的windows平台下GE MMT列车监控协议-vc realize the windows platform GE MMT Train Supervision agreement
- 2023-04-09 03:05:04下载
- 积分:1
-
添加菜单,演示的是一个颜色菜单的添加
添加菜单,演示的是一个颜色菜单的添加-add menu is a demonstration of the menu to add color
- 2022-09-26 23:00:03下载
- 积分:1
-
Source code for Basilsik
Source code for Basilsik
- 2022-05-24 21:54:17下载
- 积分:1
-
用stack做的迷宫程序, 请大家点评;望大家能用得上
用stack做的迷宫程序, 请大家点评;望大家能用得上-do with the Maze procedure, please Comments; We can look useful
- 2023-05-08 00:05:03下载
- 积分:1
-
Othello games
简单的黑白棋,用VC++2008做成,还有一些Bug,评估函数不太好,所以电脑有点弱智-Othello games
- 2022-08-23 17:04:10下载
- 积分:1