could you please help me identify where am i doing wrong? i guess i coded it right
Runtime error in 2 test case
Runtime error can occur due to following reasons:
- Invalid memory access during run-time.
- Accessing linked list nodes that do not exist.
- Dividing by zero.
- Large allocation of memory together/Large Static Memory Allocation.
- Making a silly mistake.
The input array can be larger than 1000 elements.
Thus, do the following changes:
int n;
cin>>n;
int a[n];
Hope this would help.
Give a like, if you are satisfied.
1 Like