Quiz Question 1 of 3
Why do array inserts and deletes have a linear runtime in the worst case?
Choose the correct answer below:
-
A
Every element in the array has to be shifted to either the left (deletes) or right (inserts)
-
B
With insert operations, the array needs to read every value to ensure it doesn't insert the same value twice
-
C
With deletes the array needs to search for the element before it can delete it and this can take an n number of read operations