If we delete A[0] or A[1] or A[3] , array will be balanced

(5+5) = (2+8)

So A[0] and A[1] and A[3] are special elements, so count is 3.

But it is given 2 why???

If we delete A[0] or A[1] or A[3] , array will be balanced

(5+5) = (2+8)

So A[0] and A[1] and A[3] are special elements, so count is 3.

But it is given 2 why???

If you remove A[3], the array will become:

[5,5,2,8]

Sum of even indices = 5+2=7

Sum of odd indices = 5+8=13

Hecne these are not equal.