Please check and tell why this code is showing tle? Is there any other way of doing optimised merge sort?
Tile limit error on code submission
Hey @Aparna there were couple of problems in your code
- while assigning arr equals to temp loop would start from s not 0, so in line 30 for(i=0;i<=e;i++) would change to for(i=s;i<=e;i++)
- In the merge sort the first argument should be an array so instead of long int arr, write long int arr[]
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.
1 Like