91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

經(jīng)典排序算法合集C 書寫

資源截圖

代碼片段和文件信息

/*
??Name:排序算法大合集?
??CopyRight:
??Author:?Cz
??Date:?2019/10/1?21:29:02
??Description:
*/



#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
using?namespace?std;
typedef?long?long?ll;
const?int?maxn?=100;
int?num[maxn];//測試數(shù)組?
const?int?len?=?15;//數(shù)字大小?
const?int?inf?=?0x3f3f3f3f;
void?exch(int&?a?int&?b){
int?tmp?=?a;
a?=?b;
b?=?tmp;
}?
void??show(){
for(int?i=0;?i cout< }
cout<}


//選擇排序
//基本思想:每次選出一個(gè)最小值放在當(dāng)前位置上,一個(gè)一個(gè)碼好
void?selectSort(){
int?pos?=?0;
int?min?=?inf;
for(int?i=0;?i pos?=?i;
min?=?num[i];
for(int?j=i+1;??j

評論

共有 條評論