Hi..
Can you please explain how to calculate the time complexity for the code given below..
int flag,temp;
do {
flag=0;
for(int j=0;j<n;j++) {
if((j+1)==n)
continue;
if(a[j]>a[j+1]){
flag=1;
temp=a[j];
a[j]=a[j+1];
a[j+1]=temp;
}
}
}while(flag==1);