Small doubt in finding the missing number problem

question: finding the missing number

answer:

doubt: why x1 is a[0] why not 0

hello @aarijrab
because the for loop is starting from 1.

if we start loop from 0,then x1 should be 0.

if the for loop had started form 0 then x1=a[0] or just [0]…here he used x1=a[0]…this means 1^1^2^4^5^6 but we want only one 1

@aarijrab
refer this->

i already mentioned that if we want to run loop from index 0
then x1 should be intitialised with 0