In above problem when I am running testcase it is showing correct output but i am submitting it is showing run error !!
link to my solution :
In above problem when I am running testcase it is showing correct output but i am submitting it is showing run error !!
link to my solution :
have you take a look at constraints
Constraints
array size is large
but in you code you have take only 100 size array
change the size of array to 200000
you code will pass all testcases
i hope this helps
if your doubt is resolved
please mark it as resolved form doubts section in your course