登录
首页 » Windows开发 » Description: 对整型有序关键码序列进行折半查找,待排序序列以数组存储。如果找到待查记录,返回找到的位置下标,并删除该关键码记录;如果没找到待查记...

Description: 对整型有序关键码序列进行折半查找,待排序序列以数组存储。如果找到待查记录,返回找到的位置下标,并删除该关键码记录;如果没找到待查记...

于 2023-05-15 发布 文件大小:4.79 kB
0 26
下载积分: 2 下载次数: 1

代码说明:

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

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 测试数据库连接
    能够测试一个地方的数据库是否联通,定时检测数据库访问是否正常,包含源码,修改地址就可以
    2022-05-25 23:50:39下载
    积分:1
  • 中马(禅鼠标瞄准)是一个较大的工程实例包含在…
    ZoMA (Zen of Mouse Aiming) is one of two larger example projects contained within the code repository. The game involves testing and measuring the player’s mouse reaction, aiming and tracking skills. From an educational point of view, the code hopefully provides some examples of GUI construction and illustrates a design that facilitates the introduction of new test types. This project is created using Netbeans.
    2023-05-16 11:45:05下载
    积分:1
  • It will check for the subscribed user, if he /she is not a valid user will get t...
    It will check for the subscribed user, if he /she is not a valid user will get the error message.
    2022-05-21 10:50:03下载
    积分:1
  • 利用opencv 读取视频 并作处理转化成单通道图像再处理二值化前景图...
    利用opencv 读取视频 并作处理转化成单通道图像再处理二值化前景图-Opencv read and make use of video processing into a single image binarization prospect of re-treatment plan
    2022-11-11 00:50:09下载
    积分:1
  • 简单的拼图程序,ketty,里面涉及了切片,让你了解关于图片的处理...
    简单的拼图程序,ketty,里面涉及了切片,让你了解关于图片的处理-Simple puzzles procedures, ketty, which involves slicing, let you learn more about image processing
    2022-03-11 10:04:56下载
    积分:1
  • OFDM 仿真使用 MATLAB
    本文讨论的设计与实现 在无线通信中使用 OFDM 调制解调器。的 使用 OFDM 作为其协议的文本和二进制文件的传输 以及系统参数已详细解释。这 技术具有高传输速率超过钢丝线和无线 从多径衰落,可以转出到保护与渠道 在第四代 (4g) 手机是一种预测的技术。它 一种理想的带宽技术独占像视频的应用程序吗 会议、 民建联、 DVB 等。多用户容量可能使用 MC-CDMA。在多数情况下,正交频分 多路复用 (OFDM) 是在整个正在使用的标准 世界实现必要的数据密集型的高数据率 应用程序必须变得司空见惯。误码率和 多径环境中传统技术如 ISI QAM 是非常高,可以通过实施减少
    2022-01-25 19:36:16下载
    积分:1
  • VC++6.0 CGrindCtrl+ ODBC VC++6.0 CGrindCtrl+ ODBC VC++6.0 CGrindCtrl+ ODBC
    VC++6.0 CGrindCtrl + ODBC 数据库操作 VC++6.0 CGrindCtrl + ODBC 数据库操作-VC++6.0 CGrindCtrl+ ODBC VC++6.0 CGrindCtrl+ ODBC VC++6.0 CGrindCtrl+ ODBC
    2022-03-22 21:34:39下载
    积分:1
  • WPF多点触控简单示范程序
    VS2012环境编写,WPF下的触控演示程序.可以对WPF触控有个简单的了解,也有助于了解TUIO~可以达到显示器硬件支持的最大触点数.触摸后会得到每个触点的ID,生成跟随触点移动的有色框,框中显示触点ID信息.有色框随手指移动而移动,抬起后消失.
    2022-01-26 02:15:55下载
    积分:1
  • 该代码是在Turbo c中实现了一个界面化的娱乐小程序,包含了日历、时钟、贪食蛇游戏...
    该代码是在Turbo c中实现了一个界面化的娱乐小程序,包含了日历、时钟、贪食蛇游戏-the code is in Turbo c fulfill the interface of a small entertainment procedures, including a calendar, clock, Tanshichi games and so on. .
    2022-10-02 09:20:03下载
    积分:1
  • use of the characteristics of the development of button controls
    使用delphi开发的特色按钮控件-use of the characteristics of the development of button controls
    2022-05-10 18:14:30下载
    积分:1
  • 696522资源总数
  • 104027会员总数
  • 45今日下载