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

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

于 2023-05-15 发布 文件大小:4.79 kB
0 147
下载积分: 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 个回复

  • 使用 C# 编写简易 ASP.NET Web 服务器
    你是否有过这样的需求 想运行 ASP NET 程序 又不想安装 IIS 或者 Visual Studio 我想如果你经常编写 ASP NET 程序的话 应该或多或少都会碰到这种情况 除了使用 IIS 和 VS 我们还有哪些方式可以运行 ASP NET 程序呢 自己写一个支持 ASP NET 的 Web 服务器怎么样 NO NO NO 如果你只是想找个这样的工具的话 那完全没必要 我们知道使用 VS 可以运行 ASP NET 程序 那么我们就可以找出 VS 所调用的程序 将其拷贝到没有 VS 和 IIS 的环境中运行 就能运行 ASP NET 程序了 安装了 VS 的朋友可以到 C: Program Files Common Files Microsoft Shared DevServer 这个目录里面找找看 这个程序的使用方式如下 ">你是否有过这样的需求 想运行 ASP NET 程序 又不想安装 IIS 或者 Visual Studio 我想如果你经常编写 ASP NET 程序的话 应该或多或少都会碰到这种情况 除了使用 IIS 和 VS 我们还有哪些方式可以运行 ASP NET 程序呢 自己写一个
    2022-03-15 11:11:47下载
    积分:1
  • 51单片机交流电压表
    基于stc89c52单片机的交流电压表,交流测量范围0-500V  测量精度5%  超量程声光报警  PC机串  通口信  量程自动切换电路:完成信号量程选择及其小数点位置选择。
    2022-07-14 09:18:24下载
    积分:1
  • a powerful dictionary but easy to program. Welcome to download, and you must be...
    一款不错的词霸,制作简单,但是功能强大!请大家下载,一定会很happy!-a powerful dictionary but easy to program. Welcome to download, and you must be happy to use it.
    2023-05-11 10:30:03下载
    积分:1
  • RTF
    The RTF-control is a very useful beast, but it takes a nerve-grating amount of code to accomplish even the most basic formatting tasks. Adding the capabilities to easily edit formatted text is often a boon to an application, but taking this amount of work? Why not some commands to get and set the RTF directly? Save and load to a file? Built-in editing buttons?
    2022-05-10 22:03:52下载
    积分:1
  • 鼠标取词.rar
    鼠标取词.rar-word from the mouse. Rar
    2022-01-24 14:01:34下载
    积分:1
  • I2C project by using PICf458 and TNC75 (term sensor)
    I2C project by using PICf458 and TNC75 (term sensor)
    2022-06-19 07:04:48下载
    积分:1
  • VB简单写的一个 希望大家喜欢啊 可以下载了吗
    VB简单写的一个 希望大家喜欢啊 可以下载了吗-writed by VB, I hope that everybody can like it, now can I download resource?
    2022-07-09 15:12:26下载
    积分:1
  • small program used to prepare the vc can see
    读留言的小程序 用vc++编写的 可以看看 -small program used to prepare the vc can see
    2022-05-28 04:38:37下载
    积分:1
  • 电子学英语词汇,比较好的词汇书,希望有所帮助
    电子学英语词汇,比较好的词汇书,希望有所帮助-E-learning English vocabulary, a better vocabulary and hopes help
    2022-06-15 08:39:56下载
    积分:1
  • 关控制程序,可自由控制驱动,方便歌剧…
    光控开关控制程序可以自由控制驱动,操作方便
    2022-03-30 12:08:22下载
    积分:1
  • 696516资源总数
  • 106658会员总数
  • 16今日下载