Here is the big OBig-O notation in both ArrayListArrayList and LinkedListLinkedList and also CopyOnWrite-ArrayList
CopyOnWrite-ArrayList:
ArrayList
get --> O(1)
add --> O(1)
contains --> O(n)
next --> O(1)
remove --> O(n)
iterator.remove --> O(n)
**LinkedList**
get --> O(n)
add --> O(1)
contains --> O(n)
next --> O(1)
remove --> O(1)
iterator.remove --> O(1)
**CopyOnWrite-ArrayList**
get --> O(1)
add --> O(n)
contains --> O(n)
get O(1)
add O(1)
contains O(n)
next O(1)
remove O(n)
iterator.remove O(n)
next --> O(1) LinkedList
remove --> O(n)get O(n)
add O(1)
contains O(n)
next O(1)
remove O(1)
iterator.remove O(1)
iterator.remove --> O(n) CopyOnWrite-ArrayList
get O(1)
add O(n)
contains O(n)
next O(1)
remove O(n)
iterator.remove O(n)
Based on these you have to decide what to choose :)Based on these you have to decide what to choose. :)