https://ide.codingblocks.com/s/52552 please suggest me what’s wrong in this code
Merge sort recursive
Hey Neeraj, check the constraints of the problem, it is mentioned that
N can of range 1<=N<=2*10^5 while you are taking the array of max size 1000 only and
array’s elements can be or range |Ai|<=10^9 so you are supposed to use long long int data type instead of int.
i tried this method but it again showing long long int
- check the spaced between “long long” and “int” in your code
-
long long int a[n];its not recommended to make such a big array at stack during run time update it like thislong long int* a = new int[n]; - you have taken the temp array of max size 100000 but N is of range 1<=N<=2*10^5 .
ok i got it thank you