Time complexities

Report a typo

For each of the following operations (add, add at index, update), match them with their corresponding average and worst-case time complexities. The first is the average time complexity, and the second is the worst-case time complexity below.

Match the items from left and right columns
Update the value at the specified index
Add an element at the specified index
Add an element at the end of the array
O(1),O(n)O(1), O(n)
O(n),O(n)O(n), O(n)
O(1),O(1)O(1), O(1)
___

Create a free account to access the full topic