template void bag::partition(int p, int r, int& pivot) { T x=array[p]; bool flag=true; int i=p-1; int j=r+1; while(flag==true) { do { j=j-1; }while(array[j]>x); do { i=i+1; }while(array[i]