蓝桥杯练习025

蓝桥杯练习025
归并排序
#include
using namespace std;
int helper[10];
void Merge(int arr[],int p,int mid,int r){
for(int i=0;i<10;i++) helper[i]=arr[i]; int left=p; //左指针 int right=mid+1;//右侧指针 int cur=p; while(left<=mid&&right<=r){ if(helper[left]<=helper[right]){ arr[cur++]=helper[left++]; }else{ arr[cur++]=helper[right++]; } } while(left<=mid){ arr[cur++]=helper[left++]; } } vo

蓝桥杯练习025最先出现在Python成神之路

版权声明:
作者:congcong
链接:https://www.techfm.club/p/25439.html
来源:TechFM
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
< <上一篇
下一篇>>