//Bubble sort Algorithm
// Java program for implementation of BubbleSort
class BubbleSort
{
/* Fuction Implementing Bubble Sort Algorithm */
void sort(int arr[]){
int length = arr.length;
for(int i=0; iarr[j+1]){
int temp=arr[j+1];
arr[j+1]=arr[j];
arr[j]=temp;
}
}
/* A utility function to print array of size n */
static void printArray(int arr[])
{
int n = arr.length;
for (int i=0; i