What could be reason for run error

one test case is correct but other one is showing run error

Hello @AjAy03 ,

Runtime error can occur due to following reasons:

  1. Invalid memory access during run-time.
  2. Accessing linked list nodes that do not exist.
  3. Dividing by zero.
  4. Large allocation of memory together/Large Static Memory Allocation.
  5. Making a silly mistake.

In your program you are dealing with 1. case.

It is mentioned in the code that N<1000.
and you have declared an Array of 10 rows and 10 columns.
Is it enough to hold this big data.

Hope, this will help.
Give a like, if you are satisfied.

1 Like