Sir code is running but not a single test case is passing.. pls help me out with this.. whats the error?

hi @Vaibhav277, your code does’nt work for n>100 as you have declared your temp array of size 100
so replace line 11 with
int temp[200005];

thank you sir… it worked

great !! mark your doubt as resolved in case of no further query