Arrays Flashcards
1
Q
Arrays - How fast Get / Sets?
A
O(1) Constant time
2
Q
Arrays - How fast Inserts?
A
O(n) (have to work through all the array elements)
3
Q
Arrays How fast Deletes
A
O(n) (have to work through all the array elements)
4
Q
Array Killer feature
A
Randsom Access
5
Q
Describe Array Capacity
A
Fixed Doesn’t automatically grow
6
Q
How do you increase the size of an array
A
Double in size (when resizing)
7
Q
Does each memory cell of an array us the same number of bytes?
A
yes
8
Q
How can arrays be access in constant time O(1)
A
Because each memory cell of an array us the same number of bytes