What is the problem in this quicksort algorithms one element gets printed multiple times
@rohitkandpal683, at line 15, instead of swap(a[i+1],pivot);
it should be swap(a[i+1],a[right]); , you have to swap with the pivot element in the array not the local variable.