public static void bubbleSortImprv(int[] array){
boolean flag = true;
for(int i =0; i<array.length-1&&flag;i++){
flag = false;
for(int j = 0;j<array.length-i-1;j++){
if(array[j]>array[j+1]){
int temp = array[j];
array[j]=array[j+1];
array[j+1]=temp;
flag = true;
}
}
}
for(int i : array){
System.out.print(i+" ");
}
}