data-structure-typed 1.40.0-rc → 1.40.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/.eslintrc.js +7 -5
- package/.github/workflows/ci.yml +2 -20
- package/.travis.yml +3 -4
- package/CHANGELOG.md +22 -1
- package/CONTRIBUTING.md +13 -0
- package/README.md +20 -11
- package/dist/cjs/data-structures/binary-tree/avl-tree.d.ts +106 -0
- package/dist/cjs/data-structures/binary-tree/avl-tree.js +348 -0
- package/dist/cjs/data-structures/binary-tree/avl-tree.js.map +1 -0
- package/dist/cjs/data-structures/binary-tree/binary-indexed-tree.d.ts +149 -0
- package/dist/cjs/data-structures/binary-tree/binary-indexed-tree.js +270 -0
- package/dist/cjs/data-structures/binary-tree/binary-indexed-tree.js.map +1 -0
- package/dist/cjs/data-structures/binary-tree/binary-tree.d.ts +355 -0
- package/dist/cjs/data-structures/binary-tree/binary-tree.js +1116 -0
- package/dist/cjs/data-structures/binary-tree/binary-tree.js.map +1 -0
- package/dist/cjs/data-structures/binary-tree/bst.d.ts +167 -0
- package/dist/cjs/data-structures/binary-tree/bst.js +513 -0
- package/dist/cjs/data-structures/binary-tree/bst.js.map +1 -0
- package/dist/cjs/data-structures/binary-tree/index.d.ts +7 -0
- package/dist/cjs/data-structures/binary-tree/index.js +24 -0
- package/dist/cjs/data-structures/binary-tree/index.js.map +1 -0
- package/dist/cjs/data-structures/binary-tree/rb-tree.d.ts +11 -0
- package/dist/cjs/data-structures/binary-tree/rb-tree.js +22 -0
- package/dist/cjs/data-structures/binary-tree/rb-tree.js.map +1 -0
- package/dist/cjs/data-structures/binary-tree/segment-tree.d.ts +67 -0
- package/dist/cjs/data-structures/binary-tree/segment-tree.js +181 -0
- package/dist/cjs/data-structures/binary-tree/segment-tree.js.map +1 -0
- package/dist/cjs/data-structures/binary-tree/tree-multiset.d.ts +126 -0
- package/dist/cjs/data-structures/binary-tree/tree-multiset.js +356 -0
- package/dist/cjs/data-structures/binary-tree/tree-multiset.js.map +1 -0
- package/dist/cjs/data-structures/graph/abstract-graph.d.ts +313 -0
- package/dist/cjs/data-structures/graph/abstract-graph.js +885 -0
- package/dist/cjs/data-structures/graph/abstract-graph.js.map +1 -0
- package/dist/cjs/data-structures/graph/directed-graph.d.ts +194 -0
- package/dist/cjs/data-structures/graph/directed-graph.js +405 -0
- package/dist/cjs/data-structures/graph/directed-graph.js.map +1 -0
- package/dist/cjs/data-structures/graph/index.js.map +1 -0
- package/dist/cjs/data-structures/graph/map-graph.d.ts +73 -0
- package/dist/cjs/data-structures/graph/map-graph.js +94 -0
- package/dist/cjs/data-structures/graph/map-graph.js.map +1 -0
- package/dist/cjs/data-structures/graph/undirected-graph.d.ts +120 -0
- package/dist/cjs/data-structures/graph/undirected-graph.js +240 -0
- package/dist/cjs/data-structures/graph/undirected-graph.js.map +1 -0
- package/dist/cjs/data-structures/hash/coordinate-map.d.ts +44 -0
- package/dist/cjs/data-structures/hash/coordinate-map.js +63 -0
- package/dist/cjs/data-structures/hash/coordinate-map.js.map +1 -0
- package/dist/cjs/data-structures/hash/coordinate-set.d.ts +36 -0
- package/dist/cjs/data-structures/hash/coordinate-set.js +53 -0
- package/dist/cjs/data-structures/hash/coordinate-set.js.map +1 -0
- package/dist/cjs/data-structures/hash/hash-map.d.ts +50 -0
- package/dist/cjs/data-structures/hash/hash-map.js +154 -0
- package/dist/cjs/data-structures/hash/hash-map.js.map +1 -0
- package/dist/cjs/data-structures/hash/hash-table.d.ts +103 -0
- package/dist/cjs/data-structures/hash/hash-table.js +237 -0
- package/dist/cjs/data-structures/hash/hash-table.js.map +1 -0
- package/dist/cjs/data-structures/hash/index.d.ts +6 -0
- package/dist/cjs/data-structures/hash/index.js +23 -0
- package/dist/cjs/data-structures/hash/index.js.map +1 -0
- package/dist/cjs/data-structures/hash/tree-map.js.map +1 -0
- package/dist/cjs/data-structures/hash/tree-set.js.map +1 -0
- package/dist/cjs/data-structures/heap/heap.d.ts +235 -0
- package/dist/cjs/data-structures/heap/heap.js +516 -0
- package/dist/cjs/data-structures/heap/heap.js.map +1 -0
- package/dist/cjs/data-structures/heap/index.js.map +1 -0
- package/dist/cjs/data-structures/heap/max-heap.d.ts +15 -0
- package/dist/cjs/data-structures/heap/max-heap.js +27 -0
- package/dist/cjs/data-structures/heap/max-heap.js.map +1 -0
- package/dist/cjs/data-structures/heap/min-heap.d.ts +15 -0
- package/dist/cjs/data-structures/heap/min-heap.js +27 -0
- package/dist/cjs/data-structures/heap/min-heap.js.map +1 -0
- package/dist/cjs/data-structures/index.js.map +1 -0
- package/dist/cjs/data-structures/linked-list/doubly-linked-list.d.ts +253 -0
- package/dist/cjs/data-structures/linked-list/doubly-linked-list.js +570 -0
- package/dist/cjs/data-structures/linked-list/doubly-linked-list.js.map +1 -0
- package/dist/cjs/data-structures/linked-list/index.js.map +1 -0
- package/dist/cjs/data-structures/linked-list/singly-linked-list.d.ts +232 -0
- package/dist/cjs/data-structures/linked-list/singly-linked-list.js +534 -0
- package/dist/cjs/data-structures/linked-list/singly-linked-list.js.map +1 -0
- package/dist/cjs/data-structures/linked-list/skip-linked-list.d.ts +80 -0
- package/dist/cjs/data-structures/linked-list/skip-linked-list.js +188 -0
- package/dist/cjs/data-structures/linked-list/skip-linked-list.js.map +1 -0
- package/dist/cjs/data-structures/matrix/index.js.map +1 -0
- package/dist/cjs/data-structures/matrix/matrix.d.ts +21 -0
- package/dist/cjs/data-structures/matrix/matrix.js.map +1 -0
- package/dist/cjs/data-structures/matrix/matrix2d.d.ts +107 -0
- package/dist/cjs/data-structures/matrix/matrix2d.js +200 -0
- package/dist/cjs/data-structures/matrix/matrix2d.js.map +1 -0
- package/dist/cjs/data-structures/matrix/navigator.d.ts +52 -0
- package/dist/cjs/data-structures/matrix/navigator.js.map +1 -0
- package/dist/cjs/data-structures/matrix/vector2d.d.ts +200 -0
- package/dist/cjs/data-structures/matrix/vector2d.js +291 -0
- package/dist/cjs/data-structures/matrix/vector2d.js.map +1 -0
- package/dist/cjs/data-structures/priority-queue/index.js.map +1 -0
- package/dist/cjs/data-structures/priority-queue/max-priority-queue.d.ts +15 -0
- package/dist/cjs/data-structures/priority-queue/max-priority-queue.js +27 -0
- package/dist/cjs/data-structures/priority-queue/max-priority-queue.js.map +1 -0
- package/dist/cjs/data-structures/priority-queue/min-priority-queue.d.ts +15 -0
- package/dist/cjs/data-structures/priority-queue/min-priority-queue.js +27 -0
- package/dist/cjs/data-structures/priority-queue/min-priority-queue.js.map +1 -0
- package/dist/cjs/data-structures/priority-queue/priority-queue.d.ts +15 -0
- package/dist/cjs/data-structures/priority-queue/priority-queue.js +18 -0
- package/dist/cjs/data-structures/priority-queue/priority-queue.js.map +1 -0
- package/dist/cjs/data-structures/queue/deque.d.ts +161 -0
- package/dist/cjs/data-structures/queue/deque.js +265 -0
- package/dist/cjs/data-structures/queue/deque.js.map +1 -0
- package/dist/cjs/data-structures/queue/index.js.map +1 -0
- package/dist/cjs/data-structures/queue/queue.d.ts +122 -0
- package/dist/cjs/data-structures/queue/queue.js +188 -0
- package/dist/cjs/data-structures/queue/queue.js.map +1 -0
- package/dist/cjs/data-structures/stack/index.js.map +1 -0
- package/dist/cjs/data-structures/stack/stack.d.ts +64 -0
- package/dist/cjs/data-structures/stack/stack.js +95 -0
- package/dist/cjs/data-structures/stack/stack.js.map +1 -0
- package/dist/cjs/data-structures/tree/index.js.map +1 -0
- package/dist/cjs/data-structures/tree/tree.d.ts +8 -0
- package/dist/cjs/data-structures/tree/tree.js +41 -0
- package/dist/cjs/data-structures/tree/tree.js.map +1 -0
- package/dist/cjs/data-structures/trie/index.js.map +1 -0
- package/dist/cjs/data-structures/trie/trie.d.ts +79 -0
- package/dist/cjs/data-structures/trie/trie.js +252 -0
- package/dist/cjs/data-structures/trie/trie.js.map +1 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/interfaces/binary-tree.d.ts +7 -0
- package/dist/cjs/interfaces/binary-tree.js.map +1 -0
- package/dist/cjs/interfaces/doubly-linked-list.js.map +1 -0
- package/dist/cjs/interfaces/graph.d.ts +5 -0
- package/dist/cjs/interfaces/graph.js +3 -0
- package/dist/cjs/interfaces/graph.js.map +1 -0
- package/dist/cjs/interfaces/heap.js.map +1 -0
- package/dist/cjs/interfaces/index.d.ts +8 -0
- package/dist/cjs/interfaces/index.js +25 -0
- package/dist/cjs/interfaces/index.js.map +1 -0
- package/dist/cjs/interfaces/navigator.js.map +1 -0
- package/dist/cjs/interfaces/priority-queue.js.map +1 -0
- package/dist/cjs/interfaces/segment-tree.js.map +1 -0
- package/dist/cjs/interfaces/singly-linked-list.js.map +1 -0
- package/dist/cjs/types/data-structures/binary-tree/avl-tree.d.ts +4 -0
- package/dist/cjs/types/data-structures/binary-tree/avl-tree.js.map +1 -0
- package/dist/cjs/types/data-structures/binary-tree/binary-indexed-tree.js +3 -0
- package/dist/cjs/types/data-structures/binary-tree/binary-indexed-tree.js.map +1 -0
- package/dist/cjs/types/data-structures/binary-tree/binary-tree.d.ts +29 -0
- package/dist/cjs/types/data-structures/binary-tree/binary-tree.js +25 -0
- package/dist/cjs/types/data-structures/binary-tree/binary-tree.js.map +1 -0
- package/dist/cjs/types/data-structures/binary-tree/bst.d.ts +7 -0
- package/dist/cjs/types/data-structures/binary-tree/bst.js.map +1 -0
- package/dist/cjs/types/data-structures/binary-tree/index.d.ts +6 -0
- package/dist/cjs/types/data-structures/binary-tree/index.js +23 -0
- package/dist/cjs/types/data-structures/binary-tree/index.js.map +1 -0
- package/dist/cjs/types/data-structures/binary-tree/rb-tree.d.ts +8 -0
- package/dist/cjs/types/data-structures/binary-tree/rb-tree.js.map +1 -0
- package/dist/cjs/types/data-structures/binary-tree/segment-tree.js.map +1 -0
- package/dist/cjs/types/data-structures/binary-tree/tree-multiset.d.ts +4 -0
- package/dist/cjs/types/data-structures/binary-tree/tree-multiset.js.map +1 -0
- package/dist/cjs/types/data-structures/graph/abstract-graph.d.ts +10 -0
- package/dist/cjs/types/data-structures/graph/abstract-graph.js.map +1 -0
- package/dist/cjs/types/data-structures/graph/directed-graph.js.map +1 -0
- package/dist/cjs/types/data-structures/graph/index.d.ts +3 -0
- package/dist/cjs/types/data-structures/graph/index.js +20 -0
- package/dist/cjs/types/data-structures/graph/index.js.map +1 -0
- package/dist/cjs/types/data-structures/graph/map-graph.js.map +1 -0
- package/dist/cjs/types/data-structures/graph/undirected-graph.js.map +1 -0
- package/dist/cjs/types/data-structures/hash/coordinate-map.js +3 -0
- package/dist/cjs/types/data-structures/hash/coordinate-map.js.map +1 -0
- package/dist/cjs/types/data-structures/hash/coordinate-set.js +3 -0
- package/dist/cjs/types/data-structures/hash/coordinate-set.js.map +1 -0
- package/dist/cjs/types/data-structures/hash/hash-map.js +3 -0
- package/dist/cjs/types/data-structures/hash/hash-map.js.map +1 -0
- package/dist/cjs/types/data-structures/hash/hash-table.js +3 -0
- package/dist/cjs/types/data-structures/hash/hash-table.js.map +1 -0
- package/dist/cjs/types/data-structures/hash/index.js +3 -0
- package/dist/cjs/types/data-structures/hash/index.js.map +1 -0
- package/dist/cjs/types/data-structures/hash/tree-map.js +3 -0
- package/dist/cjs/types/data-structures/hash/tree-map.js.map +1 -0
- package/dist/cjs/types/data-structures/hash/tree-set.js +3 -0
- package/dist/cjs/types/data-structures/hash/tree-set.js.map +1 -0
- package/dist/cjs/types/data-structures/heap/heap.js.map +1 -0
- package/dist/cjs/types/data-structures/heap/index.d.ts +1 -0
- package/dist/cjs/types/data-structures/heap/index.js +18 -0
- package/dist/cjs/types/data-structures/heap/index.js.map +1 -0
- package/dist/cjs/types/data-structures/heap/max-heap.js +3 -0
- package/dist/cjs/types/data-structures/heap/max-heap.js.map +1 -0
- package/dist/cjs/types/data-structures/heap/min-heap.js +3 -0
- package/dist/cjs/types/data-structures/heap/min-heap.js.map +1 -0
- package/dist/cjs/types/data-structures/index.d.ts +11 -0
- package/dist/cjs/types/data-structures/index.js +28 -0
- package/dist/cjs/types/data-structures/index.js.map +1 -0
- package/dist/cjs/types/data-structures/linked-list/doubly-linked-list.js.map +1 -0
- package/dist/cjs/types/data-structures/linked-list/index.d.ts +2 -0
- package/dist/cjs/types/data-structures/linked-list/index.js +19 -0
- package/dist/cjs/types/data-structures/linked-list/index.js.map +1 -0
- package/dist/cjs/types/data-structures/linked-list/singly-linked-list.js.map +1 -0
- package/dist/cjs/types/data-structures/linked-list/skip-linked-list.js +3 -0
- package/dist/cjs/types/data-structures/linked-list/skip-linked-list.js.map +1 -0
- package/dist/cjs/types/data-structures/matrix/index.d.ts +1 -0
- package/dist/cjs/types/data-structures/matrix/index.js +18 -0
- package/dist/cjs/types/data-structures/matrix/index.js.map +1 -0
- package/dist/cjs/types/data-structures/matrix/matrix.js +3 -0
- package/dist/cjs/types/data-structures/matrix/matrix.js.map +1 -0
- package/dist/cjs/types/data-structures/matrix/matrix2d.js +3 -0
- package/dist/cjs/types/data-structures/matrix/matrix2d.js.map +1 -0
- package/dist/cjs/types/data-structures/matrix/navigator.js.map +1 -0
- package/dist/cjs/types/data-structures/matrix/vector2d.js +3 -0
- package/dist/cjs/types/data-structures/matrix/vector2d.js.map +1 -0
- package/dist/cjs/types/data-structures/priority-queue/index.js +20 -0
- package/dist/cjs/types/data-structures/priority-queue/index.js.map +1 -0
- package/dist/cjs/types/data-structures/priority-queue/max-priority-queue.js +3 -0
- package/dist/cjs/types/data-structures/priority-queue/max-priority-queue.js.map +1 -0
- package/dist/cjs/types/data-structures/priority-queue/min-priority-queue.js +3 -0
- package/dist/cjs/types/data-structures/priority-queue/min-priority-queue.js.map +1 -0
- package/dist/cjs/types/data-structures/priority-queue/priority-queue.js.map +1 -0
- package/dist/cjs/types/data-structures/queue/deque.js +3 -0
- package/dist/cjs/types/data-structures/queue/deque.js.map +1 -0
- package/dist/cjs/types/data-structures/queue/index.js +19 -0
- package/dist/cjs/types/data-structures/queue/index.js.map +1 -0
- package/dist/cjs/types/data-structures/queue/queue.js +3 -0
- package/dist/cjs/types/data-structures/queue/queue.js.map +1 -0
- package/dist/cjs/types/data-structures/stack/index.js +18 -0
- package/dist/cjs/types/data-structures/stack/index.js.map +1 -0
- package/dist/cjs/types/data-structures/stack/stack.js +3 -0
- package/dist/cjs/types/data-structures/stack/stack.js.map +1 -0
- package/dist/cjs/types/data-structures/tree/index.js +18 -0
- package/dist/cjs/types/data-structures/tree/index.js.map +1 -0
- package/dist/cjs/types/data-structures/tree/tree.js +3 -0
- package/dist/cjs/types/data-structures/tree/tree.js.map +1 -0
- package/dist/cjs/types/data-structures/trie/index.js +18 -0
- package/dist/cjs/types/data-structures/trie/index.js.map +1 -0
- package/dist/cjs/types/data-structures/trie/trie.js +3 -0
- package/dist/cjs/types/data-structures/trie/trie.js.map +1 -0
- package/dist/cjs/types/helpers.d.ts +8 -0
- package/dist/cjs/types/helpers.js +10 -0
- package/dist/cjs/types/helpers.js.map +1 -0
- package/dist/cjs/types/index.js.map +1 -0
- package/dist/cjs/types/utils/index.js.map +1 -0
- package/dist/cjs/types/utils/utils.js.map +1 -0
- package/dist/cjs/types/utils/validate-type.js.map +1 -0
- package/dist/cjs/utils/index.js.map +1 -0
- package/dist/cjs/utils/utils.d.ts +20 -0
- package/dist/cjs/utils/utils.js +74 -0
- package/dist/cjs/utils/utils.js.map +1 -0
- package/dist/mjs/data-structures/binary-tree/avl-tree.d.ts +106 -0
- package/dist/mjs/data-structures/binary-tree/avl-tree.js +348 -0
- package/dist/mjs/data-structures/binary-tree/binary-indexed-tree.d.ts +149 -0
- package/dist/mjs/data-structures/binary-tree/binary-indexed-tree.js +274 -0
- package/dist/mjs/data-structures/binary-tree/binary-tree.d.ts +355 -0
- package/dist/mjs/data-structures/binary-tree/binary-tree.js +1127 -0
- package/dist/mjs/data-structures/binary-tree/bst.d.ts +167 -0
- package/dist/mjs/data-structures/binary-tree/bst.js +509 -0
- package/dist/mjs/data-structures/binary-tree/index.d.ts +7 -0
- package/dist/mjs/data-structures/binary-tree/index.js +23 -0
- package/dist/mjs/data-structures/binary-tree/rb-tree.d.ts +11 -0
- package/dist/mjs/data-structures/binary-tree/rb-tree.js +22 -0
- package/dist/mjs/data-structures/binary-tree/segment-tree.d.ts +67 -0
- package/dist/mjs/data-structures/binary-tree/segment-tree.js +182 -0
- package/dist/mjs/data-structures/binary-tree/tree-multiset.d.ts +126 -0
- package/dist/mjs/data-structures/binary-tree/tree-multiset.js +356 -0
- package/dist/mjs/data-structures/graph/abstract-graph.d.ts +313 -0
- package/dist/mjs/data-structures/graph/abstract-graph.js +883 -0
- package/dist/mjs/data-structures/graph/directed-graph.d.ts +194 -0
- package/dist/mjs/data-structures/graph/directed-graph.js +406 -0
- package/dist/mjs/data-structures/graph/index.js +20 -0
- package/dist/mjs/data-structures/graph/map-graph.d.ts +73 -0
- package/dist/mjs/data-structures/graph/map-graph.js +96 -0
- package/dist/mjs/data-structures/graph/undirected-graph.d.ts +120 -0
- package/dist/mjs/data-structures/graph/undirected-graph.js +239 -0
- package/dist/mjs/data-structures/hash/coordinate-map.d.ts +44 -0
- package/dist/mjs/data-structures/hash/coordinate-map.js +62 -0
- package/dist/mjs/data-structures/hash/coordinate-set.d.ts +36 -0
- package/dist/mjs/data-structures/hash/coordinate-set.js +52 -0
- package/dist/mjs/data-structures/hash/hash-map.d.ts +50 -0
- package/dist/mjs/data-structures/hash/hash-map.js +159 -0
- package/dist/mjs/data-structures/hash/hash-table.d.ts +103 -0
- package/dist/mjs/data-structures/hash/hash-table.js +243 -0
- package/dist/mjs/data-structures/hash/index.d.ts +6 -0
- package/dist/mjs/data-structures/hash/index.js +22 -0
- package/dist/mjs/data-structures/hash/tree-map.js +6 -0
- package/dist/mjs/data-structures/hash/tree-set.js +6 -0
- package/dist/mjs/data-structures/heap/heap.d.ts +235 -0
- package/dist/mjs/data-structures/heap/heap.js +525 -0
- package/dist/mjs/data-structures/heap/index.js +19 -0
- package/dist/mjs/data-structures/heap/max-heap.d.ts +15 -0
- package/dist/mjs/data-structures/heap/max-heap.js +26 -0
- package/dist/mjs/data-structures/heap/min-heap.d.ts +15 -0
- package/dist/mjs/data-structures/heap/min-heap.js +26 -0
- package/dist/mjs/data-structures/index.js +27 -0
- package/dist/mjs/data-structures/linked-list/doubly-linked-list.d.ts +253 -0
- package/dist/mjs/data-structures/linked-list/doubly-linked-list.js +573 -0
- package/dist/mjs/data-structures/linked-list/index.js +19 -0
- package/dist/mjs/data-structures/linked-list/singly-linked-list.d.ts +232 -0
- package/dist/mjs/data-structures/linked-list/singly-linked-list.js +538 -0
- package/dist/mjs/data-structures/linked-list/skip-linked-list.d.ts +80 -0
- package/dist/mjs/data-structures/linked-list/skip-linked-list.js +194 -0
- package/dist/mjs/data-structures/matrix/index.js +20 -0
- package/dist/mjs/data-structures/matrix/matrix.d.ts +21 -0
- package/dist/mjs/data-structures/matrix/matrix.js +29 -0
- package/dist/mjs/data-structures/matrix/matrix2d.d.ts +107 -0
- package/dist/mjs/data-structures/matrix/matrix2d.js +200 -0
- package/dist/mjs/data-structures/matrix/navigator.d.ts +52 -0
- package/dist/mjs/data-structures/matrix/navigator.js +113 -0
- package/dist/mjs/data-structures/matrix/vector2d.d.ts +200 -0
- package/dist/mjs/data-structures/matrix/vector2d.js +293 -0
- package/dist/mjs/data-structures/priority-queue/index.js +19 -0
- package/dist/mjs/data-structures/priority-queue/max-priority-queue.d.ts +15 -0
- package/dist/mjs/data-structures/priority-queue/max-priority-queue.js +26 -0
- package/dist/mjs/data-structures/priority-queue/min-priority-queue.d.ts +15 -0
- package/dist/mjs/data-structures/priority-queue/min-priority-queue.js +26 -0
- package/dist/mjs/data-structures/priority-queue/priority-queue.d.ts +15 -0
- package/dist/mjs/data-structures/priority-queue/priority-queue.js +17 -0
- package/dist/mjs/data-structures/queue/deque.d.ts +161 -0
- package/dist/mjs/data-structures/queue/deque.js +257 -0
- package/dist/mjs/data-structures/queue/index.js +18 -0
- package/dist/mjs/data-structures/queue/queue.d.ts +122 -0
- package/dist/mjs/data-structures/queue/queue.js +188 -0
- package/dist/mjs/data-structures/stack/index.js +17 -0
- package/dist/mjs/data-structures/stack/stack.d.ts +64 -0
- package/dist/mjs/data-structures/stack/stack.js +95 -0
- package/dist/mjs/data-structures/tree/index.js +17 -0
- package/dist/mjs/data-structures/tree/tree.d.ts +8 -0
- package/dist/mjs/data-structures/tree/tree.js +43 -0
- package/dist/mjs/data-structures/trie/index.js +17 -0
- package/dist/mjs/data-structures/trie/trie.d.ts +79 -0
- package/dist/mjs/data-structures/trie/trie.js +256 -0
- package/dist/mjs/index.js +20 -0
- package/dist/mjs/interfaces/binary-tree.d.ts +7 -0
- package/dist/mjs/interfaces/binary-tree.js +2 -0
- package/dist/mjs/interfaces/doubly-linked-list.js +2 -0
- package/dist/mjs/interfaces/graph.d.ts +5 -0
- package/dist/mjs/interfaces/graph.js +2 -0
- package/dist/mjs/interfaces/heap.js +2 -0
- package/dist/mjs/interfaces/index.d.ts +8 -0
- package/dist/mjs/interfaces/index.js +24 -0
- package/dist/mjs/interfaces/navigator.js +2 -0
- package/dist/mjs/interfaces/priority-queue.js +2 -0
- package/dist/mjs/interfaces/segment-tree.js +2 -0
- package/dist/mjs/interfaces/singly-linked-list.js +2 -0
- package/dist/mjs/types/data-structures/binary-tree/avl-tree.d.ts +4 -0
- package/dist/mjs/types/data-structures/binary-tree/avl-tree.js +2 -0
- package/dist/mjs/types/data-structures/binary-tree/binary-indexed-tree.js +2 -0
- package/dist/mjs/types/data-structures/binary-tree/binary-tree.d.ts +29 -0
- package/dist/mjs/types/data-structures/binary-tree/binary-tree.js +24 -0
- package/dist/mjs/types/data-structures/binary-tree/bst.d.ts +7 -0
- package/dist/mjs/types/data-structures/binary-tree/bst.js +2 -0
- package/dist/mjs/types/data-structures/binary-tree/index.d.ts +6 -0
- package/dist/mjs/types/data-structures/binary-tree/index.js +22 -0
- package/dist/mjs/types/data-structures/binary-tree/rb-tree.d.ts +8 -0
- package/dist/mjs/types/data-structures/binary-tree/rb-tree.js +8 -0
- package/dist/mjs/types/data-structures/binary-tree/segment-tree.js +2 -0
- package/dist/mjs/types/data-structures/binary-tree/tree-multiset.d.ts +4 -0
- package/dist/mjs/types/data-structures/binary-tree/tree-multiset.js +2 -0
- package/dist/mjs/types/data-structures/graph/abstract-graph.d.ts +10 -0
- package/dist/mjs/types/data-structures/graph/abstract-graph.js +2 -0
- package/dist/mjs/types/data-structures/graph/directed-graph.js +9 -0
- package/dist/mjs/types/data-structures/graph/index.d.ts +3 -0
- package/dist/mjs/types/data-structures/graph/index.js +19 -0
- package/dist/mjs/types/data-structures/graph/map-graph.js +2 -0
- package/dist/mjs/types/data-structures/graph/undirected-graph.js +2 -0
- package/dist/mjs/types/data-structures/hash/coordinate-map.js +2 -0
- package/dist/mjs/types/data-structures/hash/coordinate-set.js +2 -0
- package/dist/mjs/types/data-structures/hash/hash-map.js +2 -0
- package/dist/mjs/types/data-structures/hash/hash-table.js +2 -0
- package/dist/mjs/types/data-structures/hash/index.js +2 -0
- package/dist/mjs/types/data-structures/hash/tree-map.js +2 -0
- package/dist/mjs/types/data-structures/hash/tree-set.js +2 -0
- package/dist/mjs/types/data-structures/heap/heap.js +2 -0
- package/dist/mjs/types/data-structures/heap/index.d.ts +1 -0
- package/dist/mjs/types/data-structures/heap/index.js +17 -0
- package/dist/mjs/types/data-structures/heap/max-heap.js +2 -0
- package/dist/mjs/types/data-structures/heap/min-heap.js +2 -0
- package/dist/mjs/types/data-structures/index.d.ts +11 -0
- package/dist/mjs/types/data-structures/index.js +27 -0
- package/dist/mjs/types/data-structures/linked-list/doubly-linked-list.js +2 -0
- package/dist/mjs/types/data-structures/linked-list/index.d.ts +2 -0
- package/dist/mjs/types/data-structures/linked-list/index.js +18 -0
- package/dist/mjs/types/data-structures/linked-list/singly-linked-list.js +2 -0
- package/dist/mjs/types/data-structures/linked-list/skip-linked-list.d.ts +1 -0
- package/dist/mjs/types/data-structures/linked-list/skip-linked-list.js +2 -0
- package/dist/mjs/types/data-structures/matrix/index.d.ts +1 -0
- package/dist/mjs/types/data-structures/matrix/index.js +17 -0
- package/dist/mjs/types/data-structures/matrix/matrix.d.ts +1 -0
- package/dist/mjs/types/data-structures/matrix/matrix.js +2 -0
- package/dist/mjs/types/data-structures/matrix/matrix2d.d.ts +1 -0
- package/dist/mjs/types/data-structures/matrix/matrix2d.js +2 -0
- package/dist/mjs/types/data-structures/matrix/navigator.js +2 -0
- package/dist/mjs/types/data-structures/matrix/vector2d.d.ts +1 -0
- package/dist/mjs/types/data-structures/matrix/vector2d.js +2 -0
- package/dist/mjs/types/data-structures/priority-queue/index.d.ts +3 -0
- package/dist/mjs/types/data-structures/priority-queue/index.js +19 -0
- package/dist/mjs/types/data-structures/priority-queue/max-priority-queue.d.ts +1 -0
- package/dist/mjs/types/data-structures/priority-queue/max-priority-queue.js +2 -0
- package/dist/mjs/types/data-structures/priority-queue/min-priority-queue.d.ts +1 -0
- package/dist/mjs/types/data-structures/priority-queue/min-priority-queue.js +2 -0
- package/dist/mjs/types/data-structures/priority-queue/priority-queue.d.ts +1 -0
- package/dist/mjs/types/data-structures/priority-queue/priority-queue.js +2 -0
- package/dist/mjs/types/data-structures/queue/deque.d.ts +1 -0
- package/dist/mjs/types/data-structures/queue/deque.js +2 -0
- package/dist/mjs/types/data-structures/queue/index.d.ts +2 -0
- package/dist/mjs/types/data-structures/queue/index.js +18 -0
- package/dist/mjs/types/data-structures/queue/queue.d.ts +1 -0
- package/dist/mjs/types/data-structures/queue/queue.js +2 -0
- package/dist/mjs/types/data-structures/stack/index.d.ts +1 -0
- package/dist/mjs/types/data-structures/stack/index.js +17 -0
- package/dist/mjs/types/data-structures/stack/stack.d.ts +1 -0
- package/dist/mjs/types/data-structures/stack/stack.js +2 -0
- package/dist/mjs/types/data-structures/tree/index.d.ts +1 -0
- package/dist/mjs/types/data-structures/tree/index.js +17 -0
- package/dist/mjs/types/data-structures/tree/tree.d.ts +1 -0
- package/dist/mjs/types/data-structures/tree/tree.js +2 -0
- package/dist/mjs/types/data-structures/trie/index.d.ts +1 -0
- package/dist/mjs/types/data-structures/trie/index.js +17 -0
- package/dist/mjs/types/data-structures/trie/trie.d.ts +1 -0
- package/dist/mjs/types/data-structures/trie/trie.js +2 -0
- package/dist/mjs/types/helpers.d.ts +8 -0
- package/dist/mjs/types/helpers.js +9 -0
- package/dist/mjs/types/index.js +19 -0
- package/dist/mjs/types/utils/index.js +18 -0
- package/dist/mjs/types/utils/utils.js +2 -0
- package/dist/mjs/types/utils/validate-type.js +2 -0
- package/dist/mjs/utils/index.js +17 -0
- package/dist/mjs/utils/utils.d.ts +20 -0
- package/dist/mjs/utils/utils.js +64 -0
- package/dist/umd/data-structure-typed.min.js +27 -0
- package/dist/umd/data-structure-typed.min.js.map +1 -0
- package/package.json +28 -22
- package/src/data-structures/binary-tree/avl-tree.ts +88 -74
- package/src/data-structures/binary-tree/binary-indexed-tree.ts +265 -35
- package/src/data-structures/binary-tree/binary-tree.ts +1241 -26
- package/src/data-structures/binary-tree/bst.ts +217 -237
- package/src/data-structures/binary-tree/index.ts +0 -5
- package/src/data-structures/binary-tree/rb-tree.ts +28 -36
- package/src/data-structures/binary-tree/segment-tree.ts +25 -92
- package/src/data-structures/binary-tree/tree-multiset.ts +113 -422
- package/src/data-structures/graph/abstract-graph.ts +169 -214
- package/src/data-structures/graph/directed-graph.ts +105 -126
- package/src/data-structures/graph/map-graph.ts +29 -57
- package/src/data-structures/graph/undirected-graph.ts +67 -82
- package/src/data-structures/hash/coordinate-map.ts +0 -4
- package/src/data-structures/hash/coordinate-set.ts +0 -4
- package/src/data-structures/hash/hash-map.ts +65 -83
- package/src/data-structures/hash/hash-table.ts +109 -118
- package/src/data-structures/hash/index.ts +0 -1
- package/src/data-structures/hash/tree-map.ts +2 -1
- package/src/data-structures/hash/tree-set.ts +2 -1
- package/src/data-structures/heap/heap.ts +505 -128
- package/src/data-structures/heap/max-heap.ts +16 -21
- package/src/data-structures/heap/min-heap.ts +16 -22
- package/src/data-structures/linked-list/doubly-linked-list.ts +143 -174
- package/src/data-structures/linked-list/singly-linked-list.ts +174 -99
- package/src/data-structures/linked-list/skip-linked-list.ts +104 -49
- package/src/data-structures/matrix/matrix.ts +2 -2
- package/src/data-structures/matrix/matrix2d.ts +12 -14
- package/src/data-structures/matrix/navigator.ts +4 -4
- package/src/data-structures/matrix/vector2d.ts +2 -3
- package/src/data-structures/priority-queue/max-priority-queue.ts +15 -46
- package/src/data-structures/priority-queue/min-priority-queue.ts +15 -47
- package/src/data-structures/priority-queue/priority-queue.ts +7 -350
- package/src/data-structures/queue/deque.ts +62 -77
- package/src/data-structures/queue/queue.ts +39 -21
- package/src/data-structures/stack/stack.ts +13 -9
- package/src/data-structures/tree/tree.ts +10 -38
- package/src/data-structures/trie/trie.ts +108 -71
- package/src/interfaces/binary-tree.ts +7 -4
- package/src/interfaces/graph.ts +7 -0
- package/src/interfaces/index.ts +1 -8
- package/src/types/data-structures/binary-tree/avl-tree.ts +5 -0
- package/src/types/data-structures/binary-tree/binary-indexed-tree.ts +1 -0
- package/src/types/data-structures/binary-tree/binary-tree.ts +31 -0
- package/src/types/data-structures/binary-tree/bst.ts +11 -0
- package/src/types/data-structures/binary-tree/index.ts +6 -0
- package/src/types/data-structures/binary-tree/rb-tree.ts +8 -0
- package/src/types/data-structures/binary-tree/tree-multiset.ts +6 -0
- package/src/types/data-structures/graph/abstract-graph.ts +11 -0
- package/src/types/data-structures/graph/index.ts +3 -0
- package/src/types/data-structures/graph/undirected-graph.ts +1 -0
- package/src/types/data-structures/hash/coordinate-map.ts +1 -0
- package/src/types/data-structures/hash/coordinate-set.ts +1 -0
- package/src/types/data-structures/hash/hash-map.ts +1 -0
- package/src/types/data-structures/hash/hash-table.ts +1 -0
- package/src/types/data-structures/hash/tree-map.ts +1 -0
- package/src/types/data-structures/hash/tree-set.ts +1 -0
- package/src/types/data-structures/heap/heap.ts +1 -0
- package/src/types/data-structures/heap/index.ts +1 -0
- package/src/types/data-structures/heap/max-heap.ts +1 -0
- package/src/types/data-structures/heap/min-heap.ts +1 -0
- package/src/types/data-structures/index.ts +8 -13
- package/src/types/data-structures/linked-list/doubly-linked-list.ts +1 -0
- package/src/types/data-structures/linked-list/index.ts +2 -0
- package/src/types/data-structures/linked-list/singly-linked-list.ts +1 -0
- package/src/types/data-structures/linked-list/skip-linked-list.ts +1 -0
- package/src/types/data-structures/matrix/index.ts +1 -0
- package/src/types/data-structures/matrix/matrix.ts +1 -0
- package/src/types/data-structures/matrix/matrix2d.ts +1 -0
- package/src/types/data-structures/matrix/navigator.ts +14 -0
- package/src/types/data-structures/matrix/vector2d.ts +1 -0
- package/src/types/data-structures/priority-queue/index.ts +3 -0
- package/src/types/data-structures/priority-queue/max-priority-queue.ts +1 -0
- package/src/types/data-structures/priority-queue/min-priority-queue.ts +1 -0
- package/src/types/data-structures/priority-queue/priority-queue.ts +1 -0
- package/src/types/data-structures/queue/deque.ts +1 -0
- package/src/types/data-structures/queue/index.ts +2 -0
- package/src/types/data-structures/queue/queue.ts +1 -0
- package/src/types/data-structures/stack/index.ts +1 -0
- package/src/types/data-structures/stack/stack.ts +1 -0
- package/src/types/data-structures/tree/index.ts +1 -0
- package/src/types/data-structures/tree/tree.ts +1 -0
- package/src/types/data-structures/trie/index.ts +1 -0
- package/src/types/data-structures/trie/trie.ts +1 -0
- package/src/types/helpers.ts +11 -1
- package/src/types/utils/utils.ts +1 -1
- package/src/types/utils/validate-type.ts +2 -2
- package/src/utils/utils.ts +7 -0
- package/test/config.js +4 -0
- package/test/config.ts +1 -0
- package/test/integration/avl-tree.test.ts +24 -22
- package/test/integration/bst.test.ts +52 -47
- package/test/integration/index.html +3 -4
- package/test/types/index.js +29 -0
- package/test/types/utils/big-o.js +2 -0
- package/test/types/utils/big-o.ts +1 -0
- package/test/types/utils/index.js +29 -0
- package/test/types/utils/index.ts +1 -0
- package/test/unit/data-structures/binary-tree/avl-tree.test.ts +184 -23
- package/test/unit/data-structures/binary-tree/binary-index-tree.test.ts +320 -0
- package/test/unit/data-structures/binary-tree/binary-tree.test.ts +393 -40
- package/test/unit/data-structures/binary-tree/bst.test.ts +506 -48
- package/test/unit/data-structures/binary-tree/overall.test.ts +8 -7
- package/test/unit/data-structures/binary-tree/rb-tree.test.ts +79 -13
- package/test/unit/data-structures/binary-tree/tree-multiset.test.ts +296 -215
- package/test/unit/data-structures/graph/abstract-graph.test.ts +97 -2
- package/test/unit/data-structures/graph/directed-graph.test.ts +76 -31
- package/test/unit/data-structures/graph/map-graph.test.ts +93 -12
- package/test/unit/data-structures/graph/overall.test.ts +2 -2
- package/test/unit/data-structures/graph/undirected-graph.test.ts +93 -3
- package/test/unit/data-structures/hash/coordinate-map.test.ts +20 -0
- package/test/unit/data-structures/hash/coordinate-set.test.ts +25 -0
- package/test/unit/data-structures/hash/hash-map.test.ts +2 -3
- package/test/unit/data-structures/hash/hash-table.test.ts +10 -8
- package/test/unit/data-structures/heap/heap.test.ts +218 -20
- package/test/unit/data-structures/heap/max-heap.test.ts +50 -42
- package/test/unit/data-structures/heap/min-heap.test.ts +38 -68
- package/test/unit/data-structures/linked-list/doubly-linked-list.test.ts +86 -27
- package/test/unit/data-structures/linked-list/linked-list.test.ts +4 -4
- package/test/unit/data-structures/linked-list/singly-linked-list.test.ts +71 -27
- package/test/unit/data-structures/linked-list/skip-list.test.ts +33 -2
- package/test/unit/data-structures/matrix/matrix2d.test.ts +207 -0
- package/test/unit/data-structures/matrix/navigator.test.ts +167 -2
- package/test/unit/data-structures/matrix/vector2d.test.ts +171 -0
- package/test/unit/data-structures/priority-queue/max-priority-queue.test.ts +10 -11
- package/test/unit/data-structures/priority-queue/min-priority-queue.test.ts +1 -1
- package/test/unit/data-structures/priority-queue/priority-queue.test.ts +14 -30
- package/test/unit/data-structures/queue/deque.test.ts +303 -23
- package/test/unit/data-structures/queue/queue.test.ts +52 -8
- package/test/unit/data-structures/tree/tree.test.ts +2 -2
- package/test/unit/data-structures/trie/trie.test.ts +743 -13
- package/test/utils/big-o.js +212 -0
- package/test/utils/big-o.ts +201 -0
- package/test/utils/index.js +30 -0
- package/test/utils/index.ts +1 -1
- package/test/utils/number.js +14 -0
- package/tsconfig-base.json +27 -0
- package/tsconfig-cjs.json +9 -0
- package/tsup.config.js +18 -0
- package/umd/bundle.min.js +1 -1
- package/umd/bundle.min.js.LICENSE.txt +15 -0
- package/umd/bundle.min.js.map +1 -1
- package/dist/data-structures/binary-tree/aa-tree.d.ts +0 -2
- package/dist/data-structures/binary-tree/aa-tree.js +0 -7
- package/dist/data-structures/binary-tree/aa-tree.js.map +0 -1
- package/dist/data-structures/binary-tree/abstract-binary-tree.d.ts +0 -527
- package/dist/data-structures/binary-tree/abstract-binary-tree.js +0 -1199
- package/dist/data-structures/binary-tree/abstract-binary-tree.js.map +0 -1
- package/dist/data-structures/binary-tree/avl-tree.d.ts +0 -94
- package/dist/data-structures/binary-tree/avl-tree.js +0 -336
- package/dist/data-structures/binary-tree/avl-tree.js.map +0 -1
- package/dist/data-structures/binary-tree/b-tree.d.ts +0 -2
- package/dist/data-structures/binary-tree/b-tree.js +0 -7
- package/dist/data-structures/binary-tree/b-tree.js.map +0 -1
- package/dist/data-structures/binary-tree/binary-indexed-tree.d.ts +0 -46
- package/dist/data-structures/binary-tree/binary-indexed-tree.js +0 -74
- package/dist/data-structures/binary-tree/binary-indexed-tree.js.map +0 -1
- package/dist/data-structures/binary-tree/binary-tree.d.ts +0 -31
- package/dist/data-structures/binary-tree/binary-tree.js +0 -41
- package/dist/data-structures/binary-tree/binary-tree.js.map +0 -1
- package/dist/data-structures/binary-tree/bst.d.ts +0 -133
- package/dist/data-structures/binary-tree/bst.js +0 -554
- package/dist/data-structures/binary-tree/bst.js.map +0 -1
- package/dist/data-structures/binary-tree/index.d.ts +0 -12
- package/dist/data-structures/binary-tree/index.js +0 -29
- package/dist/data-structures/binary-tree/index.js.map +0 -1
- package/dist/data-structures/binary-tree/rb-tree.d.ts +0 -13
- package/dist/data-structures/binary-tree/rb-tree.js +0 -28
- package/dist/data-structures/binary-tree/rb-tree.js.map +0 -1
- package/dist/data-structures/binary-tree/segment-tree.d.ts +0 -83
- package/dist/data-structures/binary-tree/segment-tree.js +0 -229
- package/dist/data-structures/binary-tree/segment-tree.js.map +0 -1
- package/dist/data-structures/binary-tree/splay-tree.d.ts +0 -2
- package/dist/data-structures/binary-tree/splay-tree.js +0 -7
- package/dist/data-structures/binary-tree/splay-tree.js.map +0 -1
- package/dist/data-structures/binary-tree/tree-multiset.d.ts +0 -209
- package/dist/data-structures/binary-tree/tree-multiset.js +0 -669
- package/dist/data-structures/binary-tree/tree-multiset.js.map +0 -1
- package/dist/data-structures/binary-tree/two-three-tree.d.ts +0 -2
- package/dist/data-structures/binary-tree/two-three-tree.js +0 -7
- package/dist/data-structures/binary-tree/two-three-tree.js.map +0 -1
- package/dist/data-structures/graph/abstract-graph.d.ts +0 -332
- package/dist/data-structures/graph/abstract-graph.js +0 -925
- package/dist/data-structures/graph/abstract-graph.js.map +0 -1
- package/dist/data-structures/graph/directed-graph.d.ts +0 -200
- package/dist/data-structures/graph/directed-graph.js +0 -423
- package/dist/data-structures/graph/directed-graph.js.map +0 -1
- package/dist/data-structures/graph/index.js.map +0 -1
- package/dist/data-structures/graph/map-graph.d.ts +0 -79
- package/dist/data-structures/graph/map-graph.js +0 -112
- package/dist/data-structures/graph/map-graph.js.map +0 -1
- package/dist/data-structures/graph/undirected-graph.d.ts +0 -127
- package/dist/data-structures/graph/undirected-graph.js +0 -253
- package/dist/data-structures/graph/undirected-graph.js.map +0 -1
- package/dist/data-structures/hash/coordinate-map.d.ts +0 -45
- package/dist/data-structures/hash/coordinate-map.js +0 -66
- package/dist/data-structures/hash/coordinate-map.js.map +0 -1
- package/dist/data-structures/hash/coordinate-set.d.ts +0 -37
- package/dist/data-structures/hash/coordinate-set.js +0 -56
- package/dist/data-structures/hash/coordinate-set.js.map +0 -1
- package/dist/data-structures/hash/hash-map.d.ts +0 -56
- package/dist/data-structures/hash/hash-map.js +0 -172
- package/dist/data-structures/hash/hash-map.js.map +0 -1
- package/dist/data-structures/hash/hash-table.d.ts +0 -106
- package/dist/data-structures/hash/hash-table.js +0 -246
- package/dist/data-structures/hash/hash-table.js.map +0 -1
- package/dist/data-structures/hash/index.d.ts +0 -7
- package/dist/data-structures/hash/index.js +0 -24
- package/dist/data-structures/hash/index.js.map +0 -1
- package/dist/data-structures/hash/pair.d.ts +0 -2
- package/dist/data-structures/hash/pair.js +0 -7
- package/dist/data-structures/hash/pair.js.map +0 -1
- package/dist/data-structures/hash/tree-map.js.map +0 -1
- package/dist/data-structures/hash/tree-set.js.map +0 -1
- package/dist/data-structures/heap/heap.d.ts +0 -83
- package/dist/data-structures/heap/heap.js +0 -158
- package/dist/data-structures/heap/heap.js.map +0 -1
- package/dist/data-structures/heap/index.js.map +0 -1
- package/dist/data-structures/heap/max-heap.d.ts +0 -23
- package/dist/data-structures/heap/max-heap.js +0 -31
- package/dist/data-structures/heap/max-heap.js.map +0 -1
- package/dist/data-structures/heap/min-heap.d.ts +0 -24
- package/dist/data-structures/heap/min-heap.js +0 -32
- package/dist/data-structures/heap/min-heap.js.map +0 -1
- package/dist/data-structures/index.js.map +0 -1
- package/dist/data-structures/linked-list/doubly-linked-list.d.ts +0 -234
- package/dist/data-structures/linked-list/doubly-linked-list.js +0 -584
- package/dist/data-structures/linked-list/doubly-linked-list.js.map +0 -1
- package/dist/data-structures/linked-list/index.js.map +0 -1
- package/dist/data-structures/linked-list/singly-linked-list.d.ts +0 -157
- package/dist/data-structures/linked-list/singly-linked-list.js +0 -449
- package/dist/data-structures/linked-list/singly-linked-list.js.map +0 -1
- package/dist/data-structures/linked-list/skip-linked-list.d.ts +0 -61
- package/dist/data-structures/linked-list/skip-linked-list.js +0 -143
- package/dist/data-structures/linked-list/skip-linked-list.js.map +0 -1
- package/dist/data-structures/matrix/index.js.map +0 -1
- package/dist/data-structures/matrix/matrix.d.ts +0 -21
- package/dist/data-structures/matrix/matrix.js.map +0 -1
- package/dist/data-structures/matrix/matrix2d.d.ts +0 -108
- package/dist/data-structures/matrix/matrix2d.js +0 -201
- package/dist/data-structures/matrix/matrix2d.js.map +0 -1
- package/dist/data-structures/matrix/navigator.d.ts +0 -52
- package/dist/data-structures/matrix/navigator.js.map +0 -1
- package/dist/data-structures/matrix/vector2d.d.ts +0 -201
- package/dist/data-structures/matrix/vector2d.js +0 -292
- package/dist/data-structures/matrix/vector2d.js.map +0 -1
- package/dist/data-structures/priority-queue/index.js.map +0 -1
- package/dist/data-structures/priority-queue/max-priority-queue.d.ts +0 -15
- package/dist/data-structures/priority-queue/max-priority-queue.js +0 -44
- package/dist/data-structures/priority-queue/max-priority-queue.js.map +0 -1
- package/dist/data-structures/priority-queue/min-priority-queue.d.ts +0 -15
- package/dist/data-structures/priority-queue/min-priority-queue.js +0 -45
- package/dist/data-structures/priority-queue/min-priority-queue.js.map +0 -1
- package/dist/data-structures/priority-queue/priority-queue.d.ts +0 -180
- package/dist/data-structures/priority-queue/priority-queue.js +0 -322
- package/dist/data-structures/priority-queue/priority-queue.js.map +0 -1
- package/dist/data-structures/queue/deque.d.ts +0 -165
- package/dist/data-structures/queue/deque.js +0 -277
- package/dist/data-structures/queue/deque.js.map +0 -1
- package/dist/data-structures/queue/index.js.map +0 -1
- package/dist/data-structures/queue/queue.d.ts +0 -107
- package/dist/data-structures/queue/queue.js +0 -171
- package/dist/data-structures/queue/queue.js.map +0 -1
- package/dist/data-structures/stack/index.js.map +0 -1
- package/dist/data-structures/stack/stack.d.ts +0 -63
- package/dist/data-structures/stack/stack.js +0 -92
- package/dist/data-structures/stack/stack.js.map +0 -1
- package/dist/data-structures/tree/index.js.map +0 -1
- package/dist/data-structures/tree/tree.d.ts +0 -14
- package/dist/data-structures/tree/tree.js +0 -61
- package/dist/data-structures/tree/tree.js.map +0 -1
- package/dist/data-structures/trie/index.js.map +0 -1
- package/dist/data-structures/trie/trie.d.ts +0 -61
- package/dist/data-structures/trie/trie.js +0 -211
- package/dist/data-structures/trie/trie.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/interfaces/abstract-binary-tree.d.ts +0 -7
- package/dist/interfaces/abstract-binary-tree.js +0 -3
- package/dist/interfaces/abstract-binary-tree.js.map +0 -1
- package/dist/interfaces/abstract-graph.d.ts +0 -5
- package/dist/interfaces/abstract-graph.js.map +0 -1
- package/dist/interfaces/avl-tree.d.ts +0 -7
- package/dist/interfaces/avl-tree.js.map +0 -1
- package/dist/interfaces/binary-tree.d.ts +0 -6
- package/dist/interfaces/binary-tree.js.map +0 -1
- package/dist/interfaces/bst.d.ts +0 -6
- package/dist/interfaces/bst.js.map +0 -1
- package/dist/interfaces/directed-graph.d.ts +0 -3
- package/dist/interfaces/directed-graph.js +0 -3
- package/dist/interfaces/directed-graph.js.map +0 -1
- package/dist/interfaces/doubly-linked-list.js.map +0 -1
- package/dist/interfaces/heap.js.map +0 -1
- package/dist/interfaces/index.d.ts +0 -15
- package/dist/interfaces/index.js +0 -32
- package/dist/interfaces/index.js.map +0 -1
- package/dist/interfaces/navigator.js.map +0 -1
- package/dist/interfaces/priority-queue.js.map +0 -1
- package/dist/interfaces/rb-tree.d.ts +0 -6
- package/dist/interfaces/rb-tree.js +0 -3
- package/dist/interfaces/rb-tree.js.map +0 -1
- package/dist/interfaces/segment-tree.js.map +0 -1
- package/dist/interfaces/singly-linked-list.js.map +0 -1
- package/dist/interfaces/tree-multiset.d.ts +0 -6
- package/dist/interfaces/tree-multiset.js.map +0 -1
- package/dist/interfaces/undirected-graph.d.ts +0 -3
- package/dist/interfaces/undirected-graph.js.map +0 -1
- package/dist/types/data-structures/abstract-binary-tree.d.ts +0 -34
- package/dist/types/data-structures/abstract-binary-tree.js +0 -25
- package/dist/types/data-structures/abstract-binary-tree.js.map +0 -1
- package/dist/types/data-structures/abstract-graph.d.ts +0 -11
- package/dist/types/data-structures/abstract-graph.js +0 -3
- package/dist/types/data-structures/abstract-graph.js.map +0 -1
- package/dist/types/data-structures/avl-tree.d.ts +0 -4
- package/dist/types/data-structures/avl-tree.js +0 -3
- package/dist/types/data-structures/avl-tree.js.map +0 -1
- package/dist/types/data-structures/binary-tree.d.ts +0 -4
- package/dist/types/data-structures/binary-tree.js +0 -3
- package/dist/types/data-structures/binary-tree.js.map +0 -1
- package/dist/types/data-structures/bst.d.ts +0 -13
- package/dist/types/data-structures/bst.js +0 -10
- package/dist/types/data-structures/bst.js.map +0 -1
- package/dist/types/data-structures/directed-graph.js.map +0 -1
- package/dist/types/data-structures/doubly-linked-list.js.map +0 -1
- package/dist/types/data-structures/hash.js +0 -3
- package/dist/types/data-structures/hash.js.map +0 -1
- package/dist/types/data-structures/heap.d.ts +0 -3
- package/dist/types/data-structures/heap.js.map +0 -1
- package/dist/types/data-structures/index.d.ts +0 -16
- package/dist/types/data-structures/index.js +0 -33
- package/dist/types/data-structures/index.js.map +0 -1
- package/dist/types/data-structures/map-graph.js.map +0 -1
- package/dist/types/data-structures/navigator.js.map +0 -1
- package/dist/types/data-structures/priority-queue.d.ts +0 -7
- package/dist/types/data-structures/priority-queue.js.map +0 -1
- package/dist/types/data-structures/rb-tree.d.ts +0 -8
- package/dist/types/data-structures/rb-tree.js.map +0 -1
- package/dist/types/data-structures/segment-tree.js.map +0 -1
- package/dist/types/data-structures/singly-linked-list.js.map +0 -1
- package/dist/types/data-structures/tree-multiset.d.ts +0 -4
- package/dist/types/data-structures/tree-multiset.js +0 -3
- package/dist/types/data-structures/tree-multiset.js.map +0 -1
- package/dist/types/helpers.js +0 -3
- package/dist/types/helpers.js.map +0 -1
- package/dist/types/index.js.map +0 -1
- package/dist/types/utils/index.js.map +0 -1
- package/dist/types/utils/utils.js.map +0 -1
- package/dist/types/utils/validate-type.js.map +0 -1
- package/dist/utils/index.js.map +0 -1
- package/dist/utils/utils.d.ts +0 -19
- package/dist/utils/utils.js +0 -67
- package/dist/utils/utils.js.map +0 -1
- package/lib/data-structures/binary-tree/aa-tree.d.ts +0 -2
- package/lib/data-structures/binary-tree/aa-tree.js +0 -2
- package/lib/data-structures/binary-tree/abstract-binary-tree.d.ts +0 -527
- package/lib/data-structures/binary-tree/abstract-binary-tree.js +0 -1193
- package/lib/data-structures/binary-tree/avl-tree.d.ts +0 -94
- package/lib/data-structures/binary-tree/avl-tree.js +0 -330
- package/lib/data-structures/binary-tree/b-tree.d.ts +0 -2
- package/lib/data-structures/binary-tree/b-tree.js +0 -2
- package/lib/data-structures/binary-tree/binary-indexed-tree.d.ts +0 -46
- package/lib/data-structures/binary-tree/binary-indexed-tree.js +0 -69
- package/lib/data-structures/binary-tree/binary-tree.d.ts +0 -31
- package/lib/data-structures/binary-tree/binary-tree.js +0 -35
- package/lib/data-structures/binary-tree/bst.d.ts +0 -133
- package/lib/data-structures/binary-tree/bst.js +0 -548
- package/lib/data-structures/binary-tree/index.d.ts +0 -12
- package/lib/data-structures/binary-tree/index.js +0 -12
- package/lib/data-structures/binary-tree/rb-tree.d.ts +0 -13
- package/lib/data-structures/binary-tree/rb-tree.js +0 -22
- package/lib/data-structures/binary-tree/segment-tree.d.ts +0 -83
- package/lib/data-structures/binary-tree/segment-tree.js +0 -223
- package/lib/data-structures/binary-tree/splay-tree.d.ts +0 -2
- package/lib/data-structures/binary-tree/splay-tree.js +0 -2
- package/lib/data-structures/binary-tree/tree-multiset.d.ts +0 -209
- package/lib/data-structures/binary-tree/tree-multiset.js +0 -663
- package/lib/data-structures/binary-tree/two-three-tree.d.ts +0 -2
- package/lib/data-structures/binary-tree/two-three-tree.js +0 -2
- package/lib/data-structures/graph/abstract-graph.d.ts +0 -332
- package/lib/data-structures/graph/abstract-graph.js +0 -918
- package/lib/data-structures/graph/directed-graph.d.ts +0 -200
- package/lib/data-structures/graph/directed-graph.js +0 -416
- package/lib/data-structures/graph/index.js +0 -4
- package/lib/data-structures/graph/map-graph.d.ts +0 -79
- package/lib/data-structures/graph/map-graph.js +0 -105
- package/lib/data-structures/graph/undirected-graph.d.ts +0 -127
- package/lib/data-structures/graph/undirected-graph.js +0 -246
- package/lib/data-structures/hash/coordinate-map.d.ts +0 -45
- package/lib/data-structures/hash/coordinate-map.js +0 -61
- package/lib/data-structures/hash/coordinate-set.d.ts +0 -37
- package/lib/data-structures/hash/coordinate-set.js +0 -51
- package/lib/data-structures/hash/hash-map.d.ts +0 -56
- package/lib/data-structures/hash/hash-map.js +0 -167
- package/lib/data-structures/hash/hash-table.d.ts +0 -106
- package/lib/data-structures/hash/hash-table.js +0 -240
- package/lib/data-structures/hash/index.d.ts +0 -7
- package/lib/data-structures/hash/index.js +0 -7
- package/lib/data-structures/hash/pair.d.ts +0 -2
- package/lib/data-structures/hash/pair.js +0 -2
- package/lib/data-structures/hash/tree-map.js +0 -2
- package/lib/data-structures/hash/tree-set.js +0 -2
- package/lib/data-structures/heap/heap.d.ts +0 -83
- package/lib/data-structures/heap/heap.js +0 -152
- package/lib/data-structures/heap/index.js +0 -3
- package/lib/data-structures/heap/max-heap.d.ts +0 -23
- package/lib/data-structures/heap/max-heap.js +0 -26
- package/lib/data-structures/heap/min-heap.d.ts +0 -24
- package/lib/data-structures/heap/min-heap.js +0 -27
- package/lib/data-structures/index.js +0 -11
- package/lib/data-structures/linked-list/doubly-linked-list.d.ts +0 -234
- package/lib/data-structures/linked-list/doubly-linked-list.js +0 -578
- package/lib/data-structures/linked-list/index.js +0 -3
- package/lib/data-structures/linked-list/singly-linked-list.d.ts +0 -157
- package/lib/data-structures/linked-list/singly-linked-list.js +0 -443
- package/lib/data-structures/linked-list/skip-linked-list.d.ts +0 -61
- package/lib/data-structures/linked-list/skip-linked-list.js +0 -137
- package/lib/data-structures/matrix/index.js +0 -4
- package/lib/data-structures/matrix/matrix.d.ts +0 -21
- package/lib/data-structures/matrix/matrix.js +0 -24
- package/lib/data-structures/matrix/matrix2d.d.ts +0 -108
- package/lib/data-structures/matrix/matrix2d.js +0 -196
- package/lib/data-structures/matrix/navigator.d.ts +0 -52
- package/lib/data-structures/matrix/navigator.js +0 -101
- package/lib/data-structures/matrix/vector2d.d.ts +0 -201
- package/lib/data-structures/matrix/vector2d.js +0 -287
- package/lib/data-structures/priority-queue/max-priority-queue.d.ts +0 -15
- package/lib/data-structures/priority-queue/max-priority-queue.js +0 -39
- package/lib/data-structures/priority-queue/min-priority-queue.d.ts +0 -15
- package/lib/data-structures/priority-queue/min-priority-queue.js +0 -40
- package/lib/data-structures/priority-queue/priority-queue.d.ts +0 -180
- package/lib/data-structures/priority-queue/priority-queue.js +0 -317
- package/lib/data-structures/queue/deque.d.ts +0 -165
- package/lib/data-structures/queue/deque.js +0 -270
- package/lib/data-structures/queue/queue.d.ts +0 -107
- package/lib/data-structures/queue/queue.js +0 -165
- package/lib/data-structures/stack/stack.d.ts +0 -63
- package/lib/data-structures/stack/stack.js +0 -87
- package/lib/data-structures/tree/tree.d.ts +0 -14
- package/lib/data-structures/tree/tree.js +0 -56
- package/lib/data-structures/trie/trie.d.ts +0 -61
- package/lib/data-structures/trie/trie.js +0 -205
- package/lib/index.js +0 -4
- package/lib/interfaces/abstract-binary-tree.d.ts +0 -7
- package/lib/interfaces/abstract-graph.d.ts +0 -5
- package/lib/interfaces/avl-tree.d.ts +0 -7
- package/lib/interfaces/binary-tree.d.ts +0 -6
- package/lib/interfaces/bst.d.ts +0 -6
- package/lib/interfaces/directed-graph.d.ts +0 -3
- package/lib/interfaces/index.d.ts +0 -15
- package/lib/interfaces/index.js +0 -15
- package/lib/interfaces/rb-tree.d.ts +0 -6
- package/lib/interfaces/tree-multiset.d.ts +0 -6
- package/lib/interfaces/undirected-graph.d.ts +0 -3
- package/lib/types/data-structures/abstract-binary-tree.d.ts +0 -34
- package/lib/types/data-structures/abstract-binary-tree.js +0 -21
- package/lib/types/data-structures/abstract-graph.d.ts +0 -11
- package/lib/types/data-structures/avl-tree.d.ts +0 -4
- package/lib/types/data-structures/binary-tree.d.ts +0 -4
- package/lib/types/data-structures/bst.d.ts +0 -13
- package/lib/types/data-structures/bst.js +0 -6
- package/lib/types/data-structures/directed-graph.js +0 -6
- package/lib/types/data-structures/heap.d.ts +0 -3
- package/lib/types/data-structures/index.d.ts +0 -16
- package/lib/types/data-structures/index.js +0 -16
- package/lib/types/data-structures/priority-queue.d.ts +0 -7
- package/lib/types/data-structures/rb-tree.d.ts +0 -8
- package/lib/types/data-structures/rb-tree.js +0 -5
- package/lib/types/data-structures/tree-multiset.d.ts +0 -4
- package/lib/types/index.js +0 -3
- package/lib/types/utils/index.js +0 -2
- package/lib/utils/utils.d.ts +0 -19
- package/lib/utils/utils.js +0 -57
- package/scripts/rename_clear_files.sh +0 -29
- package/src/data-structures/binary-tree/aa-tree.ts +0 -1
- package/src/data-structures/binary-tree/abstract-binary-tree.ts +0 -1556
- package/src/data-structures/binary-tree/b-tree.ts +0 -1
- package/src/data-structures/binary-tree/splay-tree.ts +0 -1
- package/src/data-structures/binary-tree/two-three-tree.ts +0 -1
- package/src/data-structures/hash/pair.ts +0 -1
- package/src/interfaces/abstract-binary-tree.ts +0 -8
- package/src/interfaces/abstract-graph.ts +0 -7
- package/src/interfaces/avl-tree.ts +0 -8
- package/src/interfaces/bst.ts +0 -6
- package/src/interfaces/directed-graph.ts +0 -3
- package/src/interfaces/rb-tree.ts +0 -6
- package/src/interfaces/tree-multiset.ts +0 -7
- package/src/interfaces/undirected-graph.ts +0 -3
- package/src/types/data-structures/abstract-binary-tree.ts +0 -49
- package/src/types/data-structures/abstract-graph.ts +0 -11
- package/src/types/data-structures/avl-tree.ts +0 -5
- package/src/types/data-structures/binary-tree.ts +0 -5
- package/src/types/data-structures/bst.ts +0 -13
- package/src/types/data-structures/heap.ts +0 -5
- package/src/types/data-structures/navigator.ts +0 -13
- package/src/types/data-structures/priority-queue.ts +0 -9
- package/src/types/data-structures/rb-tree.ts +0 -8
- package/src/types/data-structures/tree-multiset.ts +0 -6
- package/test/utils/magnitude.ts +0 -21
- /package/dist/{data-structures → cjs/data-structures}/graph/index.d.ts +0 -0
- /package/dist/{data-structures → cjs/data-structures}/graph/index.js +0 -0
- /package/dist/{data-structures → cjs/data-structures}/hash/tree-map.d.ts +0 -0
- /package/dist/{data-structures → cjs/data-structures}/hash/tree-map.js +0 -0
- /package/dist/{data-structures → cjs/data-structures}/hash/tree-set.d.ts +0 -0
- /package/dist/{data-structures → cjs/data-structures}/hash/tree-set.js +0 -0
- /package/dist/{data-structures → cjs/data-structures}/heap/index.d.ts +0 -0
- /package/dist/{data-structures → cjs/data-structures}/heap/index.js +0 -0
- /package/dist/{data-structures → cjs/data-structures}/index.d.ts +0 -0
- /package/dist/{data-structures → cjs/data-structures}/index.js +0 -0
- /package/dist/{data-structures → cjs/data-structures}/linked-list/index.d.ts +0 -0
- /package/dist/{data-structures → cjs/data-structures}/linked-list/index.js +0 -0
- /package/dist/{data-structures → cjs/data-structures}/matrix/index.d.ts +0 -0
- /package/dist/{data-structures → cjs/data-structures}/matrix/index.js +0 -0
- /package/dist/{data-structures → cjs/data-structures}/matrix/matrix.js +0 -0
- /package/dist/{data-structures → cjs/data-structures}/matrix/navigator.js +0 -0
- /package/dist/{data-structures → cjs/data-structures}/priority-queue/index.d.ts +0 -0
- /package/dist/{data-structures → cjs/data-structures}/priority-queue/index.js +0 -0
- /package/dist/{data-structures → cjs/data-structures}/queue/index.d.ts +0 -0
- /package/dist/{data-structures → cjs/data-structures}/queue/index.js +0 -0
- /package/dist/{data-structures → cjs/data-structures}/stack/index.d.ts +0 -0
- /package/dist/{data-structures → cjs/data-structures}/stack/index.js +0 -0
- /package/dist/{data-structures → cjs/data-structures}/tree/index.d.ts +0 -0
- /package/dist/{data-structures → cjs/data-structures}/tree/index.js +0 -0
- /package/dist/{data-structures → cjs/data-structures}/trie/index.d.ts +0 -0
- /package/dist/{data-structures → cjs/data-structures}/trie/index.js +0 -0
- /package/dist/{index.d.ts → cjs/index.d.ts} +0 -0
- /package/dist/{index.js → cjs/index.js} +0 -0
- /package/dist/{interfaces → cjs/interfaces}/binary-tree.js +0 -0
- /package/dist/{interfaces → cjs/interfaces}/doubly-linked-list.d.ts +0 -0
- /package/dist/{interfaces → cjs/interfaces}/doubly-linked-list.js +0 -0
- /package/dist/{interfaces → cjs/interfaces}/heap.d.ts +0 -0
- /package/dist/{interfaces → cjs/interfaces}/heap.js +0 -0
- /package/dist/{interfaces → cjs/interfaces}/navigator.d.ts +0 -0
- /package/dist/{interfaces → cjs/interfaces}/navigator.js +0 -0
- /package/dist/{interfaces → cjs/interfaces}/priority-queue.d.ts +0 -0
- /package/dist/{interfaces → cjs/interfaces}/priority-queue.js +0 -0
- /package/dist/{interfaces → cjs/interfaces}/segment-tree.d.ts +0 -0
- /package/dist/{interfaces → cjs/interfaces}/segment-tree.js +0 -0
- /package/dist/{interfaces → cjs/interfaces}/singly-linked-list.d.ts +0 -0
- /package/dist/{interfaces → cjs/interfaces}/singly-linked-list.js +0 -0
- /package/dist/{interfaces → cjs/types/data-structures/binary-tree}/avl-tree.js +0 -0
- /package/dist/{types/data-structures/doubly-linked-list.d.ts → cjs/types/data-structures/binary-tree/binary-indexed-tree.d.ts} +0 -0
- /package/dist/{interfaces → cjs/types/data-structures/binary-tree}/bst.js +0 -0
- /package/dist/{types/data-structures → cjs/types/data-structures/binary-tree}/rb-tree.js +0 -0
- /package/dist/{types/data-structures → cjs/types/data-structures/binary-tree}/segment-tree.d.ts +0 -0
- /package/dist/{types/data-structures → cjs/types/data-structures/binary-tree}/segment-tree.js +0 -0
- /package/dist/{interfaces → cjs/types/data-structures/binary-tree}/tree-multiset.js +0 -0
- /package/dist/{interfaces → cjs/types/data-structures/graph}/abstract-graph.js +0 -0
- /package/dist/{types/data-structures → cjs/types/data-structures/graph}/directed-graph.d.ts +0 -0
- /package/dist/{types/data-structures → cjs/types/data-structures/graph}/directed-graph.js +0 -0
- /package/dist/{types/data-structures → cjs/types/data-structures/graph}/map-graph.d.ts +0 -0
- /package/dist/{types/data-structures → cjs/types/data-structures/graph}/map-graph.js +0 -0
- /package/dist/{types/data-structures/singly-linked-list.d.ts → cjs/types/data-structures/graph/undirected-graph.d.ts} +0 -0
- /package/dist/{interfaces → cjs/types/data-structures/graph}/undirected-graph.js +0 -0
- /package/dist/{types/helpers.d.ts → cjs/types/data-structures/hash/coordinate-map.d.ts} +0 -0
- /package/{lib/interfaces/abstract-binary-tree.js → dist/cjs/types/data-structures/hash/coordinate-set.d.ts} +0 -0
- /package/{lib/interfaces/abstract-graph.js → dist/cjs/types/data-structures/hash/hash-map.d.ts} +0 -0
- /package/{lib/interfaces/avl-tree.js → dist/cjs/types/data-structures/hash/hash-table.d.ts} +0 -0
- /package/dist/{types/data-structures/hash.d.ts → cjs/types/data-structures/hash/index.d.ts} +0 -0
- /package/{lib/interfaces/binary-tree.js → dist/cjs/types/data-structures/hash/tree-map.d.ts} +0 -0
- /package/{lib/interfaces/bst.js → dist/cjs/types/data-structures/hash/tree-set.d.ts} +0 -0
- /package/{lib/interfaces → dist/cjs/types/data-structures/heap}/heap.d.ts +0 -0
- /package/dist/{types/data-structures → cjs/types/data-structures/heap}/heap.js +0 -0
- /package/{lib/interfaces/directed-graph.js → dist/cjs/types/data-structures/heap/max-heap.d.ts} +0 -0
- /package/{lib/interfaces/doubly-linked-list.d.ts → dist/cjs/types/data-structures/heap/min-heap.d.ts} +0 -0
- /package/{lib/types/data-structures → dist/cjs/types/data-structures/linked-list}/doubly-linked-list.d.ts +0 -0
- /package/dist/{types/data-structures → cjs/types/data-structures/linked-list}/doubly-linked-list.js +0 -0
- /package/{lib/interfaces → dist/cjs/types/data-structures/linked-list}/singly-linked-list.d.ts +0 -0
- /package/dist/{types/data-structures → cjs/types/data-structures/linked-list}/singly-linked-list.js +0 -0
- /package/{lib/interfaces/doubly-linked-list.js → dist/cjs/types/data-structures/linked-list/skip-linked-list.d.ts} +0 -0
- /package/{lib/interfaces/heap.js → dist/cjs/types/data-structures/matrix/matrix.d.ts} +0 -0
- /package/{lib/interfaces/navigator.d.ts → dist/cjs/types/data-structures/matrix/matrix2d.d.ts} +0 -0
- /package/dist/{types/data-structures → cjs/types/data-structures/matrix}/navigator.d.ts +0 -0
- /package/dist/{types/data-structures → cjs/types/data-structures/matrix}/navigator.js +0 -0
- /package/{lib/interfaces/navigator.js → dist/cjs/types/data-structures/matrix/vector2d.d.ts} +0 -0
- /package/{lib → dist/cjs/types}/data-structures/priority-queue/index.d.ts +0 -0
- /package/{lib/interfaces/priority-queue.d.ts → dist/cjs/types/data-structures/priority-queue/max-priority-queue.d.ts} +0 -0
- /package/{lib/interfaces/priority-queue.js → dist/cjs/types/data-structures/priority-queue/min-priority-queue.d.ts} +0 -0
- /package/{lib/interfaces/rb-tree.js → dist/cjs/types/data-structures/priority-queue/priority-queue.d.ts} +0 -0
- /package/dist/{types/data-structures → cjs/types/data-structures/priority-queue}/priority-queue.js +0 -0
- /package/{lib/interfaces/segment-tree.d.ts → dist/cjs/types/data-structures/queue/deque.d.ts} +0 -0
- /package/{lib → dist/cjs/types}/data-structures/queue/index.d.ts +0 -0
- /package/{lib/interfaces/segment-tree.js → dist/cjs/types/data-structures/queue/queue.d.ts} +0 -0
- /package/{lib → dist/cjs/types}/data-structures/stack/index.d.ts +0 -0
- /package/{lib/interfaces/singly-linked-list.js → dist/cjs/types/data-structures/stack/stack.d.ts} +0 -0
- /package/{lib → dist/cjs/types}/data-structures/tree/index.d.ts +0 -0
- /package/{lib/interfaces/tree-multiset.js → dist/cjs/types/data-structures/tree/tree.d.ts} +0 -0
- /package/{lib → dist/cjs/types}/data-structures/trie/index.d.ts +0 -0
- /package/{lib/interfaces/undirected-graph.js → dist/cjs/types/data-structures/trie/trie.d.ts} +0 -0
- /package/dist/{types → cjs/types}/index.d.ts +0 -0
- /package/dist/{types → cjs/types}/index.js +0 -0
- /package/dist/{types → cjs/types}/utils/index.d.ts +0 -0
- /package/dist/{types → cjs/types}/utils/index.js +0 -0
- /package/dist/{types → cjs/types}/utils/utils.d.ts +0 -0
- /package/dist/{types → cjs/types}/utils/utils.js +0 -0
- /package/dist/{types → cjs/types}/utils/validate-type.d.ts +0 -0
- /package/dist/{types → cjs/types}/utils/validate-type.js +0 -0
- /package/dist/{utils → cjs/utils}/index.d.ts +0 -0
- /package/dist/{utils → cjs/utils}/index.js +0 -0
- /package/{lib → dist/mjs}/data-structures/graph/index.d.ts +0 -0
- /package/{lib → dist/mjs}/data-structures/hash/tree-map.d.ts +0 -0
- /package/{lib → dist/mjs}/data-structures/hash/tree-set.d.ts +0 -0
- /package/{lib → dist/mjs}/data-structures/heap/index.d.ts +0 -0
- /package/{lib → dist/mjs}/data-structures/index.d.ts +0 -0
- /package/{lib → dist/mjs}/data-structures/linked-list/index.d.ts +0 -0
- /package/{lib → dist/mjs}/data-structures/matrix/index.d.ts +0 -0
- /package/{lib/data-structures/priority-queue/index.js → dist/mjs/data-structures/priority-queue/index.d.ts} +0 -0
- /package/{lib/data-structures/queue/index.js → dist/mjs/data-structures/queue/index.d.ts} +0 -0
- /package/{lib/data-structures/stack/index.js → dist/mjs/data-structures/stack/index.d.ts} +0 -0
- /package/{lib/data-structures/tree/index.js → dist/mjs/data-structures/tree/index.d.ts} +0 -0
- /package/{lib/data-structures/trie/index.js → dist/mjs/data-structures/trie/index.d.ts} +0 -0
- /package/{lib → dist/mjs}/index.d.ts +0 -0
- /package/{lib/types/data-structures/abstract-graph.js → dist/mjs/interfaces/doubly-linked-list.d.ts} +0 -0
- /package/{lib/types/data-structures/avl-tree.js → dist/mjs/interfaces/heap.d.ts} +0 -0
- /package/{lib/types/data-structures/binary-tree.js → dist/mjs/interfaces/navigator.d.ts} +0 -0
- /package/{lib/types/data-structures/doubly-linked-list.js → dist/mjs/interfaces/priority-queue.d.ts} +0 -0
- /package/{lib/types/data-structures/hash.js → dist/mjs/interfaces/segment-tree.d.ts} +0 -0
- /package/{lib/types/data-structures → dist/mjs/interfaces}/singly-linked-list.d.ts +0 -0
- /package/{lib/types/data-structures/heap.js → dist/mjs/types/data-structures/binary-tree/binary-indexed-tree.d.ts} +0 -0
- /package/{lib/types/data-structures → dist/mjs/types/data-structures/binary-tree}/segment-tree.d.ts +0 -0
- /package/{lib/types/data-structures → dist/mjs/types/data-structures/graph}/directed-graph.d.ts +0 -0
- /package/{lib/types/data-structures → dist/mjs/types/data-structures/graph}/map-graph.d.ts +0 -0
- /package/{lib/types/data-structures/map-graph.js → dist/mjs/types/data-structures/graph/undirected-graph.d.ts} +0 -0
- /package/{lib/types/data-structures/navigator.js → dist/mjs/types/data-structures/hash/coordinate-map.d.ts} +0 -0
- /package/{lib/types/data-structures/priority-queue.js → dist/mjs/types/data-structures/hash/coordinate-set.d.ts} +0 -0
- /package/{lib/types/data-structures/segment-tree.js → dist/mjs/types/data-structures/hash/hash-map.d.ts} +0 -0
- /package/{lib/types/data-structures/singly-linked-list.js → dist/mjs/types/data-structures/hash/hash-table.d.ts} +0 -0
- /package/{lib/types/data-structures/hash.d.ts → dist/mjs/types/data-structures/hash/index.d.ts} +0 -0
- /package/{lib/types/data-structures/tree-multiset.js → dist/mjs/types/data-structures/hash/tree-map.d.ts} +0 -0
- /package/{lib/types/helpers.d.ts → dist/mjs/types/data-structures/hash/tree-set.d.ts} +0 -0
- /package/{lib/types/helpers.js → dist/mjs/types/data-structures/heap/heap.d.ts} +0 -0
- /package/{lib/types/utils/utils.js → dist/mjs/types/data-structures/heap/max-heap.d.ts} +0 -0
- /package/{lib/types/utils/validate-type.js → dist/mjs/types/data-structures/heap/min-heap.d.ts} +0 -0
- /package/{src/types/data-structures/doubly-linked-list.ts → dist/mjs/types/data-structures/linked-list/doubly-linked-list.d.ts} +0 -0
- /package/{src/types/data-structures/singly-linked-list.ts → dist/mjs/types/data-structures/linked-list/singly-linked-list.d.ts} +0 -0
- /package/{lib/types/data-structures → dist/mjs/types/data-structures/matrix}/navigator.d.ts +0 -0
- /package/{lib → dist/mjs}/types/index.d.ts +0 -0
- /package/{lib → dist/mjs}/types/utils/index.d.ts +0 -0
- /package/{lib → dist/mjs}/types/utils/utils.d.ts +0 -0
- /package/{lib → dist/mjs}/types/utils/validate-type.d.ts +0 -0
- /package/{lib → dist/mjs}/utils/index.d.ts +0 -0
- /package/src/types/data-structures/{segment-tree.ts → binary-tree/segment-tree.ts} +0 -0
- /package/src/types/data-structures/{directed-graph.ts → graph/directed-graph.ts} +0 -0
- /package/src/types/data-structures/{map-graph.ts → graph/map-graph.ts} +0 -0
- /package/src/types/data-structures/{hash.ts → hash/index.ts} +0 -0
- /package/{lib/utils/index.js → test/types/index.ts} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"abstract-binary-tree.js","sourceRoot":"","sources":["../../../src/data-structures/binary-tree/abstract-binary-tree.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,uCAAuC;AAWvC,uCAAgF;AAGhF,MAAsB,sBAAsB;IAK1C;;;;;;OAMG;IACH,YAAsB,GAAsB,EAAE,GAAO;QACnD,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACjB,CAAC;IAQD,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED,IAAI,IAAI,CAAC,CAA8B;QACrC,IAAI,CAAC,EAAE;YACL,CAAC,CAAC,MAAM,GAAG,IAA2B,CAAC;SACxC;QACD,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;IACjB,CAAC;IAID,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED,IAAI,KAAK,CAAC,CAA8B;QACtC,IAAI,CAAC,EAAE;YACL,CAAC,CAAC,MAAM,GAAG,IAA2B,CAAC;SACxC;QACD,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;IAClB,CAAC;IAID;;;OAGG;IACH,IAAI,cAAc;QAChB,MAAM,IAAI,GAAG,IAA2B,CAAC;QACzC,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,IAAI,EAAE;gBAC7B,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,EAAE;oBAC3B,OAAO,sBAAc,CAAC,SAAS,CAAC;iBACjC;qBAAM;oBACL,OAAO,sBAAc,CAAC,IAAI,CAAC;iBAC5B;aACF;iBAAM,I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C,IAAI,CAAC,GAAG,CAAC,CAAC;gBAC/B,MAAM;YACR,KAAK,MAAM;gBACT,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBAC5B,MAAM;YACR;gBACE,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBAC/B,MAAM;SACT;IACH,CAAC;IAED;;;OAGG;IAEH;;;;;;OAMG;IACO,wBAAwB,CAChC,qBAAyC,KAAK;QAE9C,QAAQ,kBAAkB,EAAE;YAC1B,KAAK,KAAK;gBACR,OAAO,IAAI,CAAC,UAAU,CAAC;YACzB,KAAK,KAAK;gBACR,OAAO,IAAI,CAAC,UAAU,CAAC;YACzB,KAAK,MAAM;gBACT,OAAO,IAAI,CAAC,WAAW,CAAC;YAC1B;gBACE,OAAO,IAAI,CAAC,UAAU,CAAC;SAC1B;IACH,CAAC;CAGF;AA56CD,gDA46CC"}
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* data-structure-typed
|
|
3
|
-
*
|
|
4
|
-
* @author Tyler Zeng
|
|
5
|
-
* @copyright Copyright (c) 2022 Tyler Zeng <zrwusa@gmail.com>
|
|
6
|
-
* @license MIT License
|
|
7
|
-
*/
|
|
8
|
-
import { BST, BSTNode } from './bst';
|
|
9
|
-
import type { AVLTreeNodeNested, AVLTreeOptions, BinaryTreeDeletedResult, BinaryTreeNodeKey } from '../../types';
|
|
10
|
-
import { IAVLTree, IAVLTreeNode } from '../../interfaces';
|
|
11
|
-
export declare class AVLTreeNode<V = any, NEIGHBOR extends AVLTreeNode<V, NEIGHBOR> = AVLTreeNodeNested<V>> extends BSTNode<V, NEIGHBOR> implements IAVLTreeNode<V, NEIGHBOR> {
|
|
12
|
-
height: number;
|
|
13
|
-
constructor(key: BinaryTreeNodeKey, val?: V);
|
|
14
|
-
}
|
|
15
|
-
export declare class AVLTree<N extends AVLTreeNode<N['val'], N> = AVLTreeNode> extends BST<N> implements IAVLTree<N> {
|
|
16
|
-
/**
|
|
17
|
-
* This is a constructor function for an AVL tree data structure in TypeScript.
|
|
18
|
-
* @param {AVLTreeOptions} [options] - The `options` parameter is an optional object that can be passed to the
|
|
19
|
-
* constructor of the AVLTree class. It allows you to customize the behavior of the AVL tree by providing different
|
|
20
|
-
* options.
|
|
21
|
-
*/
|
|
22
|
-
constructor(options?: AVLTreeOptions);
|
|
23
|
-
/**
|
|
24
|
-
* The `swapLocation` function swaps the location of two nodes in a binary tree.
|
|
25
|
-
* @param {N} srcNode - The source node that you want to swap with the destination node.
|
|
26
|
-
* @param {N} destNode - The `destNode` parameter represents the destination node where the values from `srcNode` will
|
|
27
|
-
* be swapped to.
|
|
28
|
-
* @returns The `destNode` is being returned.
|
|
29
|
-
*/
|
|
30
|
-
swapLocation(srcNode: N, destNode: N): N;
|
|
31
|
-
/**
|
|
32
|
-
* The function creates a new AVL tree node with the given key and value.
|
|
33
|
-
* @param {BinaryTreeNodeKey} key - The `key` parameter is the identifier for the binary tree node. It is used to uniquely
|
|
34
|
-
* identify each node in the tree.
|
|
35
|
-
* @param [val] - The `val` parameter is an optional value that can be assigned to the node. It represents the value
|
|
36
|
-
* that will be stored in the node.
|
|
37
|
-
* @returns a new AVLTreeNode object with the specified key and value.
|
|
38
|
-
*/
|
|
39
|
-
createNode(key: BinaryTreeNodeKey, val?: N['val']): N;
|
|
40
|
-
/**
|
|
41
|
-
* The function overrides the add method of a binary tree node and balances the tree after inserting a new node.
|
|
42
|
-
* @param {BinaryTreeNodeKey} key - The `key` parameter is the identifier of the binary tree node that we want to add.
|
|
43
|
-
* @param [val] - The `val` parameter is an optional value that can be assigned to the node being added. It is of type
|
|
44
|
-
* `N['val']`, which means it should be of the same type as the `val` property of the nodes in the binary tree.
|
|
45
|
-
* @returns The method is returning the inserted node, or null or undefined if the insertion was not successful.
|
|
46
|
-
*/
|
|
47
|
-
add(key: BinaryTreeNodeKey, val?: N['val']): N | null | undefined;
|
|
48
|
-
/**
|
|
49
|
-
* The function overrides the remove method of a binary tree and performs additional operations to balance the tree after
|
|
50
|
-
* deletion.
|
|
51
|
-
* @param {BinaryTreeNodeKey} key - The `key` parameter represents the identifier of the binary tree node that needs to be
|
|
52
|
-
* removed.
|
|
53
|
-
* @returns The method is returning an array of `BinaryTreeDeletedResult<N>` objects.
|
|
54
|
-
*/
|
|
55
|
-
remove(key: BinaryTreeNodeKey): BinaryTreeDeletedResult<N>[];
|
|
56
|
-
/**
|
|
57
|
-
* The balance factor of a given AVL tree node is calculated by subtracting the height of its left subtree from the
|
|
58
|
-
* height of its right subtree.
|
|
59
|
-
* @param node - The parameter "node" is of type N, which represents a node in an AVL tree.
|
|
60
|
-
* @returns The balance factor of the given AVL tree node.
|
|
61
|
-
*/
|
|
62
|
-
protected _balanceFactor(node: N): number;
|
|
63
|
-
/**
|
|
64
|
-
* The function updates the height of a node in an AVL tree based on the heights of its left and right subtrees.
|
|
65
|
-
* @param node - The parameter `node` is an AVLTreeNode object, which represents a node in an AVL tree.
|
|
66
|
-
*/
|
|
67
|
-
protected _updateHeight(node: N): void;
|
|
68
|
-
/**
|
|
69
|
-
* The `_balancePath` function balances the AVL tree by performing appropriate rotations based on the balance factor of
|
|
70
|
-
* each node in the path from the given node to the root.
|
|
71
|
-
* @param node - The `node` parameter is an AVLTreeNode object, which represents a node in an AVL tree.
|
|
72
|
-
*/
|
|
73
|
-
protected _balancePath(node: N): void;
|
|
74
|
-
/**
|
|
75
|
-
* The `_balanceLL` function performs a left-left rotation on an AVL tree to balance it.
|
|
76
|
-
* @param A - The parameter A is an AVLTreeNode object.
|
|
77
|
-
*/
|
|
78
|
-
protected _balanceLL(A: N): void;
|
|
79
|
-
/**
|
|
80
|
-
* The `_balanceLR` function performs a left-right rotation to balance an AVL tree.
|
|
81
|
-
* @param A - A is an AVLTreeNode object.
|
|
82
|
-
*/
|
|
83
|
-
protected _balanceLR(A: N): void;
|
|
84
|
-
/**
|
|
85
|
-
* The `_balanceRR` function performs a right-right rotation on an AVL tree to balance it.
|
|
86
|
-
* @param A - The parameter A is an AVLTreeNode object.
|
|
87
|
-
*/
|
|
88
|
-
protected _balanceRR(A: N): void;
|
|
89
|
-
/**
|
|
90
|
-
* The `_balanceRL` function performs a right-left rotation to balance an AVL tree.
|
|
91
|
-
* @param A - A is an AVLTreeNode object.
|
|
92
|
-
*/
|
|
93
|
-
protected _balanceRL(A: N): void;
|
|
94
|
-
}
|
|
@@ -1,336 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AVLTree = exports.AVLTreeNode = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* data-structure-typed
|
|
6
|
-
*
|
|
7
|
-
* @author Tyler Zeng
|
|
8
|
-
* @copyright Copyright (c) 2022 Tyler Zeng <zrwusa@gmail.com>
|
|
9
|
-
* @license MIT License
|
|
10
|
-
*/
|
|
11
|
-
const bst_1 = require("./bst");
|
|
12
|
-
class AVLTreeNode extends bst_1.BSTNode {
|
|
13
|
-
constructor(key, val) {
|
|
14
|
-
super(key, val);
|
|
15
|
-
this.height = 0;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
exports.AVLTreeNode = AVLTreeNode;
|
|
19
|
-
class AVLTree extends bst_1.BST {
|
|
20
|
-
/**
|
|
21
|
-
* This is a constructor function for an AVL tree data structure in TypeScript.
|
|
22
|
-
* @param {AVLTreeOptions} [options] - The `options` parameter is an optional object that can be passed to the
|
|
23
|
-
* constructor of the AVLTree class. It allows you to customize the behavior of the AVL tree by providing different
|
|
24
|
-
* options.
|
|
25
|
-
*/
|
|
26
|
-
constructor(options) {
|
|
27
|
-
super(options);
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* The `swapLocation` function swaps the location of two nodes in a binary tree.
|
|
31
|
-
* @param {N} srcNode - The source node that you want to swap with the destination node.
|
|
32
|
-
* @param {N} destNode - The `destNode` parameter represents the destination node where the values from `srcNode` will
|
|
33
|
-
* be swapped to.
|
|
34
|
-
* @returns The `destNode` is being returned.
|
|
35
|
-
*/
|
|
36
|
-
swapLocation(srcNode, destNode) {
|
|
37
|
-
const { key, val, height } = destNode;
|
|
38
|
-
const tempNode = this.createNode(key, val);
|
|
39
|
-
if (tempNode) {
|
|
40
|
-
tempNode.height = height;
|
|
41
|
-
destNode.key = srcNode.key;
|
|
42
|
-
destNode.val = srcNode.val;
|
|
43
|
-
destNode.height = srcNode.height;
|
|
44
|
-
srcNode.key = tempNode.key;
|
|
45
|
-
srcNode.val = tempNode.val;
|
|
46
|
-
srcNode.height = tempNode.height;
|
|
47
|
-
}
|
|
48
|
-
return destNode;
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* The function creates a new AVL tree node with the given key and value.
|
|
52
|
-
* @param {BinaryTreeNodeKey} key - The `key` parameter is the identifier for the binary tree node. It is used to uniquely
|
|
53
|
-
* identify each node in the tree.
|
|
54
|
-
* @param [val] - The `val` parameter is an optional value that can be assigned to the node. It represents the value
|
|
55
|
-
* that will be stored in the node.
|
|
56
|
-
* @returns a new AVLTreeNode object with the specified key and value.
|
|
57
|
-
*/
|
|
58
|
-
createNode(key, val) {
|
|
59
|
-
return new AVLTreeNode(key, val);
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* The function overrides the add method of a binary tree node and balances the tree after inserting a new node.
|
|
63
|
-
* @param {BinaryTreeNodeKey} key - The `key` parameter is the identifier of the binary tree node that we want to add.
|
|
64
|
-
* @param [val] - The `val` parameter is an optional value that can be assigned to the node being added. It is of type
|
|
65
|
-
* `N['val']`, which means it should be of the same type as the `val` property of the nodes in the binary tree.
|
|
66
|
-
* @returns The method is returning the inserted node, or null or undefined if the insertion was not successful.
|
|
67
|
-
*/
|
|
68
|
-
add(key, val) {
|
|
69
|
-
// TODO support node as a param
|
|
70
|
-
const inserted = super.add(key, val);
|
|
71
|
-
if (inserted)
|
|
72
|
-
this._balancePath(inserted);
|
|
73
|
-
return inserted;
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* The function overrides the remove method of a binary tree and performs additional operations to balance the tree after
|
|
77
|
-
* deletion.
|
|
78
|
-
* @param {BinaryTreeNodeKey} key - The `key` parameter represents the identifier of the binary tree node that needs to be
|
|
79
|
-
* removed.
|
|
80
|
-
* @returns The method is returning an array of `BinaryTreeDeletedResult<N>` objects.
|
|
81
|
-
*/
|
|
82
|
-
remove(key) {
|
|
83
|
-
const deletedResults = super.remove(key);
|
|
84
|
-
for (const { needBalanced } of deletedResults) {
|
|
85
|
-
if (needBalanced) {
|
|
86
|
-
this._balancePath(needBalanced);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
return deletedResults;
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* The balance factor of a given AVL tree node is calculated by subtracting the height of its left subtree from the
|
|
93
|
-
* height of its right subtree.
|
|
94
|
-
* @param node - The parameter "node" is of type N, which represents a node in an AVL tree.
|
|
95
|
-
* @returns The balance factor of the given AVL tree node.
|
|
96
|
-
*/
|
|
97
|
-
_balanceFactor(node) {
|
|
98
|
-
if (!node.right)
|
|
99
|
-
// node has no right subtree
|
|
100
|
-
return -node.height;
|
|
101
|
-
else if (!node.left)
|
|
102
|
-
// node has no left subtree
|
|
103
|
-
return +node.height;
|
|
104
|
-
else
|
|
105
|
-
return node.right.height - node.left.height;
|
|
106
|
-
}
|
|
107
|
-
/**
|
|
108
|
-
* The function updates the height of a node in an AVL tree based on the heights of its left and right subtrees.
|
|
109
|
-
* @param node - The parameter `node` is an AVLTreeNode object, which represents a node in an AVL tree.
|
|
110
|
-
*/
|
|
111
|
-
_updateHeight(node) {
|
|
112
|
-
if (!node.left && !node.right)
|
|
113
|
-
node.height = 0;
|
|
114
|
-
else if (!node.left) {
|
|
115
|
-
const rightHeight = node.right ? node.right.height : 0;
|
|
116
|
-
node.height = 1 + rightHeight;
|
|
117
|
-
}
|
|
118
|
-
else if (!node.right)
|
|
119
|
-
node.height = 1 + node.left.height;
|
|
120
|
-
else
|
|
121
|
-
node.height = 1 + Math.max(node.right.height, node.left.height);
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* The `_balancePath` function balances the AVL tree by performing appropriate rotations based on the balance factor of
|
|
125
|
-
* each node in the path from the given node to the root.
|
|
126
|
-
* @param node - The `node` parameter is an AVLTreeNode object, which represents a node in an AVL tree.
|
|
127
|
-
*/
|
|
128
|
-
_balancePath(node) {
|
|
129
|
-
const path = this.getPathToRoot(node, false); // first O(log n) + O(log n)
|
|
130
|
-
for (let i = 0; i < path.length; i++) {
|
|
131
|
-
// second O(log n)
|
|
132
|
-
const A = path[i];
|
|
133
|
-
// Update Heights: After inserting a node, backtrack from the insertion point to the root node, updating the height of each node along the way.
|
|
134
|
-
this._updateHeight(A); // first O(1)
|
|
135
|
-
// Check Balance: Simultaneously with height updates, check if each node violates the balance property of an AVL tree.
|
|
136
|
-
// Balance Restoration: If a balance issue is discovered after inserting a node, it requires balance restoration operations. Balance restoration includes four basic cases where rotation operations need to be performed to fix the balance:
|
|
137
|
-
switch (this._balanceFactor(A) // second O(1)
|
|
138
|
-
) {
|
|
139
|
-
case -2:
|
|
140
|
-
if (A && A.left) {
|
|
141
|
-
if (this._balanceFactor(A.left) <= 0) {
|
|
142
|
-
// second O(1)
|
|
143
|
-
// Left Rotation (LL Rotation): When the inserted node is in the left subtree of the left subtree, causing an imbalance.
|
|
144
|
-
this._balanceLL(A);
|
|
145
|
-
}
|
|
146
|
-
else {
|
|
147
|
-
// Left-Right Rotation (LR Rotation): When the inserted node is in the right subtree of the left subtree, causing an imbalance.
|
|
148
|
-
this._balanceLR(A);
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
break;
|
|
152
|
-
case +2:
|
|
153
|
-
if (A && A.right) {
|
|
154
|
-
if (this._balanceFactor(A.right) >= 0) {
|
|
155
|
-
// Right Rotation (RR Rotation): When the inserted node is in the right subtree of the right subtree, causing an imbalance.
|
|
156
|
-
this._balanceRR(A);
|
|
157
|
-
}
|
|
158
|
-
else {
|
|
159
|
-
// Right-Left Rotation (RL Rotation): When the inserted node is in the left subtree of the right subtree, causing an imbalance.
|
|
160
|
-
this._balanceRL(A);
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
// TODO So far, no sure if this is necessary that Recursive Repair: Once rotation operations are executed, it may cause imbalance issues at higher levels of the tree. Therefore, you need to recursively check and repair imbalance problems upwards until you reach the root node.
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
/**
|
|
168
|
-
* The `_balanceLL` function performs a left-left rotation on an AVL tree to balance it.
|
|
169
|
-
* @param A - The parameter A is an AVLTreeNode object.
|
|
170
|
-
*/
|
|
171
|
-
_balanceLL(A) {
|
|
172
|
-
const parentOfA = A.parent;
|
|
173
|
-
const B = A.left;
|
|
174
|
-
A.parent = B;
|
|
175
|
-
if (B && B.right) {
|
|
176
|
-
B.right.parent = A;
|
|
177
|
-
}
|
|
178
|
-
if (B)
|
|
179
|
-
B.parent = parentOfA;
|
|
180
|
-
if (A === this.root) {
|
|
181
|
-
if (B)
|
|
182
|
-
this._setRoot(B);
|
|
183
|
-
}
|
|
184
|
-
else {
|
|
185
|
-
if ((parentOfA === null || parentOfA === void 0 ? void 0 : parentOfA.left) === A) {
|
|
186
|
-
parentOfA.left = B;
|
|
187
|
-
}
|
|
188
|
-
else {
|
|
189
|
-
if (parentOfA)
|
|
190
|
-
parentOfA.right = B;
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
if (B) {
|
|
194
|
-
A.left = B.right;
|
|
195
|
-
B.right = A;
|
|
196
|
-
}
|
|
197
|
-
this._updateHeight(A);
|
|
198
|
-
if (B)
|
|
199
|
-
this._updateHeight(B);
|
|
200
|
-
}
|
|
201
|
-
/**
|
|
202
|
-
* The `_balanceLR` function performs a left-right rotation to balance an AVL tree.
|
|
203
|
-
* @param A - A is an AVLTreeNode object.
|
|
204
|
-
*/
|
|
205
|
-
_balanceLR(A) {
|
|
206
|
-
const parentOfA = A.parent;
|
|
207
|
-
const B = A.left;
|
|
208
|
-
let C = null;
|
|
209
|
-
if (B) {
|
|
210
|
-
C = B.right;
|
|
211
|
-
}
|
|
212
|
-
if (A)
|
|
213
|
-
A.parent = C;
|
|
214
|
-
if (B)
|
|
215
|
-
B.parent = C;
|
|
216
|
-
if (C) {
|
|
217
|
-
if (C.left) {
|
|
218
|
-
C.left.parent = B;
|
|
219
|
-
}
|
|
220
|
-
if (C.right) {
|
|
221
|
-
C.right.parent = A;
|
|
222
|
-
}
|
|
223
|
-
C.parent = parentOfA;
|
|
224
|
-
}
|
|
225
|
-
if (A === this.root) {
|
|
226
|
-
if (C)
|
|
227
|
-
this._setRoot(C);
|
|
228
|
-
}
|
|
229
|
-
else {
|
|
230
|
-
if (parentOfA) {
|
|
231
|
-
if (parentOfA.left === A) {
|
|
232
|
-
parentOfA.left = C;
|
|
233
|
-
}
|
|
234
|
-
else {
|
|
235
|
-
parentOfA.right = C;
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
if (C) {
|
|
240
|
-
A.left = C.right;
|
|
241
|
-
if (B)
|
|
242
|
-
B.right = C.left;
|
|
243
|
-
C.left = B;
|
|
244
|
-
C.right = A;
|
|
245
|
-
}
|
|
246
|
-
this._updateHeight(A);
|
|
247
|
-
B && this._updateHeight(B);
|
|
248
|
-
C && this._updateHeight(C);
|
|
249
|
-
}
|
|
250
|
-
/**
|
|
251
|
-
* The `_balanceRR` function performs a right-right rotation on an AVL tree to balance it.
|
|
252
|
-
* @param A - The parameter A is an AVLTreeNode object.
|
|
253
|
-
*/
|
|
254
|
-
_balanceRR(A) {
|
|
255
|
-
const parentOfA = A.parent;
|
|
256
|
-
const B = A.right;
|
|
257
|
-
A.parent = B;
|
|
258
|
-
if (B) {
|
|
259
|
-
if (B.left) {
|
|
260
|
-
B.left.parent = A;
|
|
261
|
-
}
|
|
262
|
-
B.parent = parentOfA;
|
|
263
|
-
}
|
|
264
|
-
if (A === this.root) {
|
|
265
|
-
if (B)
|
|
266
|
-
this._setRoot(B);
|
|
267
|
-
}
|
|
268
|
-
else {
|
|
269
|
-
if (parentOfA) {
|
|
270
|
-
if (parentOfA.left === A) {
|
|
271
|
-
parentOfA.left = B;
|
|
272
|
-
}
|
|
273
|
-
else {
|
|
274
|
-
parentOfA.right = B;
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
if (B) {
|
|
279
|
-
A.right = B.left;
|
|
280
|
-
B.left = A;
|
|
281
|
-
}
|
|
282
|
-
this._updateHeight(A);
|
|
283
|
-
B && this._updateHeight(B);
|
|
284
|
-
}
|
|
285
|
-
/**
|
|
286
|
-
* The `_balanceRL` function performs a right-left rotation to balance an AVL tree.
|
|
287
|
-
* @param A - A is an AVLTreeNode object.
|
|
288
|
-
*/
|
|
289
|
-
_balanceRL(A) {
|
|
290
|
-
const parentOfA = A.parent;
|
|
291
|
-
const B = A.right;
|
|
292
|
-
let C = null;
|
|
293
|
-
if (B) {
|
|
294
|
-
C = B.left;
|
|
295
|
-
}
|
|
296
|
-
A.parent = C;
|
|
297
|
-
if (B)
|
|
298
|
-
B.parent = C;
|
|
299
|
-
if (C) {
|
|
300
|
-
if (C.left) {
|
|
301
|
-
C.left.parent = A;
|
|
302
|
-
}
|
|
303
|
-
if (C.right) {
|
|
304
|
-
C.right.parent = B;
|
|
305
|
-
}
|
|
306
|
-
C.parent = parentOfA;
|
|
307
|
-
}
|
|
308
|
-
if (A === this.root) {
|
|
309
|
-
if (C)
|
|
310
|
-
this._setRoot(C);
|
|
311
|
-
}
|
|
312
|
-
else {
|
|
313
|
-
if (parentOfA) {
|
|
314
|
-
if (parentOfA.left === A) {
|
|
315
|
-
parentOfA.left = C;
|
|
316
|
-
}
|
|
317
|
-
else {
|
|
318
|
-
parentOfA.right = C;
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
if (C)
|
|
323
|
-
A.right = C.left;
|
|
324
|
-
if (B && C)
|
|
325
|
-
B.left = C.right;
|
|
326
|
-
if (C)
|
|
327
|
-
C.left = A;
|
|
328
|
-
if (C)
|
|
329
|
-
C.right = B;
|
|
330
|
-
this._updateHeight(A);
|
|
331
|
-
B && this._updateHeight(B);
|
|
332
|
-
C && this._updateHeight(C);
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
exports.AVLTree = AVLTree;
|
|
336
|
-
//# sourceMappingURL=avl-tree.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"avl-tree.js","sourceRoot":"","sources":["../../../src/data-structures/binary-tree/avl-tree.ts"],"names":[],"mappings":";;;AAAA;;;;;;GAMG;AACH,+BAAmC;AAInC,MAAa,WACX,SAAQ,aAAoB;IAK5B,YAAY,GAAsB,EAAE,GAAO;QACzC,KAAK,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QAChB,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;IAClB,CAAC;CACF;AAVD,kCAUC;AAED,MAAa,OAA0D,SAAQ,SAAM;IACnF;;;;;OAKG;IACH,YAAY,OAAwB;QAClC,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;IAED;;;;;;OAMG;IACM,YAAY,CAAC,OAAU,EAAE,QAAW;QAC3C,MAAM,EAAC,GAAG,EAAE,GAAG,EAAE,MAAM,EAAC,GAAG,QAAQ,CAAC;QACpC,MAAM,QAAQ,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QAE3C,IAAI,QAAQ,EAAE;YACZ,QAAQ,CAAC,MAAM,GAAG,MAAM,CAAC;YAEzB,QAAQ,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;YAC3B,QAAQ,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;YAC3B,QAAQ,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;YAEjC,OAAO,CAAC,GAAG,GAAG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,IAAI,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;QAC3B,CAAC,IAAI,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;IAC7B,CAAC;CACF;AAxTD,0BAwTC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"b-tree.js","sourceRoot":"","sources":["../../../src/data-structures/binary-tree/b-tree.ts"],"names":[],"mappings":";;;AAAA,MAAa,KAAK;CAAG;AAArB,sBAAqB"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* data-structure-typed
|
|
3
|
-
*
|
|
4
|
-
* @author Tyler Zeng
|
|
5
|
-
* @copyright Copyright (c) 2022 Tyler Zeng <zrwusa@gmail.com>
|
|
6
|
-
* @license MIT License
|
|
7
|
-
*/
|
|
8
|
-
export declare class BinaryIndexedTree {
|
|
9
|
-
/**
|
|
10
|
-
* The constructor initializes an array with a specified length and fills it with zeros.
|
|
11
|
-
* @param {number} n - The parameter `n` represents the size of the array that will be used to store the sum tree. The
|
|
12
|
-
* sum tree is a binary tree data structure used to efficiently calculate the sum of a range of elements in an array.
|
|
13
|
-
* The size of the sum tree array is `n + 1` because
|
|
14
|
-
*/
|
|
15
|
-
constructor(n: number);
|
|
16
|
-
private _sumTree;
|
|
17
|
-
get sumTree(): number[];
|
|
18
|
-
static lowBit(x: number): number;
|
|
19
|
-
/**
|
|
20
|
-
* The update function updates the values in a binary indexed tree by adding a delta value to the specified index and
|
|
21
|
-
* its ancestors.
|
|
22
|
-
* @param {number} i - The parameter `i` represents the index of the element in the `_sumTree` array that needs to be
|
|
23
|
-
* updated.
|
|
24
|
-
* @param {number} delta - The "delta" parameter represents the change in value that needs to be added to the element
|
|
25
|
-
* at index "i" in the "_sumTree" array.
|
|
26
|
-
*/
|
|
27
|
-
update(i: number, delta: number): void;
|
|
28
|
-
/**
|
|
29
|
-
* The function calculates the prefix sum of an array using a binary indexed tree.
|
|
30
|
-
* @param {number} i - The parameter "i" in the function "getPrefixSum" represents the index of the element in the
|
|
31
|
-
* array for which we want to calculate the prefix sum.
|
|
32
|
-
* @returns The function `getPrefixSum` returns the prefix sum of the elements in the binary indexed tree up to index
|
|
33
|
-
* `i`.
|
|
34
|
-
*/
|
|
35
|
-
getPrefixSum(i: number): number;
|
|
36
|
-
/**
|
|
37
|
-
* The function `getRangeSum` calculates the sum of a range of numbers in an array.
|
|
38
|
-
* @param {number} start - The start parameter is the starting index of the range for which we want to calculate the
|
|
39
|
-
* sum.
|
|
40
|
-
* @param {number} end - The "end" parameter represents the ending index of the range for which we want to calculate
|
|
41
|
-
* the sum.
|
|
42
|
-
* @returns the sum of the elements in the range specified by the start and end indices.
|
|
43
|
-
*/
|
|
44
|
-
getRangeSum(start: number, end: number): number;
|
|
45
|
-
protected _setSumTree(value: number[]): void;
|
|
46
|
-
}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BinaryIndexedTree = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* data-structure-typed
|
|
6
|
-
*
|
|
7
|
-
* @author Tyler Zeng
|
|
8
|
-
* @copyright Copyright (c) 2022 Tyler Zeng <zrwusa@gmail.com>
|
|
9
|
-
* @license MIT License
|
|
10
|
-
*/
|
|
11
|
-
class BinaryIndexedTree {
|
|
12
|
-
/**
|
|
13
|
-
* The constructor initializes an array with a specified length and fills it with zeros.
|
|
14
|
-
* @param {number} n - The parameter `n` represents the size of the array that will be used to store the sum tree. The
|
|
15
|
-
* sum tree is a binary tree data structure used to efficiently calculate the sum of a range of elements in an array.
|
|
16
|
-
* The size of the sum tree array is `n + 1` because
|
|
17
|
-
*/
|
|
18
|
-
constructor(n) {
|
|
19
|
-
this._sumTree = new Array(n + 1).fill(0);
|
|
20
|
-
}
|
|
21
|
-
get sumTree() {
|
|
22
|
-
return this._sumTree;
|
|
23
|
-
}
|
|
24
|
-
static lowBit(x) {
|
|
25
|
-
return x & -x;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* The update function updates the values in a binary indexed tree by adding a delta value to the specified index and
|
|
29
|
-
* its ancestors.
|
|
30
|
-
* @param {number} i - The parameter `i` represents the index of the element in the `_sumTree` array that needs to be
|
|
31
|
-
* updated.
|
|
32
|
-
* @param {number} delta - The "delta" parameter represents the change in value that needs to be added to the element
|
|
33
|
-
* at index "i" in the "_sumTree" array.
|
|
34
|
-
*/
|
|
35
|
-
update(i, delta) {
|
|
36
|
-
while (i < this._sumTree.length) {
|
|
37
|
-
this._sumTree[i] += delta;
|
|
38
|
-
i += BinaryIndexedTree.lowBit(i);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* The function calculates the prefix sum of an array using a binary indexed tree.
|
|
43
|
-
* @param {number} i - The parameter "i" in the function "getPrefixSum" represents the index of the element in the
|
|
44
|
-
* array for which we want to calculate the prefix sum.
|
|
45
|
-
* @returns The function `getPrefixSum` returns the prefix sum of the elements in the binary indexed tree up to index
|
|
46
|
-
* `i`.
|
|
47
|
-
*/
|
|
48
|
-
getPrefixSum(i) {
|
|
49
|
-
let sum = 0;
|
|
50
|
-
while (i > 0) {
|
|
51
|
-
sum += this._sumTree[i];
|
|
52
|
-
i -= BinaryIndexedTree.lowBit(i);
|
|
53
|
-
}
|
|
54
|
-
return sum;
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* The function `getRangeSum` calculates the sum of a range of numbers in an array.
|
|
58
|
-
* @param {number} start - The start parameter is the starting index of the range for which we want to calculate the
|
|
59
|
-
* sum.
|
|
60
|
-
* @param {number} end - The "end" parameter represents the ending index of the range for which we want to calculate
|
|
61
|
-
* the sum.
|
|
62
|
-
* @returns the sum of the elements in the range specified by the start and end indices.
|
|
63
|
-
*/
|
|
64
|
-
getRangeSum(start, end) {
|
|
65
|
-
if (!(0 <= start && start <= end && end <= this._sumTree.length))
|
|
66
|
-
throw 'Index out of bounds';
|
|
67
|
-
return this.getPrefixSum(end) - this.getPrefixSum(start);
|
|
68
|
-
}
|
|
69
|
-
_setSumTree(value) {
|
|
70
|
-
this._sumTree = value;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
exports.BinaryIndexedTree = BinaryIndexedTree;
|
|
74
|
-
//# sourceMappingURL=binary-indexed-tree.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"binary-indexed-tree.js","sourceRoot":"","sources":["../../../src/data-structures/binary-tree/binary-indexed-tree.ts"],"names":[],"mappings":";;;AAAA;;;;;;GAMG;AACH,MAAa,iBAAiB;IAC5B;;;;;OAKG;IACH,YAAY,CAAS;QACnB,IAAI,CAAC,QAAQ,GAAG,IAAI,KAAK,CAAS,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACnD,CAAC;IAID,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED,MAAM,CAAC,MAAM,CAAC,CAAS;QACrB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;IAChB,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,CAAS,EAAE,KAAa;QAC7B,OAAO,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE;YAC/B,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC;YAC1B,CAAC,IAAI,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;SAClC;IACH,CAAC;IAED;;;;;;OAMG;IACH,YAAY,CAAC,CAAS;QACpB,IAAI,GAAG,GAAG,CAAC,CAAC;QACZ,OAAO,CAAC,GAAG,CAAC,EAAE;YACZ,GAAG,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;YACxB,CAAC,IAAI,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;SAClC;QACD,OAAO,GAAG,CAAC;IACb,C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