摘要:
#include <stdio.h>
#include <stdlib.h> void swap(int * a,int *b)
{ int tmp = (*a); (*a) = (*b); (*b) = tmp;
} void bubble_sort(int data[],int size)
{ for(int i=0; i<size-1; i++)// only need size-1 times { int flag = 0; for(int j=0; j<size-i-1; j++)// sort from small to big { if(dat 阅读全文