Science, asked by rrchaudharice, 1 month ago

Let's imagine we add support to our dynamic array for a new operation PopBack (which removes the last element). PopBack will reallocate the dynamically-allocated array if the size is \leq≤ the capacity / 2 to a new array of half the capacity. So, for example, if, before a PopBack the size were 5 and the capacity were 8, then after the PopBack, the size would be 4 and the capacity would be 4.

Give an example of nn operations starting from an empty array that require O(n^2)O(n
2
) copies.

Answers

Answered by vishaljayant145
0

Answer:

popback capacity

Explanation:

gajab hai ye to mere bhai

Similar questions