冒泡排序

 1 public void Solution(int[] a)
 2 {
 3     for(int i = 0;i < a.Length - 1;i++)
 4     {
 5         for(int j = 1;j < a.Length;j++)
 6         {
 7             if(arr[i] > arr[j])
 8             {
 9                 int temp = arr[i];
10                 arr[i] = arr[j];
11                 arr[j] = temp;
12             }
13         }
14     }
15 }
原文地址:https://www.cnblogs.com/zengneng/p/5575275.html