QuickSort Recursion problem

What is wrong in my code. I am unable to pass test case 2

@adityakumarsingh226 Reviewing it!

@adityakumarsingh226 Bro instead of storing your pivot in some variable what you are doing is taking arr[mid] directly, when swapping will be done arr[mid] value will change instantaneously.
Try dry running your code for:-
4
67 68 4 1

Resolve the doubt bro!
Check below the corrected code