//冒泡排序
func bubble_SortArr(array :inout [Int]) {
for i in 0..<array.count - 1{
for j in 0..<array.count - i - 1{
if array[j] > array[j+1]{
array.swapAt(j, j+1)
}
}
}
}
//swift提供的排序
func system_SortArr(array : [Int]) -> [Int] {
var arr : Array = [Int]();
for i in array{
arr.append(i)
}
arr.sort { (num1, num2) -> Bool in
return num1 < num2
}
return arr
}