data-structure-typed 1.21.4 → 1.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.auto-changelog +9 -0
- package/.auto-changelog-template.hbs +36 -0
- package/.eslintrc.js +61 -0
- package/.github/workflows/ci.yml +30 -0
- package/.prettierignore +6 -0
- package/.prettierrc.js +16 -0
- package/CHANGELOG.md +17 -0
- package/README.md +147 -95
- package/dist/data-structures/binary-tree/aa-tree.js +6 -2
- package/dist/data-structures/binary-tree/aa-tree.js.map +1 -0
- package/dist/data-structures/binary-tree/abstract-binary-tree.js +398 -672
- package/dist/data-structures/binary-tree/abstract-binary-tree.js.map +1 -0
- package/dist/data-structures/binary-tree/avl-tree.js +122 -151
- package/dist/data-structures/binary-tree/avl-tree.js.map +1 -0
- package/dist/data-structures/binary-tree/b-tree.js +6 -2
- package/dist/data-structures/binary-tree/b-tree.js.map +1 -0
- package/dist/data-structures/binary-tree/binary-indexed-tree.js +24 -54
- package/dist/data-structures/binary-tree/binary-indexed-tree.js.map +1 -0
- package/dist/data-structures/binary-tree/binary-tree.js +31 -32
- package/dist/data-structures/binary-tree/binary-tree.js.map +1 -0
- package/dist/data-structures/binary-tree/bst.js +266 -208
- package/dist/data-structures/binary-tree/bst.js.map +1 -0
- package/dist/data-structures/binary-tree/index.js +1 -0
- package/dist/data-structures/binary-tree/index.js.map +1 -0
- package/dist/data-structures/binary-tree/rb-tree.js +46 -37
- package/dist/data-structures/binary-tree/rb-tree.js.map +1 -0
- package/dist/data-structures/binary-tree/segment-tree.js +124 -127
- package/dist/data-structures/binary-tree/segment-tree.js.map +1 -0
- package/dist/data-structures/binary-tree/splay-tree.js +6 -2
- package/dist/data-structures/binary-tree/splay-tree.js.map +1 -0
- package/dist/data-structures/binary-tree/tree-multiset.js +227 -354
- package/dist/data-structures/binary-tree/tree-multiset.js.map +1 -0
- package/dist/data-structures/binary-tree/two-three-tree.js +6 -2
- package/dist/data-structures/binary-tree/two-three-tree.js.map +1 -0
- package/dist/data-structures/graph/abstract-graph.js +582 -609
- package/dist/data-structures/graph/abstract-graph.js.map +1 -0
- package/dist/data-structures/graph/directed-graph.js +276 -312
- package/dist/data-structures/graph/directed-graph.js.map +1 -0
- package/dist/data-structures/graph/index.js +1 -0
- package/dist/data-structures/graph/index.js.map +1 -0
- package/dist/data-structures/graph/map-graph.js +88 -100
- package/dist/data-structures/graph/map-graph.js.map +1 -0
- package/dist/data-structures/graph/undirected-graph.js +180 -195
- package/dist/data-structures/graph/undirected-graph.js.map +1 -0
- package/dist/data-structures/hash/coordinate-map.js +46 -58
- package/dist/data-structures/hash/coordinate-map.js.map +1 -0
- package/dist/data-structures/hash/coordinate-set.js +43 -48
- package/dist/data-structures/hash/coordinate-set.js.map +1 -0
- package/dist/data-structures/hash/hash-table.js +6 -2
- package/dist/data-structures/hash/hash-table.js.map +1 -0
- package/dist/data-structures/hash/index.js +1 -0
- package/dist/data-structures/hash/index.js.map +1 -0
- package/dist/data-structures/hash/pair.js +6 -2
- package/dist/data-structures/hash/pair.js.map +1 -0
- package/dist/data-structures/hash/tree-map.js +6 -2
- package/dist/data-structures/hash/tree-map.js.map +1 -0
- package/dist/data-structures/hash/tree-set.js +6 -2
- package/dist/data-structures/hash/tree-set.js.map +1 -0
- package/dist/data-structures/heap/heap.js +83 -120
- package/dist/data-structures/heap/heap.js.map +1 -0
- package/dist/data-structures/heap/index.js +1 -0
- package/dist/data-structures/heap/index.js.map +1 -0
- package/dist/data-structures/heap/max-heap.js +27 -24
- package/dist/data-structures/heap/max-heap.js.map +1 -0
- package/dist/data-structures/heap/min-heap.js +27 -25
- package/dist/data-structures/heap/min-heap.js.map +1 -0
- package/dist/data-structures/index.js +1 -0
- package/dist/data-structures/index.js.map +1 -0
- package/dist/data-structures/linked-list/doubly-linked-list.js +202 -307
- package/dist/data-structures/linked-list/doubly-linked-list.js.map +1 -0
- package/dist/data-structures/linked-list/index.js +1 -0
- package/dist/data-structures/linked-list/index.js.map +1 -0
- package/dist/data-structures/linked-list/singly-linked-list.js +223 -251
- package/dist/data-structures/linked-list/singly-linked-list.js.map +1 -0
- package/dist/data-structures/linked-list/skip-linked-list.js +6 -2
- package/dist/data-structures/linked-list/skip-linked-list.js.map +1 -0
- package/dist/data-structures/matrix/index.js +1 -0
- package/dist/data-structures/matrix/index.js.map +1 -0
- package/dist/data-structures/matrix/matrix.js +9 -22
- package/dist/data-structures/matrix/matrix.js.map +1 -0
- package/dist/data-structures/matrix/matrix2d.js +75 -149
- package/dist/data-structures/matrix/matrix2d.js.map +1 -0
- package/dist/data-structures/matrix/navigator.js +38 -46
- package/dist/data-structures/matrix/navigator.js.map +1 -0
- package/dist/data-structures/matrix/vector2d.js +90 -254
- package/dist/data-structures/matrix/vector2d.js.map +1 -0
- package/dist/data-structures/priority-queue/index.js +1 -0
- package/dist/data-structures/priority-queue/index.js.map +1 -0
- package/dist/data-structures/priority-queue/max-priority-queue.js +47 -32
- package/dist/data-structures/priority-queue/max-priority-queue.js.map +1 -0
- package/dist/data-structures/priority-queue/min-priority-queue.js +47 -33
- package/dist/data-structures/priority-queue/min-priority-queue.js.map +1 -0
- package/dist/data-structures/priority-queue/priority-queue.js +150 -241
- package/dist/data-structures/priority-queue/priority-queue.js.map +1 -0
- package/dist/data-structures/queue/deque.js +130 -162
- package/dist/data-structures/queue/deque.js.map +1 -0
- package/dist/data-structures/queue/index.js +1 -0
- package/dist/data-structures/queue/index.js.map +1 -0
- package/dist/data-structures/queue/queue.js +181 -100
- package/dist/data-structures/queue/queue.js.map +1 -0
- package/dist/data-structures/stack/index.js +1 -0
- package/dist/data-structures/stack/index.js.map +1 -0
- package/dist/data-structures/stack/stack.js +23 -71
- package/dist/data-structures/stack/stack.js.map +1 -0
- package/dist/data-structures/tree/index.js +1 -0
- package/dist/data-structures/tree/index.js.map +1 -0
- package/dist/data-structures/tree/tree.js +46 -33
- package/dist/data-structures/tree/tree.js.map +1 -0
- package/dist/data-structures/trie/index.js +1 -0
- package/dist/data-structures/trie/index.js.map +1 -0
- package/dist/data-structures/trie/trie.js +201 -129
- package/dist/data-structures/trie/trie.js.map +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -0
- package/dist/interfaces/abstract-binary-tree.js +1 -0
- package/dist/interfaces/abstract-binary-tree.js.map +1 -0
- package/dist/interfaces/abstract-graph.js +1 -0
- package/dist/interfaces/abstract-graph.js.map +1 -0
- package/dist/interfaces/avl-tree.js +1 -0
- package/dist/interfaces/avl-tree.js.map +1 -0
- package/dist/interfaces/binary-tree.js +1 -0
- package/dist/interfaces/binary-tree.js.map +1 -0
- package/dist/interfaces/bst.js +1 -0
- package/dist/interfaces/bst.js.map +1 -0
- package/dist/interfaces/directed-graph.js +1 -0
- package/dist/interfaces/directed-graph.js.map +1 -0
- package/dist/interfaces/doubly-linked-list.js +1 -0
- package/dist/interfaces/doubly-linked-list.js.map +1 -0
- package/dist/interfaces/heap.js +1 -0
- package/dist/interfaces/heap.js.map +1 -0
- package/dist/interfaces/index.js +1 -0
- package/dist/interfaces/index.js.map +1 -0
- package/dist/interfaces/navigator.js +1 -0
- package/dist/interfaces/navigator.js.map +1 -0
- package/dist/interfaces/priority-queue.js +1 -0
- package/dist/interfaces/priority-queue.js.map +1 -0
- package/dist/interfaces/rb-tree.js +1 -0
- package/dist/interfaces/rb-tree.js.map +1 -0
- package/dist/interfaces/segment-tree.js +1 -0
- package/dist/interfaces/segment-tree.js.map +1 -0
- package/dist/interfaces/singly-linked-list.js +1 -0
- package/dist/interfaces/singly-linked-list.js.map +1 -0
- package/dist/interfaces/tree-multiset.js +1 -0
- package/dist/interfaces/tree-multiset.js.map +1 -0
- package/dist/interfaces/undirected-graph.js +1 -0
- package/dist/interfaces/undirected-graph.js.map +1 -0
- package/dist/types/data-structures/abstract-binary-tree.js +1 -7
- package/dist/types/data-structures/abstract-binary-tree.js.map +1 -0
- package/dist/types/data-structures/abstract-graph.js +1 -0
- package/dist/types/data-structures/abstract-graph.js.map +1 -0
- package/dist/types/data-structures/avl-tree.js +1 -0
- package/dist/types/data-structures/avl-tree.js.map +1 -0
- package/dist/types/data-structures/binary-tree.js +1 -0
- package/dist/types/data-structures/binary-tree.js.map +1 -0
- package/dist/types/data-structures/bst.js +1 -0
- package/dist/types/data-structures/bst.js.map +1 -0
- package/dist/types/data-structures/directed-graph.js +1 -0
- package/dist/types/data-structures/directed-graph.js.map +1 -0
- package/dist/types/data-structures/doubly-linked-list.js +1 -0
- package/dist/types/data-structures/doubly-linked-list.js.map +1 -0
- package/dist/types/data-structures/heap.js +1 -0
- package/dist/types/data-structures/heap.js.map +1 -0
- package/dist/types/data-structures/index.js +1 -0
- package/dist/types/data-structures/index.js.map +1 -0
- package/dist/types/data-structures/map-graph.js +1 -0
- package/dist/types/data-structures/map-graph.js.map +1 -0
- package/dist/types/data-structures/navigator.js +1 -0
- package/dist/types/data-structures/navigator.js.map +1 -0
- package/dist/types/data-structures/priority-queue.js +1 -0
- package/dist/types/data-structures/priority-queue.js.map +1 -0
- package/dist/types/data-structures/rb-tree.js +1 -0
- package/dist/types/data-structures/rb-tree.js.map +1 -0
- package/dist/types/data-structures/segment-tree.js +1 -0
- package/dist/types/data-structures/segment-tree.js.map +1 -0
- package/dist/types/data-structures/singly-linked-list.js +1 -0
- package/dist/types/data-structures/singly-linked-list.js.map +1 -0
- package/dist/types/data-structures/tree-multiset.js +1 -0
- package/dist/types/data-structures/tree-multiset.js.map +1 -0
- package/dist/types/helpers.js +1 -0
- package/dist/types/helpers.js.map +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/utils/index.js +1 -0
- package/dist/types/utils/index.js.map +1 -0
- package/dist/types/utils/utils.js +1 -0
- package/dist/types/utils/utils.js.map +1 -0
- package/dist/types/utils/validate-type.js +1 -0
- package/dist/types/utils/validate-type.js.map +1 -0
- package/dist/utils/index.js +1 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/utils.js +108 -22
- package/dist/utils/utils.js.map +1 -0
- package/docs/.nojekyll +1 -0
- package/docs/assets/highlight.css +127 -0
- package/docs/assets/main.js +58 -0
- package/docs/assets/search.js +1 -0
- package/docs/assets/style.css +1367 -0
- package/docs/classes/AVLTree.html +2259 -0
- package/docs/classes/AVLTreeNode.html +399 -0
- package/docs/classes/AaTree.html +202 -0
- package/docs/classes/AbstractBinaryTree.html +1913 -0
- package/docs/classes/AbstractBinaryTreeNode.html +441 -0
- package/docs/classes/AbstractEdge.html +345 -0
- package/docs/classes/AbstractGraph.html +1105 -0
- package/docs/classes/AbstractVertex.html +299 -0
- package/docs/classes/ArrayDeque.html +469 -0
- package/docs/classes/BST.html +2103 -0
- package/docs/classes/BSTNode.html +400 -0
- package/docs/classes/BTree.html +202 -0
- package/docs/classes/BinaryIndexedTree.html +371 -0
- package/docs/classes/BinaryTree.html +1944 -0
- package/docs/classes/BinaryTreeNode.html +399 -0
- package/docs/classes/Character.html +250 -0
- package/docs/classes/CoordinateMap.html +513 -0
- package/docs/classes/CoordinateSet.html +474 -0
- package/docs/classes/Deque.html +1005 -0
- package/docs/classes/DirectedEdge.html +404 -0
- package/docs/classes/DirectedGraph.html +1530 -0
- package/docs/classes/DirectedVertex.html +286 -0
- package/docs/classes/DoublyLinkedList.html +998 -0
- package/docs/classes/DoublyLinkedListNode.html +327 -0
- package/docs/classes/HashTable.html +202 -0
- package/docs/classes/Heap.html +647 -0
- package/docs/classes/HeapItem.html +296 -0
- package/docs/classes/LinkedListQueue.html +884 -0
- package/docs/classes/MapEdge.html +391 -0
- package/docs/classes/MapGraph.html +1583 -0
- package/docs/classes/MapVertex.html +356 -0
- package/docs/classes/Matrix2D.html +532 -0
- package/docs/classes/MatrixNTI2D.html +270 -0
- package/docs/classes/MaxHeap.html +671 -0
- package/docs/classes/MaxPriorityQueue.html +866 -0
- package/docs/classes/MinHeap.html +672 -0
- package/docs/classes/MinPriorityQueue.html +868 -0
- package/docs/classes/Navigator.html +343 -0
- package/docs/classes/ObjectDeque.html +527 -0
- package/docs/classes/Pair.html +202 -0
- package/docs/classes/PriorityQueue.html +790 -0
- package/docs/classes/Queue.html +521 -0
- package/docs/classes/RBTree.html +2101 -0
- package/docs/classes/RBTreeNode.html +431 -0
- package/docs/classes/SegmentTree.html +464 -0
- package/docs/classes/SegmentTreeNode.html +387 -0
- package/docs/classes/SinglyLinkedList.html +830 -0
- package/docs/classes/SinglyLinkedListNode.html +300 -0
- package/docs/classes/SkipLinkedList.html +202 -0
- package/docs/classes/SplayTree.html +202 -0
- package/docs/classes/Stack.html +398 -0
- package/docs/classes/TreeMap.html +202 -0
- package/docs/classes/TreeMultiset.html +2587 -0
- package/docs/classes/TreeMultisetNode.html +447 -0
- package/docs/classes/TreeNode.html +344 -0
- package/docs/classes/TreeSet.html +202 -0
- package/docs/classes/Trie.html +402 -0
- package/docs/classes/TrieNode.html +310 -0
- package/docs/classes/TwoThreeTree.html +202 -0
- package/docs/classes/UndirectedEdge.html +374 -0
- package/docs/classes/UndirectedGraph.html +1285 -0
- package/docs/classes/UndirectedVertex.html +284 -0
- package/docs/classes/Vector2D.html +835 -0
- package/docs/enums/CP.html +211 -0
- package/docs/enums/FamilyPosition.html +239 -0
- package/docs/enums/LoopType.html +212 -0
- package/docs/enums/RBColor.html +204 -0
- package/docs/enums/TopologicalProperty.html +211 -0
- package/docs/functions/arrayRemove.html +208 -0
- package/docs/functions/isThunk.html +186 -0
- package/docs/functions/toThunk.html +186 -0
- package/docs/functions/trampoline.html +186 -0
- package/docs/functions/trampolineAsync.html +186 -0
- package/docs/functions/uuidV4.html +181 -0
- package/docs/index.html +693 -0
- package/docs/interfaces/IAVLTree.html +1245 -0
- package/docs/interfaces/IAbstractBinaryTree.html +1101 -0
- package/docs/interfaces/IAbstractBinaryTreeNode.html +335 -0
- package/docs/interfaces/IAbstractGraph.html +433 -0
- package/docs/interfaces/IBST.html +1245 -0
- package/docs/interfaces/IDirectedGraph.html +570 -0
- package/docs/interfaces/IRBTree.html +1247 -0
- package/docs/interfaces/IUNDirectedGraph.html +463 -0
- package/docs/modules.html +328 -0
- package/docs/types/AVLTreeNodeNested.html +182 -0
- package/docs/types/AVLTreeOptions.html +180 -0
- package/docs/types/AbstractBinaryTreeNodeNested.html +182 -0
- package/docs/types/AbstractBinaryTreeNodeProperties.html +182 -0
- package/docs/types/AbstractBinaryTreeNodeProperty.html +182 -0
- package/docs/types/AbstractBinaryTreeOptions.html +182 -0
- package/docs/types/BSTComparator.html +192 -0
- package/docs/types/BSTNodeNested.html +182 -0
- package/docs/types/BSTOptions.html +182 -0
- package/docs/types/BinaryTreeDeletedResult.html +189 -0
- package/docs/types/BinaryTreeNodeId.html +177 -0
- package/docs/types/BinaryTreeNodeNested.html +182 -0
- package/docs/types/BinaryTreeNodePropertyName.html +177 -0
- package/docs/types/BinaryTreeOptions.html +180 -0
- package/docs/types/DFSOrderPattern.html +177 -0
- package/docs/types/DijkstraResult.html +199 -0
- package/docs/types/Direction.html +177 -0
- package/docs/types/DummyAny.html +190 -0
- package/docs/types/EdgeId.html +177 -0
- package/docs/types/HeapOptions.html +198 -0
- package/docs/types/IAVLTreeNode.html +184 -0
- package/docs/types/IBSTNode.html +184 -0
- package/docs/types/IBinaryTree.html +182 -0
- package/docs/types/IBinaryTreeNode.html +184 -0
- package/docs/types/IRBTreeNode.html +184 -0
- package/docs/types/ITreeMultiset.html +182 -0
- package/docs/types/ITreeMultisetNode.html +184 -0
- package/docs/types/KeyValueObject.html +182 -0
- package/docs/types/KeyValueObjectWithId.html +184 -0
- package/docs/types/MapGraphCoordinate.html +177 -0
- package/docs/types/NavigatorParams.html +211 -0
- package/docs/types/NodeOrPropertyName.html +177 -0
- package/docs/types/NonNumberNonObjectButDefined.html +177 -0
- package/docs/types/ObjectWithNonNumberId.html +184 -0
- package/docs/types/ObjectWithNumberId.html +184 -0
- package/docs/types/ObjectWithoutId.html +177 -0
- package/docs/types/PriorityQueueComparator.html +197 -0
- package/docs/types/PriorityQueueDFSOrderPattern.html +177 -0
- package/docs/types/PriorityQueueOptions.html +191 -0
- package/docs/types/RBTreeNodeNested.html +182 -0
- package/docs/types/RBTreeOptions.html +180 -0
- package/docs/types/RestrictValById.html +177 -0
- package/docs/types/SegmentTreeNodeVal.html +177 -0
- package/docs/types/SpecifyOptional.html +184 -0
- package/docs/types/Thunk.html +185 -0
- package/docs/types/ToThunkFn.html +185 -0
- package/docs/types/TopologicalStatus.html +177 -0
- package/docs/types/TreeMultisetNodeNested.html +182 -0
- package/docs/types/TreeMultisetOptions.html +180 -0
- package/docs/types/TrlAsyncFn.html +190 -0
- package/docs/types/TrlFn.html +190 -0
- package/docs/types/Turning.html +177 -0
- package/docs/types/VertexId.html +177 -0
- package/docs/variables/THUNK_SYMBOL.html +177 -0
- package/jest.config.js +5 -0
- package/lib/data-structures/binary-tree/aa-tree.js +2 -0
- package/{dist → lib}/data-structures/binary-tree/abstract-binary-tree.d.ts +25 -20
- package/lib/data-structures/binary-tree/abstract-binary-tree.js +1307 -0
- package/{dist → lib}/data-structures/binary-tree/avl-tree.d.ts +12 -12
- package/lib/data-structures/binary-tree/avl-tree.js +311 -0
- package/lib/data-structures/binary-tree/b-tree.js +2 -0
- package/lib/data-structures/binary-tree/binary-indexed-tree.js +69 -0
- package/lib/data-structures/binary-tree/binary-tree.js +35 -0
- package/{dist → lib}/data-structures/binary-tree/bst.d.ts +19 -8
- package/lib/data-structures/binary-tree/bst.js +551 -0
- package/lib/data-structures/binary-tree/index.js +12 -0
- package/{dist → lib}/data-structures/binary-tree/rb-tree.d.ts +0 -6
- package/lib/data-structures/binary-tree/rb-tree.js +22 -0
- package/lib/data-structures/binary-tree/segment-tree.js +210 -0
- package/lib/data-structures/binary-tree/splay-tree.js +2 -0
- package/{dist → lib}/data-structures/binary-tree/tree-multiset.d.ts +20 -23
- package/lib/data-structures/binary-tree/tree-multiset.js +673 -0
- package/lib/data-structures/binary-tree/two-three-tree.js +2 -0
- package/lib/data-structures/graph/abstract-graph.js +918 -0
- package/lib/data-structures/graph/directed-graph.js +416 -0
- package/lib/data-structures/graph/index.js +4 -0
- package/lib/data-structures/graph/map-graph.js +105 -0
- package/lib/data-structures/graph/undirected-graph.js +246 -0
- package/lib/data-structures/hash/coordinate-map.js +61 -0
- package/lib/data-structures/hash/coordinate-set.js +51 -0
- package/lib/data-structures/hash/hash-table.js +2 -0
- package/lib/data-structures/hash/index.js +6 -0
- package/lib/data-structures/hash/pair.js +2 -0
- package/lib/data-structures/hash/tree-map.js +2 -0
- package/lib/data-structures/hash/tree-set.js +2 -0
- package/lib/data-structures/heap/heap.js +152 -0
- package/lib/data-structures/heap/index.js +3 -0
- package/lib/data-structures/heap/max-heap.js +26 -0
- package/lib/data-structures/heap/min-heap.js +27 -0
- package/lib/data-structures/index.js +11 -0
- package/{dist → lib}/data-structures/linked-list/doubly-linked-list.d.ts +5 -5
- package/lib/data-structures/linked-list/doubly-linked-list.js +521 -0
- package/lib/data-structures/linked-list/index.js +3 -0
- package/{dist → lib}/data-structures/linked-list/singly-linked-list.d.ts +6 -5
- package/lib/data-structures/linked-list/singly-linked-list.js +443 -0
- package/lib/data-structures/linked-list/skip-linked-list.js +2 -0
- package/lib/data-structures/matrix/index.js +4 -0
- package/lib/data-structures/matrix/matrix.js +24 -0
- package/lib/data-structures/matrix/matrix2d.js +195 -0
- package/lib/data-structures/matrix/navigator.js +101 -0
- package/lib/data-structures/matrix/vector2d.js +287 -0
- package/lib/data-structures/priority-queue/index.js +3 -0
- package/lib/data-structures/priority-queue/max-priority-queue.js +39 -0
- package/lib/data-structures/priority-queue/min-priority-queue.js +40 -0
- package/lib/data-structures/priority-queue/priority-queue.js +317 -0
- package/{dist → lib}/data-structures/queue/deque.d.ts +45 -0
- package/lib/data-structures/queue/deque.js +270 -0
- package/lib/data-structures/queue/index.js +2 -0
- package/{dist → lib}/data-structures/queue/queue.d.ts +47 -13
- package/lib/data-structures/queue/queue.js +165 -0
- package/lib/data-structures/stack/index.js +1 -0
- package/lib/data-structures/stack/stack.js +87 -0
- package/lib/data-structures/tree/index.js +1 -0
- package/lib/data-structures/tree/tree.js +56 -0
- package/lib/data-structures/trie/index.js +1 -0
- package/lib/data-structures/trie/trie.js +205 -0
- package/lib/index.js +4 -0
- package/{dist → lib}/interfaces/avl-tree.d.ts +1 -9
- package/lib/interfaces/binary-tree.d.ts +4 -0
- package/{dist → lib}/interfaces/bst.d.ts +1 -2
- package/lib/interfaces/heap.js +1 -0
- package/lib/interfaces/index.js +15 -0
- package/lib/interfaces/navigator.d.ts +1 -0
- package/lib/interfaces/navigator.js +1 -0
- package/lib/interfaces/priority-queue.d.ts +1 -0
- package/lib/interfaces/priority-queue.js +1 -0
- package/{dist → lib}/interfaces/rb-tree.d.ts +1 -2
- package/lib/interfaces/rb-tree.js +1 -0
- package/lib/interfaces/segment-tree.d.ts +1 -0
- package/lib/interfaces/segment-tree.js +1 -0
- package/lib/interfaces/singly-linked-list.d.ts +1 -0
- package/lib/interfaces/singly-linked-list.js +1 -0
- package/lib/interfaces/tree-multiset.d.ts +5 -0
- package/lib/interfaces/tree-multiset.js +1 -0
- package/lib/interfaces/undirected-graph.js +1 -0
- package/{dist → lib}/types/data-structures/abstract-binary-tree.d.ts +1 -1
- package/lib/types/data-structures/abstract-binary-tree.js +22 -0
- package/lib/types/data-structures/abstract-graph.js +1 -0
- package/{dist → lib}/types/data-structures/avl-tree.d.ts +1 -1
- package/lib/types/data-structures/avl-tree.js +1 -0
- package/lib/types/data-structures/binary-tree.js +1 -0
- package/lib/types/data-structures/bst.js +6 -0
- package/lib/types/data-structures/directed-graph.js +6 -0
- package/lib/types/data-structures/doubly-linked-list.d.ts +1 -0
- package/lib/types/data-structures/doubly-linked-list.js +1 -0
- package/lib/types/data-structures/heap.js +1 -0
- package/lib/types/data-structures/index.js +15 -0
- package/lib/types/data-structures/map-graph.js +1 -0
- package/lib/types/data-structures/navigator.js +1 -0
- package/lib/types/data-structures/priority-queue.js +1 -0
- package/lib/types/data-structures/rb-tree.js +5 -0
- package/lib/types/data-structures/segment-tree.js +1 -0
- package/lib/types/data-structures/singly-linked-list.d.ts +1 -0
- package/lib/types/data-structures/singly-linked-list.js +1 -0
- package/lib/types/data-structures/tree-multiset.js +1 -0
- package/lib/types/helpers.d.ts +1 -0
- package/lib/types/helpers.js +1 -0
- package/lib/types/index.js +3 -0
- package/lib/types/utils/index.js +2 -0
- package/{dist → lib}/types/utils/utils.d.ts +1 -1
- package/lib/types/utils/utils.js +1 -0
- package/{dist → lib}/types/utils/validate-type.d.ts +1 -1
- package/lib/types/utils/validate-type.js +1 -0
- package/lib/utils/index.js +1 -0
- package/lib/utils/utils.js +57 -0
- package/package.json +147 -56
- package/rename_clear_files.sh +29 -0
- package/test/integration/avl-tree.test.ts +111 -0
- package/test/integration/bst.test.ts +371 -0
- package/test/integration/heap.test.js +19 -0
- package/test/integration/index.html +44 -0
- package/test/unit/data-structures/binary-tree/avl-tree.test.ts +111 -0
- package/test/unit/data-structures/binary-tree/bst.test.ts +371 -0
- package/test/unit/data-structures/binary-tree/overall.test.ts +57 -0
- package/test/unit/data-structures/binary-tree/tree-multiset.test.ts +405 -0
- package/test/unit/data-structures/graph/abstract-graph.test.ts +5 -0
- package/test/unit/data-structures/graph/directed-graph.test.ts +517 -0
- package/test/unit/data-structures/graph/index.ts +2 -0
- package/test/unit/data-structures/graph/map-graph.test.ts +46 -0
- package/test/unit/data-structures/graph/overall.test.ts +50 -0
- package/test/unit/data-structures/graph/undirected-graph.test.ts +60 -0
- package/test/unit/data-structures/heap/heap.test.ts +56 -0
- package/test/unit/data-structures/heap/max-heap.test.ts +42 -0
- package/test/unit/data-structures/heap/min-heap.test.ts +81 -0
- package/test/unit/data-structures/linked-list/doubly-linked-list.test.ts +365 -0
- package/test/unit/data-structures/linked-list/index.ts +4 -0
- package/test/unit/data-structures/linked-list/linked-list.test.ts +37 -0
- package/test/unit/data-structures/linked-list/singly-linked-list.test.ts +401 -0
- package/test/unit/data-structures/linked-list/skip-linked-list.test.ts +13 -0
- package/test/unit/data-structures/priority-queue/max-priority-queue.test.ts +106 -0
- package/test/unit/data-structures/priority-queue/min-priority-queue.test.ts +105 -0
- package/test/unit/data-structures/priority-queue/priority-queue.test.ts +27 -0
- package/test/unit/data-structures/queue/queue.test.ts +36 -0
- package/test/utils/index.ts +2 -0
- package/test/utils/magnitude.ts +21 -0
- package/test/utils/number.ts +3 -0
- package/tsconfig.build.json +33 -0
- package/tsconfig.json +38 -0
- package/umd/bundle.min.js +3 -0
- package/umd/bundle.min.js.map +1 -0
- package/webpack.config.js +28 -0
- package/dist/bundle.js +0 -2
- package/dist/interfaces/binary-tree.d.ts +0 -6
- package/dist/interfaces/tree-multiset.d.ts +0 -7
- /package/{dist → lib}/data-structures/binary-tree/aa-tree.d.ts +0 -0
- /package/{dist → lib}/data-structures/binary-tree/b-tree.d.ts +0 -0
- /package/{dist → lib}/data-structures/binary-tree/binary-indexed-tree.d.ts +0 -0
- /package/{dist → lib}/data-structures/binary-tree/binary-tree.d.ts +0 -0
- /package/{dist → lib}/data-structures/binary-tree/index.d.ts +0 -0
- /package/{dist → lib}/data-structures/binary-tree/segment-tree.d.ts +0 -0
- /package/{dist → lib}/data-structures/binary-tree/splay-tree.d.ts +0 -0
- /package/{dist → lib}/data-structures/binary-tree/two-three-tree.d.ts +0 -0
- /package/{dist → lib}/data-structures/graph/abstract-graph.d.ts +0 -0
- /package/{dist → lib}/data-structures/graph/directed-graph.d.ts +0 -0
- /package/{dist → lib}/data-structures/graph/index.d.ts +0 -0
- /package/{dist → lib}/data-structures/graph/map-graph.d.ts +0 -0
- /package/{dist → lib}/data-structures/graph/undirected-graph.d.ts +0 -0
- /package/{dist → lib}/data-structures/hash/coordinate-map.d.ts +0 -0
- /package/{dist → lib}/data-structures/hash/coordinate-set.d.ts +0 -0
- /package/{dist → lib}/data-structures/hash/hash-table.d.ts +0 -0
- /package/{dist → lib}/data-structures/hash/index.d.ts +0 -0
- /package/{dist → lib}/data-structures/hash/pair.d.ts +0 -0
- /package/{dist → lib}/data-structures/hash/tree-map.d.ts +0 -0
- /package/{dist → lib}/data-structures/hash/tree-set.d.ts +0 -0
- /package/{dist → lib}/data-structures/heap/heap.d.ts +0 -0
- /package/{dist → lib}/data-structures/heap/index.d.ts +0 -0
- /package/{dist → lib}/data-structures/heap/max-heap.d.ts +0 -0
- /package/{dist → lib}/data-structures/heap/min-heap.d.ts +0 -0
- /package/{dist → lib}/data-structures/index.d.ts +0 -0
- /package/{dist → lib}/data-structures/linked-list/index.d.ts +0 -0
- /package/{dist → lib}/data-structures/linked-list/skip-linked-list.d.ts +0 -0
- /package/{dist → lib}/data-structures/matrix/index.d.ts +0 -0
- /package/{dist → lib}/data-structures/matrix/matrix.d.ts +0 -0
- /package/{dist → lib}/data-structures/matrix/matrix2d.d.ts +0 -0
- /package/{dist → lib}/data-structures/matrix/navigator.d.ts +0 -0
- /package/{dist → lib}/data-structures/matrix/vector2d.d.ts +0 -0
- /package/{dist → lib}/data-structures/priority-queue/index.d.ts +0 -0
- /package/{dist → lib}/data-structures/priority-queue/max-priority-queue.d.ts +0 -0
- /package/{dist → lib}/data-structures/priority-queue/min-priority-queue.d.ts +0 -0
- /package/{dist → lib}/data-structures/priority-queue/priority-queue.d.ts +0 -0
- /package/{dist → lib}/data-structures/queue/index.d.ts +0 -0
- /package/{dist → lib}/data-structures/stack/index.d.ts +0 -0
- /package/{dist → lib}/data-structures/stack/stack.d.ts +0 -0
- /package/{dist → lib}/data-structures/tree/index.d.ts +0 -0
- /package/{dist → lib}/data-structures/tree/tree.d.ts +0 -0
- /package/{dist → lib}/data-structures/trie/index.d.ts +0 -0
- /package/{dist → lib}/data-structures/trie/trie.d.ts +0 -0
- /package/{dist → lib}/index.d.ts +0 -0
- /package/{dist → lib}/interfaces/abstract-binary-tree.d.ts +0 -0
- /package/{dist/interfaces/doubly-linked-list.d.ts → lib/interfaces/abstract-binary-tree.js} +0 -0
- /package/{dist → lib}/interfaces/abstract-graph.d.ts +0 -0
- /package/{dist/interfaces/heap.d.ts → lib/interfaces/abstract-graph.js} +0 -0
- /package/{dist/interfaces/navigator.d.ts → lib/interfaces/avl-tree.js} +0 -0
- /package/{dist/interfaces/priority-queue.d.ts → lib/interfaces/binary-tree.js} +0 -0
- /package/{dist/interfaces/segment-tree.d.ts → lib/interfaces/bst.js} +0 -0
- /package/{dist → lib}/interfaces/directed-graph.d.ts +0 -0
- /package/{dist/interfaces/singly-linked-list.d.ts → lib/interfaces/directed-graph.js} +0 -0
- /package/{dist/types/data-structures → lib/interfaces}/doubly-linked-list.d.ts +0 -0
- /package/{dist/types/data-structures/singly-linked-list.d.ts → lib/interfaces/doubly-linked-list.js} +0 -0
- /package/{dist/types/helpers.d.ts → lib/interfaces/heap.d.ts} +0 -0
- /package/{dist → lib}/interfaces/index.d.ts +0 -0
- /package/{dist → lib}/interfaces/undirected-graph.d.ts +0 -0
- /package/{dist → lib}/types/data-structures/abstract-graph.d.ts +0 -0
- /package/{dist → lib}/types/data-structures/binary-tree.d.ts +0 -0
- /package/{dist → lib}/types/data-structures/bst.d.ts +0 -0
- /package/{dist → lib}/types/data-structures/directed-graph.d.ts +0 -0
- /package/{dist → lib}/types/data-structures/heap.d.ts +0 -0
- /package/{dist → lib}/types/data-structures/index.d.ts +0 -0
- /package/{dist → lib}/types/data-structures/map-graph.d.ts +0 -0
- /package/{dist → lib}/types/data-structures/navigator.d.ts +0 -0
- /package/{dist → lib}/types/data-structures/priority-queue.d.ts +0 -0
- /package/{dist → lib}/types/data-structures/rb-tree.d.ts +0 -0
- /package/{dist → lib}/types/data-structures/segment-tree.d.ts +0 -0
- /package/{dist → lib}/types/data-structures/tree-multiset.d.ts +0 -0
- /package/{dist → lib}/types/index.d.ts +0 -0
- /package/{dist → lib}/types/utils/index.d.ts +0 -0
- /package/{dist → lib}/utils/index.d.ts +0 -0
- /package/{dist → lib}/utils/utils.d.ts +0 -0
- /package/{dist/bundle.js.LICENSE.txt → umd/bundle.min.js.LICENSE.txt} +0 -0
|
@@ -1,82 +1,136 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __values = (this && this.__values) || function(o) {
|
|
3
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
4
|
+
if (m) return m.call(o);
|
|
5
|
+
if (o && typeof o.length === "number") return {
|
|
6
|
+
next: function () {
|
|
7
|
+
if (o && i >= o.length) o = void 0;
|
|
8
|
+
return { value: o && o[i++], done: !o };
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
12
|
+
};
|
|
2
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
14
|
exports.Trie = exports.TrieNode = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
*
|
|
7
|
-
* @author Tyler Zeng
|
|
8
|
-
* @copyright Copyright (c) 2022 Tyler Zeng <zrwusa@gmail.com>
|
|
9
|
-
* @license MIT License
|
|
10
|
-
*/
|
|
11
|
-
class TrieNode {
|
|
12
|
-
constructor(v) {
|
|
15
|
+
var TrieNode = (function () {
|
|
16
|
+
function TrieNode(v) {
|
|
13
17
|
this._val = v;
|
|
14
18
|
this._isEnd = false;
|
|
15
19
|
this._children = new Map();
|
|
16
20
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
21
|
+
Object.defineProperty(TrieNode.prototype, "val", {
|
|
22
|
+
get: function () {
|
|
23
|
+
return this._val;
|
|
24
|
+
},
|
|
25
|
+
set: function (v) {
|
|
26
|
+
this._val = v;
|
|
27
|
+
},
|
|
28
|
+
enumerable: false,
|
|
29
|
+
configurable: true
|
|
30
|
+
});
|
|
31
|
+
Object.defineProperty(TrieNode.prototype, "children", {
|
|
32
|
+
get: function () {
|
|
33
|
+
return this._children;
|
|
34
|
+
},
|
|
35
|
+
set: function (v) {
|
|
36
|
+
this._children = v;
|
|
37
|
+
},
|
|
38
|
+
enumerable: false,
|
|
39
|
+
configurable: true
|
|
40
|
+
});
|
|
41
|
+
Object.defineProperty(TrieNode.prototype, "isEnd", {
|
|
42
|
+
get: function () {
|
|
43
|
+
return this._isEnd;
|
|
44
|
+
},
|
|
45
|
+
set: function (v) {
|
|
46
|
+
this._isEnd = v;
|
|
47
|
+
},
|
|
48
|
+
enumerable: false,
|
|
49
|
+
configurable: true
|
|
50
|
+
});
|
|
51
|
+
return TrieNode;
|
|
52
|
+
}());
|
|
36
53
|
exports.TrieNode = TrieNode;
|
|
37
|
-
|
|
38
|
-
|
|
54
|
+
var Trie = (function () {
|
|
55
|
+
function Trie(words) {
|
|
56
|
+
var e_1, _a;
|
|
39
57
|
this._root = new TrieNode('');
|
|
40
58
|
if (words) {
|
|
41
|
-
|
|
42
|
-
|
|
59
|
+
try {
|
|
60
|
+
for (var words_1 = __values(words), words_1_1 = words_1.next(); !words_1_1.done; words_1_1 = words_1.next()) {
|
|
61
|
+
var i = words_1_1.value;
|
|
62
|
+
this.add(i);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
66
|
+
finally {
|
|
67
|
+
try {
|
|
68
|
+
if (words_1_1 && !words_1_1.done && (_a = words_1.return)) _a.call(words_1);
|
|
69
|
+
}
|
|
70
|
+
finally { if (e_1) throw e_1.error; }
|
|
43
71
|
}
|
|
44
72
|
}
|
|
45
73
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
74
|
+
Object.defineProperty(Trie.prototype, "root", {
|
|
75
|
+
get: function () {
|
|
76
|
+
return this._root;
|
|
77
|
+
},
|
|
78
|
+
set: function (v) {
|
|
79
|
+
this._root = v;
|
|
80
|
+
},
|
|
81
|
+
enumerable: false,
|
|
82
|
+
configurable: true
|
|
83
|
+
});
|
|
84
|
+
Trie.prototype.add = function (word) {
|
|
85
|
+
var e_2, _a;
|
|
86
|
+
var cur = this._root;
|
|
87
|
+
try {
|
|
88
|
+
for (var word_1 = __values(word), word_1_1 = word_1.next(); !word_1_1.done; word_1_1 = word_1.next()) {
|
|
89
|
+
var c = word_1_1.value;
|
|
90
|
+
var nodeC = cur.children.get(c);
|
|
91
|
+
if (!nodeC) {
|
|
92
|
+
nodeC = new TrieNode(c);
|
|
93
|
+
cur.children.set(c, nodeC);
|
|
94
|
+
}
|
|
95
|
+
cur = nodeC;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
99
|
+
finally {
|
|
100
|
+
try {
|
|
101
|
+
if (word_1_1 && !word_1_1.done && (_a = word_1.return)) _a.call(word_1);
|
|
102
|
+
}
|
|
103
|
+
finally { if (e_2) throw e_2.error; }
|
|
61
104
|
}
|
|
62
105
|
cur.isEnd = true;
|
|
63
106
|
return true;
|
|
64
|
-
}
|
|
65
|
-
has(input) {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
107
|
+
};
|
|
108
|
+
Trie.prototype.has = function (input) {
|
|
109
|
+
var e_3, _a;
|
|
110
|
+
var cur = this._root;
|
|
111
|
+
try {
|
|
112
|
+
for (var input_1 = __values(input), input_1_1 = input_1.next(); !input_1_1.done; input_1_1 = input_1.next()) {
|
|
113
|
+
var c = input_1_1.value;
|
|
114
|
+
var nodeC = cur.children.get(c);
|
|
115
|
+
if (!nodeC)
|
|
116
|
+
return false;
|
|
117
|
+
cur = nodeC;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
121
|
+
finally {
|
|
122
|
+
try {
|
|
123
|
+
if (input_1_1 && !input_1_1.done && (_a = input_1.return)) _a.call(input_1);
|
|
124
|
+
}
|
|
125
|
+
finally { if (e_3) throw e_3.error; }
|
|
72
126
|
}
|
|
73
127
|
return cur.isEnd;
|
|
74
|
-
}
|
|
75
|
-
remove(word) {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
128
|
+
};
|
|
129
|
+
Trie.prototype.remove = function (word) {
|
|
130
|
+
var isDeleted = false;
|
|
131
|
+
var dfs = function (cur, i) {
|
|
132
|
+
var char = word[i];
|
|
133
|
+
var child = cur.children.get(char);
|
|
80
134
|
if (child) {
|
|
81
135
|
if (i === word.length - 1) {
|
|
82
136
|
if (child.isEnd) {
|
|
@@ -91,7 +145,7 @@ class Trie {
|
|
|
91
145
|
}
|
|
92
146
|
return false;
|
|
93
147
|
}
|
|
94
|
-
|
|
148
|
+
var res = dfs(child, i + 1);
|
|
95
149
|
if (res && !cur.isEnd && child.children.size === 0) {
|
|
96
150
|
cur.children.delete(char);
|
|
97
151
|
return true;
|
|
@@ -102,47 +156,52 @@ class Trie {
|
|
|
102
156
|
};
|
|
103
157
|
dfs(this.root, 0);
|
|
104
158
|
return isDeleted;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
159
|
+
};
|
|
160
|
+
Trie.prototype.isAbsPrefix = function (input) {
|
|
161
|
+
var e_4, _a;
|
|
162
|
+
var cur = this._root;
|
|
163
|
+
try {
|
|
164
|
+
for (var input_2 = __values(input), input_2_1 = input_2.next(); !input_2_1.done; input_2_1 = input_2.next()) {
|
|
165
|
+
var c = input_2_1.value;
|
|
166
|
+
var nodeC = cur.children.get(c);
|
|
167
|
+
if (!nodeC)
|
|
168
|
+
return false;
|
|
169
|
+
cur = nodeC;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
173
|
+
finally {
|
|
174
|
+
try {
|
|
175
|
+
if (input_2_1 && !input_2_1.done && (_a = input_2.return)) _a.call(input_2);
|
|
176
|
+
}
|
|
177
|
+
finally { if (e_4) throw e_4.error; }
|
|
119
178
|
}
|
|
120
179
|
return !cur.isEnd;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
180
|
+
};
|
|
181
|
+
Trie.prototype.isPrefix = function (input) {
|
|
182
|
+
var e_5, _a;
|
|
183
|
+
var cur = this._root;
|
|
184
|
+
try {
|
|
185
|
+
for (var input_3 = __values(input), input_3_1 = input_3.next(); !input_3_1.done; input_3_1 = input_3.next()) {
|
|
186
|
+
var c = input_3_1.value;
|
|
187
|
+
var nodeC = cur.children.get(c);
|
|
188
|
+
if (!nodeC)
|
|
189
|
+
return false;
|
|
190
|
+
cur = nodeC;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
catch (e_5_1) { e_5 = { error: e_5_1 }; }
|
|
194
|
+
finally {
|
|
195
|
+
try {
|
|
196
|
+
if (input_3_1 && !input_3_1.done && (_a = input_3.return)) _a.call(input_3);
|
|
197
|
+
}
|
|
198
|
+
finally { if (e_5) throw e_5.error; }
|
|
134
199
|
}
|
|
135
200
|
return true;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
* in the Trie data structure.
|
|
141
|
-
* @returns a boolean value indicating whether the input string is a common prefix in the Trie data structure.
|
|
142
|
-
*/
|
|
143
|
-
isCommonPrefix(input) {
|
|
144
|
-
let commonPre = '';
|
|
145
|
-
const dfs = (cur) => {
|
|
201
|
+
};
|
|
202
|
+
Trie.prototype.isCommonPrefix = function (input) {
|
|
203
|
+
var commonPre = '';
|
|
204
|
+
var dfs = function (cur) {
|
|
146
205
|
commonPre += cur.val;
|
|
147
206
|
if (commonPre === input)
|
|
148
207
|
return;
|
|
@@ -155,16 +214,10 @@ class Trie {
|
|
|
155
214
|
};
|
|
156
215
|
dfs(this._root);
|
|
157
216
|
return commonPre === input;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
* @returns The function `getLongestCommonPrefix` returns a string, which is the longest common prefix found in the
|
|
163
|
-
* Trie.
|
|
164
|
-
*/
|
|
165
|
-
getLongestCommonPrefix() {
|
|
166
|
-
let commonPre = '';
|
|
167
|
-
const dfs = (cur) => {
|
|
217
|
+
};
|
|
218
|
+
Trie.prototype.getLongestCommonPrefix = function () {
|
|
219
|
+
var commonPre = '';
|
|
220
|
+
var dfs = function (cur) {
|
|
168
221
|
commonPre += cur.val;
|
|
169
222
|
if (cur.isEnd)
|
|
170
223
|
return;
|
|
@@ -175,36 +228,55 @@ class Trie {
|
|
|
175
228
|
};
|
|
176
229
|
dfs(this._root);
|
|
177
230
|
return commonPre;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
* @returns an array of strings.
|
|
184
|
-
*/
|
|
185
|
-
getAll(prefix = '') {
|
|
186
|
-
const words = [];
|
|
231
|
+
};
|
|
232
|
+
Trie.prototype.getAll = function (prefix) {
|
|
233
|
+
var e_6, _a;
|
|
234
|
+
if (prefix === void 0) { prefix = ''; }
|
|
235
|
+
var words = [];
|
|
187
236
|
function dfs(node, word) {
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
237
|
+
var e_7, _a;
|
|
238
|
+
try {
|
|
239
|
+
for (var _b = __values(node.children.keys()), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
240
|
+
var char = _c.value;
|
|
241
|
+
var charNode = node.children.get(char);
|
|
242
|
+
if (charNode !== undefined) {
|
|
243
|
+
dfs(charNode, word.concat(char));
|
|
244
|
+
}
|
|
192
245
|
}
|
|
193
246
|
}
|
|
247
|
+
catch (e_7_1) { e_7 = { error: e_7_1 }; }
|
|
248
|
+
finally {
|
|
249
|
+
try {
|
|
250
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
251
|
+
}
|
|
252
|
+
finally { if (e_7) throw e_7.error; }
|
|
253
|
+
}
|
|
194
254
|
if (node.isEnd) {
|
|
195
255
|
words.push(word);
|
|
196
256
|
}
|
|
197
257
|
}
|
|
198
|
-
|
|
258
|
+
var startNode = this._root;
|
|
199
259
|
if (prefix) {
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
260
|
+
try {
|
|
261
|
+
for (var prefix_1 = __values(prefix), prefix_1_1 = prefix_1.next(); !prefix_1_1.done; prefix_1_1 = prefix_1.next()) {
|
|
262
|
+
var c = prefix_1_1.value;
|
|
263
|
+
var nodeC = startNode.children.get(c);
|
|
264
|
+
if (nodeC)
|
|
265
|
+
startNode = nodeC;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
catch (e_6_1) { e_6 = { error: e_6_1 }; }
|
|
269
|
+
finally {
|
|
270
|
+
try {
|
|
271
|
+
if (prefix_1_1 && !prefix_1_1.done && (_a = prefix_1.return)) _a.call(prefix_1);
|
|
272
|
+
}
|
|
273
|
+
finally { if (e_6) throw e_6.error; }
|
|
204
274
|
}
|
|
205
275
|
}
|
|
206
276
|
dfs(startNode, prefix);
|
|
207
277
|
return words;
|
|
208
|
-
}
|
|
209
|
-
|
|
278
|
+
};
|
|
279
|
+
return Trie;
|
|
280
|
+
}());
|
|
210
281
|
exports.Trie = Trie;
|
|
282
|
+
//# sourceMappingURL=trie.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trie.js","sourceRoot":"","sources":["../../../src/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"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,0CAAwB;AACxB,+CAA6B;AAC7B,0CAAwB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abstract-binary-tree.js","sourceRoot":"","sources":["../../src/interfaces/abstract-binary-tree.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abstract-graph.js","sourceRoot":"","sources":["../../src/interfaces/abstract-graph.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"avl-tree.js","sourceRoot":"","sources":["../../src/interfaces/avl-tree.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"binary-tree.js","sourceRoot":"","sources":["../../src/interfaces/binary-tree.ts"],"names":[],"mappings":""}
|
package/dist/interfaces/bst.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bst.js","sourceRoot":"","sources":["../../src/interfaces/bst.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"directed-graph.js","sourceRoot":"","sources":["../../src/interfaces/directed-graph.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doubly-linked-list.js","sourceRoot":"","sources":["../../src/interfaces/doubly-linked-list.ts"],"names":[],"mappings":""}
|
package/dist/interfaces/heap.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"heap.js","sourceRoot":"","sources":["../../src/interfaces/heap.ts"],"names":[],"mappings":""}
|
package/dist/interfaces/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AACvC,mDAAiC;AACjC,6CAA2B;AAC3B,gDAA8B;AAC9B,wCAAsB;AACtB,mDAAiC;AACjC,uDAAqC;AACrC,yCAAuB;AACvB,8CAA4B;AAC5B,mDAAiC;AACjC,4CAA0B;AAC1B,iDAA+B;AAC/B,uDAAqC;AACrC,kDAAgC;AAChC,qDAAmC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigator.js","sourceRoot":"","sources":["../../src/interfaces/navigator.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"priority-queue.js","sourceRoot":"","sources":["../../src/interfaces/priority-queue.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rb-tree.js","sourceRoot":"","sources":["../../src/interfaces/rb-tree.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"segment-tree.js","sourceRoot":"","sources":["../../src/interfaces/segment-tree.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"singly-linked-list.js","sourceRoot":"","sources":["../../src/interfaces/singly-linked-list.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tree-multiset.js","sourceRoot":"","sources":["../../src/interfaces/tree-multiset.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"undirected-graph.js","sourceRoot":"","sources":["../../src/interfaces/undirected-graph.ts"],"names":[],"mappings":""}
|
|
@@ -1,18 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FamilyPosition = exports.LoopType = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Enum representing different loop types.
|
|
6
|
-
*
|
|
7
|
-
* - `iterative`: Indicates the iterative loop type (with loops that use iterations).
|
|
8
|
-
* - `recursive`: Indicates the recursive loop type (with loops that call themselves).
|
|
9
|
-
*/
|
|
10
4
|
var LoopType;
|
|
11
5
|
(function (LoopType) {
|
|
12
6
|
LoopType["ITERATIVE"] = "ITERATIVE";
|
|
13
7
|
LoopType["RECURSIVE"] = "RECURSIVE";
|
|
14
8
|
})(LoopType = exports.LoopType || (exports.LoopType = {}));
|
|
15
|
-
/* This enumeration defines the position of a node within a family tree composed of three associated nodes, where 'root' represents the root node of the family tree, 'left' represents the left child node, and 'right' represents the right child node. */
|
|
16
9
|
var FamilyPosition;
|
|
17
10
|
(function (FamilyPosition) {
|
|
18
11
|
FamilyPosition["ROOT"] = "ROOT";
|
|
@@ -23,3 +16,4 @@ var FamilyPosition;
|
|
|
23
16
|
FamilyPosition["ISOLATED"] = "ISOLATED";
|
|
24
17
|
FamilyPosition["MAL_NODE"] = "MAL_NODE";
|
|
25
18
|
})(FamilyPosition = exports.FamilyPosition || (exports.FamilyPosition = {}));
|
|
19
|
+
//# sourceMappingURL=abstract-binary-tree.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abstract-binary-tree.js","sourceRoot":"","sources":["../../../src/types/data-structures/abstract-binary-tree.ts"],"names":[],"mappings":";;;AASA,IAAY,QAGX;AAHD,WAAY,QAAQ;IAClB,mCAAuB,CAAA;IACvB,mCAAuB,CAAA;AACzB,CAAC,EAHW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAGnB;AAGD,IAAY,cAQX;AARD,WAAY,cAAc;IACxB,+BAAa,CAAA;IACb,+BAAa,CAAA;IACb,iCAAe,CAAA;IACf,yCAAuB,CAAA;IACvB,2CAAyB,CAAA;IACzB,uCAAqB,CAAA;IACrB,uCAAqB,CAAA;AACvB,CAAC,EARW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAQzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abstract-graph.js","sourceRoot":"","sources":["../../../src/types/data-structures/abstract-graph.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"avl-tree.js","sourceRoot":"","sources":["../../../src/types/data-structures/avl-tree.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"binary-tree.js","sourceRoot":"","sources":["../../../src/types/data-structures/binary-tree.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bst.js","sourceRoot":"","sources":["../../../src/types/data-structures/bst.ts"],"names":[],"mappings":";;;AAYA,IAAY,EAAoC;AAAhD,WAAY,EAAE;IAAE,eAAS,CAAA;IAAE,eAAS,CAAA;IAAE,eAAS,CAAA;AAAA,CAAC,EAApC,EAAE,GAAF,UAAE,KAAF,UAAE,QAAkC"}
|