Help me solve the following algorithm. In this case, it is a vector of 20 positions. My doubt is what values would be stored in vector A?
for (i=1, A[0]=1; i< A.lenght; i++)
A[i] = A[i-1]*2;
Correct answer:
a - Elements of type 3i for i
b - Elements of type 2i for i
c - Elements of type i2 for i
d - Elements of type ii for i
Could you explain the correct answer to me?