* 버블 정렬 예제 (Java)
int[] arr = {8,6,4,2,5,1,3,7};
for(int i=(arr.length -1); i>0; i--){
for(int j=0; j<i; j++){
int temp = 0;
if(arr[j] > arr[j+1]){
temp = arr[j];
arr[j] = arr[j+1];
arr[j+1]= temp;
}
}
}
System.out.println(java.util.Arrays.toString(arr));