标签:style blog class c code java
void BubbleSort(int a[], int n) { int i = 0; int j = 0; int tmp = 0; for (i = 0; i < n - 1; i++) { for (j = i + 1; j < n; j++) { if (a[i] > a[j]) { tmp = a[i]; a[i] = a[j]; a[j] = tmp; } } } }
标签:style blog class c code java
原文地址:http://www.cnblogs.com/LubinLew/p/BubbleSort.html