package com.sorts;
public class BubbleSort {
/**
* 冒泡排序,大数下沉到最末位置
* 时间复杂度为:
* 最好:O(n);平均:O(n^2);最坏:O(n^2)
* 空间复杂度: O(1)
* @param a[]
*/
public static void bubblesortbig(int[] a){
int i,j;
int temp;//最大值
for(i=0; i<a.length; i++)
{
temp = a[0];
public class BubbleSort {
/**
* 冒泡排序,大数下沉到最末位置
* 时间复杂度为:
* 最好:O(n);平均:O(n^2);最坏:O(n^2)
* 空间复杂度: O(1)
* @param a[]
*/
public static void bubblesortbig(int[] a){
int i,j;
int temp;//最大值
for(i=0; i<a.length; i++)
{
temp = a[0];