Ans is B
Initially the array must be empty that is, it must contain 0 number of elements. Now we are given that top 1 = -1 and top2= n
when no elements are inserted the 2 pointers remain in their same location, i.e. -1 and n
now putting these values in equation a and b we get
a) n-top2+top1
= n-n+(-1)
= -1
b) n+1−top2+top1
= n+1-n-1
=0
As we all know initially the elements in the array is 0. therefore b is the ans.. :)