Skip to content
RED SAGSkills
hard20 pts · first answer countsstacks-and-queues

Why doubling keeps push at O(1)

An array-backed stack doubles its capacity when full, copying all items. Over n pushes starting from capacity 1, how many element copies happen in total, at most?

Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions