what is the error in the code
One test case is not passing plz check it
you have put equal to into if condition but it should be in else if condition
correct one
while(i<piv && j>piv){
if(a[i]<a[piv]){
i++;
}else if(a[j]>=a[piv]){
j--;
}else{
swap(a[i],a[j]);
i++;
j--;
}
}
Modified Code