Max Heap |
max() - Θ(1), extractMax() - O(nlogn), increaseKey() - O(logn), insert() - O(logn), heapify() - O(logn), heapsort() - O(nlogn) |
Min Heap |
min() - Θ(1), extractMin() - O(nlogn), insert() - O(logn), heapify() - O(logn), heapsort() - O(nlogn) |
MinMax Heap |
min() - Θ(1), max() - Θ(1), extractMin() - O(nlogn), extractMax() - O(nlogn), insert() - O(logn), heapify() - O(logn) |
Disjoint Set |
makeSet() - Θ(1), findSet() - Θ(1), union() - Θ(1) |
Trie |
insert() - O(|s|), search() - O(|s|), searchPrefix() - O(|s|), remove() - O(|s|), size() - O(1) |
Stack |
push() - Θ(1), pop() - Θ(1), empty() - Θ(1), size() - Θ(1), peek() - Θ(1) |
Queue |
enqueue() - Θ(1), dequeue() - Θ(1), empty() - Θ(1), size() - Θ(1) |
Binary Search Tree |
insert() - O(n), search() - O(n), delete() - O(n), contains() - O(n), minimum() - O(n), maximum() - O(n), size() - Θ(1), successor() - O(n), preOrderVisit() - O(n), inOrderVisit() - O(n), postOrderVisit() - O(n) |
Double Linked List |
insertFront() - Θ(1), removeFront() - Θ(1), insertBack() - Θ(1), removeBack() - Θ(1), head() - Θ(1), size() - Θ(1) |
Linked List |
insertFront() - Θ(1), removeFront() - Θ(1), head() - Θ(1), size() - Θ(1) |
Graph |
buildAdjacencyMatrix() - Θ(|V|^2), buildAdjacencyList() - Θ(|V| + |E|), addEdge() - Θ(1) |
Red-Black Tree |
insert() - O(logn), search() - O(logn), delete() - O(logn), minimum() - O(logn), maximum() - O(logn), successor() - O(logn) |
Interval Tree |
insert() - O(logn), search() - O(logn), find() - O(logn), findAll() - O(n), delete() - O(logn), minimum() - O(logn), maximum() - O(logn), successor() - O(logn) |
Segment Tree |
build() - O(n), update() - O(logn), search() - O(logn) |
AVL Tree |
insert() - O(logn), search() - O(logn), delete() - O(logn), minimum() - O(logn), maximum() - O(logn), successor() - O(logn) |
B-Tree |
insert() - O(th), search() - O(th), delete() - O(th), successor() - O(th), predecessor() - O(th) |
Fibonacci Heap |
insert() - O(1), minimum() - O(1), extractMin() - O(logn), decreaseKey() - O(1), delete() - O(logn) |
Merkle Tree |
build() - O(n), verify() - O(logn), getProofPath() - O(logn) |