Merge sort problem

My test case is not working with an array size above 6
can you check my mistake in the code

you also have to consider the case when arr[i] == arr[j]
check the modified Code

Modified Code

Thanks a lot it was helpfull

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.