I have written code according to the hint but not getting the ans

Hi @harshulgarg21,
in ur code , assign these value
low=0;
mid=0;
high=n-1;
not the value of array.
Hope dis helps

After making the necessary changes then also it is not passing the test cases

@harshulgarg21,
while outping ur answer, use cout<<arr[i]<<endl;
hope dis will help.

still I am not getting the correct ans

@harshulgarg21
refer to dis

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.