🧠

Array

  • Stores data in computer memory contiguously
    • If an array runs out of memory, it needs to be reallocated to a different block

Complexity

Average TimeSpace
Access$O(1)$$O(n)$
Search$O(n)$$O(n)$
Insert$O(n)$$O(n)$
Delete$O(n)$$O(n)$
Append$O(1)$$O(n)$

Computer Science Data Structure