I am not sure on which testCase I am getting WA. This is my code.
I have tried on these testCases. Am I missing any?
6
1 1 1 1 2 2
5
1 2 3 4 5
5
5 4 3 2 1
5
1 1 2 2 200000000000
1
4
1 2 2 3
Your code gives -1 whereas 2 1 3 2 is a possible option?
1 Like
Thanks