Quicksort problem doubt

not getting correct output

@guptashubham210a while partioning we have to swap the array index value having pivot with arr[j] so your code at line 16 should be like this swap(arr[j],arr[h]);

arr[h] is pivot na?so why not pivot

we have to send value at jth index(arr[j]) to hth index so if we swap it with pivot then arr[j] will conatin pivot which is okay but then your arr[h] will never get updated (cause you send the arr[j] to variable pivot not at arr[h]) and will also contain pivot.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.