Custom case passing but cannot find why it is giving run time error.
Code is giving Run Time Error
Check the constraints
Constraints
1<=N<=10^6 0<=Ai<=10^6
Array size can be upto 10^6 but you have restricted it to 10^5. Increase that and then check.
its still giving run time error
Refer to this implementation
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.