Array ADT Operations

CSC-211 · Semester III · Data Structures and Algorithms

Array ADT
0
50
1
61
2
47
3
57
4
55
5
23
6
79
7
11
8
60
9
84

Length

10

Comparisons

0

Writes

0

Index access is O(1) — that is why arrays beat lists for random reads. But inserting at the front shifts every element, costing O(n). Try inserting at index 0.