1/7
Looks like no tags are added yet.
What is the time complexity of ‘add(at end)’ for these methods:
ArrayList
Doubly LinkedList
Amortized O(1) for AList
O(1) for Doubly
What is the time complexity of ‘get(index)’ for these methods:
ArrayList
Doubly LinkedList
O(1) for AList
O(n) for Doubly
What is the time complexity of ‘set(index)’ for these methods:
ArrayList
Doubly LinkedList
O(1) for AList
O(n) for Doubly
What is the time complexity of ‘add(at start)’ for these methods:
ArrayList
Doubly LinkedList
O(n) for AList
O(1) for Doubly
What is the time complexity of ‘add(at some index)’ for these methods:
ArrayList
Doubly LinkedList
O(n) for AList
O(n) for Doubly
What is the time complexity of ‘remove(at start)’ for these methods:
ArrayList
Doubly LinkedList
O(n) for AList
O(1) for Doubly
What is the time complexity of ‘remove(at end)’ for these methods:
ArrayList
Doubly LinkedList
O(1) for AList
O(1) for Doubly
What is the time complexity of ‘remove(at some middle index)’ for these methods:
ArrayList
Doubly LinkedList
O(n) for AList
O(n) for Doubly