In bubble sort, when first iteration of the inner for loop takes place,value of i is 0, so the loop will run till j is less than n, but when j becomes equal to n-1, and we do a[j+1] for another time why doesn’t this value go out of index of the array and theRead more