What is the problem with my code?

Do one simple thing -
In the join function you have to merge two sorted arrays from indexes s to p and from p+1 to e. Make two separate arrays and merge them. Then update the values in the original array from s to e.
Tell me if you are able to do it. Else I will send you my code.

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.