Some test cases are not passing

https://ide.codingblocks.com/s/228789…plz help with the code

hello @dhirenkinha
value of n can be upto 10^5.
image

so increase ur array size