Please provide the dynamic array stack structure (you must list the stack contents, size, and capacity in format provided below) after each iteration of the for loop after the following lines of code are executed. You should assume that the initial capacity is 1 and that before pushing each new element, the algorithm checks the size. If size == capacity, the capacity is doubled, and all the elements are copied to the new memory location.
values = Stack()
for i in range( 12 ) :
if i % 3 == 0 :
values.push( i )
elif i % 4 == 0 :
values.pop()
Use the following format in the box below:
i = , values = [ ] , size = , capacity =
(For example, not the right answer: i = 0, values = [23], size = 1, capacity = 1)