question–>
https://practice.geeksforgeeks.org/problems/merge-sort/1#
code–>
void merge(int arr[], int l, int m, int r)
{
int i=l;
int j=m+1;
int k=l;
int temp[100001]={0};
while(i<=m and j<=r){
if(arr[i]>arr[j]){
temp[k++]=arr[j++];
}
else{
temp[k++]=arr[i++];
}
}
while(i<=m){
temp[k++]=arr[i++];
}
while(j<=r){
temp[k++]=arr[j++];
}
int c=0;
for(int i=l;i<=r;i++){
arr[i]=temp[i];
c++;
}
}
it is showing TLE help!!