Search

Array

An array is a set of elements of the same size, located contiguously without gaps. As an array is contiguous structure, it is easy and fast to get an array item by index. Array only requires a memory address of the first head element.
Homogeneous vs Heterogeneous structure?
Homogeneous container is a type of array that can only store same type of item througout the list.
Heterogeneous container is a type of array that can store items with different types througout the list.

Examples of each type

Homogeneous Structured Array
Heterogenous Structured Array

Time Complexity of Arrays

Operation
Static Array
Dynamic Array
Access
O(1)
O(1)
Search
O(n)
O(n)
Insertion
N/A
O(n)
Appending
N/A
O(1)
Deletion
N/A
O(n)

Reference