>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 100
下载积分: 2 下载次数: 1

代码说明:

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

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

发表评论

0 个回复

  • HomePay
    Home pay cez bg software
    2015-11-01 14:58:36下载
    积分:1
  • Wireless_interface_using_MSP430
    基于TI的MSP430处理器控制CC1100-CC2500射频芯片的代码,包括发送和接受端,使用IAR开发环境。(Based on TI' s MSP430 processor controlled radio frequency chip CC1100-CC2500 code, including the sending and the receiving end, the use of IAR development environment.)
    2009-05-20 17:16:09下载
    积分:1
  • Intelligence-car
    智能避障停车灭火机器人,用C编写的参考程序(Intelligence obstacle avoidance parking fire fighting robot C program)
    2012-07-02 13:59:16下载
    积分:1
  • bp_demo
    一个简单的bp神经网络预测程序,包括简单的GUI界面(A simple BP neural network prediction program, including a simple GUI interface)
    2017-11-03 10:54:19下载
    积分:1
  • TKinnematicSih
    运用Matlab仿真工具,结合机械臂运运动学特性,实现了机械臂系统的运动学仿真。 (Use the Matlab simulation tools, combined with the kinematic characteristics of the robotic arm transported the kinematics of the manipulator system simulation.)
    2012-07-22 23:31:24下载
    积分:1
  • windows屏幕手写键盘
    制作一个屏幕键盘最主要的核心就是焦点的问题,如何才能打字的时候让窗体得不到焦点,我主要想说说这个。 让窗体得不到焦点使用API函数SetWindowLong()即可搞定这个问题,但是又不能让其一直都得不到焦点否则窗体就没法拖动了,所以还要弄个鼠标钩子来监控鼠标行为,若鼠标点击在程序的按键区域就让窗体失去焦点,若点击在按键区以外包括程序边框都让其得到焦点,这样就搞定了这个最核心的问题
    2022-07-25 07:05:53下载
    积分:1
  • IIR
    无限脉冲响应数字滤波器IIR算法c语言.c文件(Infinite impulse response IIR digital filter algorithm c language)
    2014-12-22 16:59:52下载
    积分:1
  • BT_Tutorial
    Bloutooth Test Enrionment Testing some Bluetooth-Functions
    2015-04-10 21:21:44下载
    积分:1
  • SHA1
    说明:  SHA1安全哈希算法(Secure Hash Algorithm)主要适用于数字签名标准 (Digital Signature Standard DSS)里面定义的数字签名算法(Digital Signature Algorithm DSA)(SHA1 Secure Hash Algorithms are mainly applicable to Digital Signature Algorithms (DSA) defined in Digital Signature Standard DSS.)
    2020-12-05 20:29:22下载
    积分:1
  • YITTVR
    说明:  编译的图形软件的一部分程序可以画出直线圆弧矩形(graphics software compiler part of the procedure can draw straight rectangular arc)
    2006-05-11 15:35:39下载
    积分:1
  • 696518资源总数
  • 106222会员总数
  • 14今日下载