Data Structure
|
Add
|
Find
|
Delete
|
GetByIndex
|
Array (T[]) |
O(n)
|
O(n)
|
O(n)
|
O(1)
|
Linked list (LinkedList<T>) |
O(1)
|
O(n)
|
O(n)
|
O(n)
|
Resizable array list (List<T>) |
O(1)
|
O(n)
|
O(n)
|
O(1)
|
Stack (Stack<T>) |
O(1)
|
-
|
O(1)
|
-
|
Queue (Queue<T>) |
O(1)
|
-
|
O(1)
|
-
|
Hash table (Dictionary<K,T>) |
O(1)
|
O(1)
|
O(1)
|
-
|
Tree-based dictionary
(SortedDictionary<K,T>)
|
O(log n)
|
O(log n)
|
O(log n)
|
-
|
Hash table based set
(HashSet<T>)
|
O(1)
|
O(1)
|
O(1)
|
-
|
Tree based set
(SortedSet<T>)
|
O(log n)
|
O(log n)
|
O(log n)
|
-
|