Can you please explain why one of the testcases is not passing.
All testcases passing on Local Machine but one WA on CB Editor
@Sayon-Palit-2873308702757758 take input n before creating your array you have declared array of size n dynamically and after that u are taking input n
I hope your doubt is cleared if yes dont forget to mark it resolved 