>n; intr[n]; cout<<"输入整型数组r[n]各元素的值:"<>r[i]; }//输入数组r[n] CreatHeap(r,n);//建初堆 cout<<"将r[n]调整为大根堆-堆排序-c++ - IMDN开发者社群-imdn.cn" /> >n;intr[n];cout<<"输入整型数组r[n]各元素的值:"<>r[i];}//输入数组r[n]CreatHeap(r,n);//建初堆cout<<"将r[n]调整为大根堆,得:"<>k;//输入待删除的元素序号 Del(r,k,n);//删除第k个节点后重新调整堆,时间复杂度O(logn)cout<<"删除完毕"< >n;intr[n];cout<<"输入整型数组r[n]各元素的值:"<>r[i];}//输入数组r[n]CreatHeap(r,n);//建初堆cout<<"将r[n]调整为大根堆,得:"<>k;//输入待删除的元素序号 Del(r,k,n);//删除第k个节点后重新调整堆,时间复杂度O(logn)cout<<"删除完毕"<
登录
首页 » c++ » 堆排序

堆排序

于 2022-02-04 发布 文件大小:1.10 kB
0 125
下载积分: 2 下载次数: 1

代码说明:

堆排序算法,c++实现 主函数 int main(){ int n; cout

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

发表评论

0 个回复

  • IEButtonDemo
    界面示例,讲述如何在MFC中生成一个动态按钮(Interface example, describes how to generate a dynamic button in MFC)
    2011-05-19 13:54:28下载
    积分:1
  • Sale
    销售分析系统主要由系统设置、代理管理、业务管理、数据报表和图表分析等模块组成:欢迎大家参考学习~(In order to protect the security of the entire system, online examination system to achieve a classification validation login module, through this module, you can log in to different user identity verification, to ensure that the identity of users of different operating systems. On taking questions, the system uses random questions the way, reflects the exam objectivity and impartiality. When the candidates answer is completed, submit papers to the examination score that reflects the efficiency of the system. On the background of management, the administrator of backstage management module and test management module. Respectively, to adapt to different users, senior systems administrator to enter only the former, the whole system management. Whereas the latter allows teachers to log on, teachers can teach subjects for their questions to be modified, and you can see all the subjects taught himself participated in student achievement.)
    2014-03-25 10:05:39下载
    积分:1
  • MysqlTest
    可以实现太阳系八大星系,一个非常实用的代码(Eight Planets of the Sun)
    2020-06-25 21:00:02下载
    积分:1
  • Cprogram
    该程序是通信中认知无线电的频谱预测模型的相关源代码,对通信方面的同学非常有用,带平台(The program is the communication of cognitive radio spectrum prediction model related to the source code, for communications students very useful, with platform )
    2011-12-15 15:44:56下载
    积分:1
  • FileSpliter
    快速切割文件为多块,有时候对于单个文件 大小有限制又不想用winrar的分卷压缩,而直接原文件的分块存放时就需要直接分割.(Rapid cutting document multi-block, sometimes for a single file size restrictions also do not want to use the sub-volume compression winrar directly block the original documents stored directly on the need to partition.)
    2008-12-24 16:41:57下载
    积分:1
  • ZNMC
    基于STC89C52单片机实现防夹手智能门窗(Based on STC89C52 MCU splines smart windows and doors)
    2016-02-17 15:42:42下载
    积分:1
  • bmpscrollview
    用于BMP图像文件的滚动显示,带上下和水平滚动条。(This file is used to display BMP image files, with up-down and horizontal scroll bars.)
    2013-07-10 16:44:33下载
    积分:1
  • stm32f10xx工程模板
    本程序主要是基于STM32F10X配置的工程模板,编译器为MDK5.1,添加串口驱动,简单的LED驱动,延时函数等
    2022-07-27 16:11:08下载
    积分:1
  • 端口扫描工具源码
    说明:  C# 端口扫描工具系统源码 (PortScanner)(C# port scanning tool system source code (portscanner))
    2020-11-02 10:09:55下载
    积分:1
  • AD9850 AD 9851 并行 串行控制程序
    AD9850 AD 9851 并行 串行控制程序 很好的资料 以前自己花钱买的啊 (AD9850 AD 9851 serial parallel data control procedures well before the own money ah)
    2010-08-17 16:48:21下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载