What is run error?

run error is showing up in many test cases even after the code is compiling and giving correct answers.

Hi Yash,
A run-error or a runtime error is an error which occurs due to an incorrect operation.

There are two types of errors - Compile Time Errors and Runtime errors

Compile Time errors occur due to syntax faults or invalid declarations. I’m sure you would have seen plenty while coding by now.

Runtime errors are an entirely different thing. Your code might work successfully for some inputs while give runtime error in others.
Example

int n ;
cin >> n;
int x = 100 / n;
cout << x;

While this program will run perfectly for all values of n , as soon as you give 0 as input this gives a runtime error.

There is nothing wrong with the syntax of the code but it failed for a specific input.

Another common reason for a run-error is accessing an invalid memory location.

int a[10] = {0};
int i ;
cin >> i;
cout << a[i] ;

Try entering a negative value of i or any value >=10 for this code.

Array reason is the most common one.

Try looking at your code and working out the corner cases where your code might be failing.