冒泡排序和快速排序

一、冒泡排序

 public static void bubbleSort(int []arr) {
 
        for(int i =1;i<arr.length;i++) { 
            for(int j=0;j<arr.length-i;j++) {
                if(arr[j]>arr[j+1]) {
                    int temp = arr[j];                     
                    arr[j]=arr[j+1];                     
                    arr[j+1]=temp;
            }
            }    
        }
    }
 
二、快速排序
 
原文地址:https://www.cnblogs.com/wangcp-2014/p/11527637.html