ArrayList Implementations Time Complexities Flashcards
1
Q
ArrayList: get/set
A
O(1)
2
Q
ArrayList: add/remove
A
O(1 + n-i)
3
Q
ArrayStack: get/set
A
O(1)
4
Q
ArrayStack: add/remove
A
O(1 + n-i)
5
Q
RootishArrayStack: get/set
A
O(1)
6
Q
RootishArrayStack: add/remove
A
O(1 + n-i)
7
Q
ArrayDeque: get/set
A
O(1)
8
Q
ArrayDeque: add/remove
A
O(1+min{i, n-i})
9
Q
DualArrayDeque: get/set
A
O(1)
10
Q
DualArrayDeque: add/remove
A
O(1+min{i, n-i})
11
Q
LinkedList: all
A
O(1+min{i, n-i})
12
Q
DLList: all
A
O(1+min{i, n-i})