Why i<n-1 not i<=n-1 in this quesn

plz tell me i am confused wy not taking last element