Getting runtime error

Why i am getting runtime error in my merge sort code

hello @coderajay03

update the size of temp array.
it size should be atleast e+ 1 because u are accessing index e

oh yes sorry did a mistake there. thankyou bhaiya !

don’t know made according changes but now getting TLE

@coderajay03

IT IS WORKING FINE ON MY SIDE.

dont know but i am getting tle

I HAVE SHARED THE CODE LINK , TRY TO SUBMIT IT

okay so difference was that I initialized temp array with all elements 0 but why giving TLE in that case

INITIALISATION TAKES EXTRA TIME.

okay really that leads to TLE ??

usually it not happens(initilaisation does not cause tle) but for this problem time constraint are strict .
thats why it is giving tle

okay bhaiya got that

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.