Data Structures
List of Data Structures¶
-
Array - O(1) access
-
Linked List - O(n) access
-
Stack - O(1) push/pop
-
Queue - O(1) enqueue/dequeue
-
Deque - O(1) both ends
-
Hash Table - O(1) average operations
-
Heap - O(log n) operations
-
Priority Queue - O(log n) operations
-
Binary Search Tree (BST) - O(log n) average
-
AVL Tree - O(log n) guaranteed
-
Red-Black Tree - O(log n) guaranteed
-
B-Tree - O(log n) disk-optimized
-
Trie - O(m) string operations
-
Graph - Various algorithms