ArrayList: set(i, x)
O(1)
ArrayList: get(i)
O(1)
ArrayList: add(i, x)
O(1+n-i)
ArrayList: remove(i)
O(n-i)
LinkedList: all operations
O(1+min{i,n-i})
HashSet: all operations
O(1)
TreeSet: all operations
O(logn)
TreeSet(Sorted): all operations
O(logn)
HashMap: all operations
O(1)
TreeMapp^3: all operations
O(logn)
ArrayDeque: all operations
O(1)
LinkedList(Deque): all operations
O(1)
ArrayDeque(Queue): all operations
O(1)
LinkedList(Queue): all operations
O(1)
PrioityQueue: add(x)
O(logn)
PrioityQueue: remove()
O(logn)
PrioityQueue: element()
O(1)
sort(list):
O(nlogn)
min(c)/max(c):
O(n)
reverse(list):
O(n)
binarySearch(list, x):
O(logn)