#include
using namespace std;
int get_int(void);
int countSort (int*array,int n,int d); int get_value(int a,int d);
void radixSort(int* a,int n,int d); void quickSort(int a[],int,int); //选择排序
void selectionSort(int a[],int n) {
bool sorted = false;
for(int size = n;!sorted && (size>1); size--) {
int indexOfMax = 0; sorted = true;
for(int i = 1;i sorted = false; swap(a[indexOfMax],a[size-1]); for(int i=0;i //冒泡排序 bool bubble(int a[],int n) { bool swapped = false; for(int i =0;i if(a[i]>a[i+1]) { swap(a[i],a[i+1]); swapped = true; } for(int x=0;x<6;x++) cout< cout<<\ } return swapped; } void bubbleSort(int a[],int n) { for (int i =n; i>1 && bubble(a,i);i--); } //插入排序 void insertionSort(int a[],int n) {