- Binary Tree |
- AVL Tree, Binary Search Tree, Tree Multiset |
- put, has, get, remove, size, insertTo, insertMany, fill, getDepth, getHeight, getMinHeight, getPathToRoot, isBalanced |
- getLeftMost, isBST, getSubTreeSizeAndCount, subTreeSum, subTreeAdd, BFS, DFS, DFSIterative, levelIterative, listLevels, getPredecessor, morris, |
-
-
-
- AVL Tree |
- |
- All the features inherited from Binary Tree, balanceFactor, updateHeight, balancePath, balanceLL, balanceLR, balanceRR, balanceRL |
- |
-
-
-
- Binary Search Tree (BST) |
- |
- All the features inherited from Binary Tree, lastKey |
- All the features inherited from Binary Tree, lesserSum, allGreaterNodesAdd, balance, isAVLBalanced |
-
-
-
- Tree Multiset |
- |
- All the features inherited from Binary Tree |
- All the features inherited from Binary Tree |
-
-
-
- Segment Tree |
- |
- build, updateNode, querySumByRange |
- |
-
-
-
- Binary Indexed Tree |
- |
- update, getPrefixSum, getRangeSum, BinaryIndexedTree.lowBit |
- |
-
-
- Graph |
- Directed Graph, Undirected Graph |
- getVertex, getVertexId, containsVertex, vertexSet, addVertex, removeVertex, removeAllVertices, containsEdge, setEdgeWeight, getAllPathsBetween, getPathSumWeight, getMinCostBetween, getMinPathBetween, |
- dijkstra, dijkstraWithoutHeap, bellmanFord, floyd, tarjan |
-
-
- Directed Graph |
- |
- All the features inherited from Graph, getEdge, addEdge, removeEdgeBetween, removeEdge, removeAllEdges, incomingEdgesOf, outgoingEdgesOf, degreeOf, inDegreeOf, outDegreeOf, edgesOf, getEdgeSrc, getEdgeDest, getDestinations, edgeSet, getNeighbors, getEndsOfEdge |
- All the features inherited from Graph, topologicalSort |
-
-
- Undirected Graph |
- |
- All the features inherited from Graph, getEdge, addEdge, removeEdgeBetween, removeEdge, degreeOf, edgesOf, edgeSet, getEdgesOf, getNeighbors, getEndsOfEdge |
- All the features inherited from Graph |
-
-
- Singly Linked List |
- |
- length, head, tail, size, get, getNode, findNodeIndex, findNode, find, findIndex, append, push, prepend, insertAt, removeNode, removeAt, insertBefore, sort, insertAfter, shift, pop, merge, clear, slice, reverse, forEach, map, filter, reduce, toArray, toString |
- |
-
-
-
- Hash |
- CoordinateSet, CoordinateMap |
- |
- |
-
-
- CoordinateSet |
- |
- has, set, get, delete |
- |
-
-
- CoordinateMap |
- |
- has, add, delete |
- |
-
-
- Heap |
- |
- |
-
-
-
-
- Doubly Linked List |
- |
- size, offerFirst, offerLast, peekFirst, peekLast, pollFirst, pollLast, get, isEmpty, insert, remove, |
- |
-
-
-[//]: # ( )
-
-[//]: # ( Matrix | )
-
-[//]: # ( | )
-
-[//]: # ( | )
-
-[//]: # ( | )
-
-[//]: # (
)
-
-
- Priority Queue |
- Max Priority Queue, Min Priority Queue |
- offer, peek, poll, leaf, isEmpty, clear, toArray, clone |
- isValid, sort, DFS |
-
-
- Max Priority Queue |
- |
- All the features inherited from Priority Queue |
- All the features inherited from Priority Queue |
-
-
- Min Priority Queue |
- |
- All the features inherited from Priority Queue |
- All the features inherited from Priority Queue |
-
-
- Queue |
- Queue, Dequeue |
- offer, poll, peek, peekLast, size, isEmpty, toArray, clear, clone, Queue.fromArray |
- |
-
-
- ObjectDeque |
- |
- size, offerFirst, offerLast, pollFirst, peekFirst, pollLast, peekLast, get, isEmpty |
- |
-
-
- ArrayDeque |
- |
- offerLast, pollLast, pollFirst, offerFirst, peekFirst, peekLast, get, set, insert, remove, isEmpty |
- |
-
-
- Stack |
- |
- isEmpty, size, peek, push, pop, toArray, clear, clone, Stack.fromArray |
- |
-
-
- Trie |
- |
- put, has, remove, isAbsPrefix, isPrefix, getAll |
- |
-
+O(1) |
+Constant |
+1 |
+1 |
+1 |
+
+
+O(log N) |
+Logarithmic |
+3 |
+6 |
+9 |
+
+
+O(N) |
+Linear |
+10 |
+100 |
+1000 |
+
+
+O(N log N) |
+n log(n) |
+30 |
+600 |
+9000 |
+
+
+O(N^2) |
+Quadratic |
+100 |
+10000 |
+1000000 |
+
+
+O(2^N) |
+Exponential |
+1024 |
+1.26e+29 |
+1.07e+301 |
+
+
+O(N!) |
+Factorial |
+3628800 |
+9.3e+157 |
+4.02e+2567 |
+
-