291,822 views
20 votes
20 votes
Please draw the dynamic array stack structure (you must mention the size and capacity at each step) after the following lines of code are executed. You should assume that the initial capacity is 2 and a resize doubles the capacity.

values = Stack()
for i in range( 16 ) :
if i % 3 == 0 :
values.push( i )
else if i % 4 == 0 :
values.pop()

User Wcan
by
2.4k points

1 Answer

17 votes
17 votes

Answer:

Step-by-step explanation:

dxfcgvhb

User Dmitry Poroh
by
2.9k points