Merge sort- recursion

Please tell my mistake in code :-

hello @prerak_semwal

check line 15, u are not copying array correctly

@aman212yadav
yes…I corrected it
I added two delete statements too.
code is now working correctly I guess… but I am not sure about efficiency as it seems it could have been done more efficiently.
what’s your say ?

time complexity will remain nlog(n)

@aman212yadav
so my code’s fine ? (I have not learned calculating time complexity yet)

its fine , but use implementation that is given in video as it is very clean

1 Like

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.