asked 96.8k views
5 votes
How many cost units are spent in the entire process of performing 40 consecutive append operations on an empty array which starts out at capacity 5, assuming that the array will grow by a constant 2 spaces each time a new item is added to an already full dynamic array

asked
User Murnax
by
8.3k points

1 Answer

3 votes

Answer:

Step-by-step explanation:

260 cost units, Big O(n) complexity for a push

answered
User Mwoa
by
6.8k points