温故而知新:C++常用排序算法
选择排序法SelectionSort(int arr[],int n)
template <typename T>
void SelectionSort(T arr[],int n)
{
int smallIndex; //表中最小元素的下标
int pass,j; //用来扫描子表的下标
T temp; //用来交换表元素的临时变量
顶(0)
踩(0)
下一篇:基础入门:C++简介
- 最新评论
