Array ADT Operations

CSC-211 · Semester III · Data Structures and Algorithms

Array ADT
0
86
1
34
2
47
3
68
4
10
5
38
6
23
7
39
8
74
9
28

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.