SORTING_IN_LINEAR_TIME _error

https://hack.codingblocks.com/contests/c/59/423
my code is running properly for one testcase but for another case its showing runerror, plz help me how to solve run errors in my code
https://ide.codingblocks.com/s/61762

Hi Sonam, run-error usually occurs when the array index goes out of bounds or there’s something like division by zero i.e. such errors which are not detected at compile-time but are detected at run-time. Like in this problem, if we increase the size of arrays to 100000, both test cases are passed.
https://ide.codingblocks.com/s/61902

1 Like