data-structure-typed 1.38.1 → 1.38.2
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/dist/cjs/data-structures/binary-tree/avl-tree.js.map +1 -0
- package/dist/cjs/data-structures/binary-tree/binary-indexed-tree.js.map +1 -0
- package/dist/cjs/data-structures/binary-tree/binary-tree.js.map +1 -0
- package/dist/cjs/data-structures/binary-tree/bst.js.map +1 -0
- package/dist/cjs/data-structures/binary-tree/index.js.map +1 -0
- package/dist/cjs/data-structures/binary-tree/rb-tree.js.map +1 -0
- package/dist/cjs/data-structures/binary-tree/segment-tree.js.map +1 -0
- package/dist/cjs/data-structures/binary-tree/tree-multiset.js.map +1 -0
- package/dist/cjs/data-structures/graph/abstract-graph.js.map +1 -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.js.map +1 -0
- package/dist/cjs/data-structures/graph/undirected-graph.js.map +1 -0
- package/dist/cjs/data-structures/hash/coordinate-map.js.map +1 -0
- package/dist/cjs/data-structures/hash/coordinate-set.js.map +1 -0
- package/dist/cjs/data-structures/hash/hash-map.js.map +1 -0
- package/dist/cjs/data-structures/hash/hash-table.js.map +1 -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.js.map +1 -0
- package/dist/cjs/data-structures/heap/index.js.map +1 -0
- package/dist/cjs/data-structures/heap/max-heap.js.map +1 -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.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.js.map +1 -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.js.map +1 -0
- package/{lib → dist/cjs}/data-structures/matrix/matrix2d.js +13 -5
- package/dist/cjs/data-structures/matrix/matrix2d.js.map +1 -0
- package/dist/cjs/data-structures/matrix/navigator.js.map +1 -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.js.map +1 -0
- package/dist/cjs/data-structures/priority-queue/min-priority-queue.js.map +1 -0
- package/dist/cjs/data-structures/priority-queue/priority-queue.js.map +1 -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.js.map +1 -0
- package/dist/cjs/data-structures/stack/index.js.map +1 -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.js.map +1 -0
- package/dist/cjs/data-structures/trie/index.js.map +1 -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.js.map +1 -0
- package/dist/cjs/interfaces/doubly-linked-list.js.map +1 -0
- package/dist/{interfaces → cjs/interfaces}/graph.js.map +1 -1
- package/dist/{interfaces → cjs/interfaces}/heap.js.map +1 -1
- package/dist/cjs/interfaces/index.js.map +1 -0
- package/dist/{interfaces → cjs/interfaces}/navigator.js.map +1 -1
- 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.js.map +1 -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.js.map +1 -0
- package/dist/cjs/types/data-structures/binary-tree/bst.js.map +1 -0
- package/dist/cjs/types/data-structures/binary-tree/index.js.map +1 -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.js.map +1 -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.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.map +1 -0
- package/dist/cjs/types/data-structures/hash/coordinate-set.js.map +1 -0
- package/dist/cjs/types/data-structures/hash/hash-map.js.map +1 -0
- package/dist/cjs/types/data-structures/hash/hash-table.js.map +1 -0
- package/dist/cjs/types/data-structures/hash/index.js.map +1 -0
- package/dist/cjs/types/data-structures/hash/tree-map.js.map +1 -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.js.map +1 -0
- package/dist/cjs/types/data-structures/heap/max-heap.js.map +1 -0
- package/dist/cjs/types/data-structures/heap/min-heap.js.map +1 -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.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.map +1 -0
- package/dist/cjs/types/data-structures/matrix/index.js.map +1 -0
- package/dist/cjs/types/data-structures/matrix/matrix.js.map +1 -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.map +1 -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.map +1 -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.map +1 -0
- package/dist/cjs/types/data-structures/queue/index.js.map +1 -0
- package/dist/cjs/types/data-structures/queue/queue.js.map +1 -0
- package/dist/cjs/types/data-structures/stack/index.js.map +1 -0
- package/dist/cjs/types/data-structures/stack/stack.js.map +1 -0
- package/dist/cjs/types/data-structures/tree/index.js.map +1 -0
- package/dist/cjs/types/data-structures/tree/tree.js.map +1 -0
- package/dist/cjs/types/data-structures/trie/index.js.map +1 -0
- package/dist/cjs/types/data-structures/trie/trie.js.map +1 -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/{types → cjs/types}/utils/utils.js.map +1 -1
- 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.js.map +1 -0
- package/{lib → dist/mjs}/data-structures/binary-tree/avl-tree.js +10 -4
- package/{lib → dist/mjs}/data-structures/binary-tree/binary-indexed-tree.js +12 -3
- package/{lib → dist/mjs}/data-structures/binary-tree/binary-tree.js +66 -49
- package/{lib → dist/mjs}/data-structures/binary-tree/bst.js +42 -40
- package/dist/mjs/data-structures/binary-tree/index.js +23 -0
- package/dist/mjs/data-structures/binary-tree/rb-tree.js +28 -0
- package/{lib → dist/mjs}/data-structures/binary-tree/segment-tree.js +17 -10
- package/{lib → dist/mjs}/data-structures/binary-tree/tree-multiset.js +19 -13
- package/{lib → dist/mjs}/data-structures/graph/abstract-graph.js +29 -24
- package/{lib → dist/mjs}/data-structures/graph/directed-graph.js +22 -14
- package/dist/mjs/data-structures/graph/index.js +20 -0
- package/{lib → dist/mjs}/data-structures/graph/map-graph.js +14 -5
- package/{lib → dist/mjs}/data-structures/graph/undirected-graph.js +19 -13
- package/{lib → dist/mjs}/data-structures/hash/coordinate-map.js +6 -2
- package/{lib → dist/mjs}/data-structures/hash/coordinate-set.js +6 -2
- package/{lib → dist/mjs}/data-structures/hash/hash-map.js +11 -1
- package/{lib → dist/mjs}/data-structures/hash/hash-table.js +16 -4
- 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/{lib → dist/mjs}/data-structures/heap/heap.js +23 -7
- package/dist/mjs/data-structures/heap/index.js +19 -0
- package/{lib → dist/mjs}/data-structures/heap/max-heap.js +6 -2
- package/{lib → dist/mjs}/data-structures/heap/min-heap.js +6 -2
- package/dist/mjs/data-structures/index.js +27 -0
- package/{lib → dist/mjs}/data-structures/linked-list/doubly-linked-list.js +15 -6
- package/dist/mjs/data-structures/linked-list/index.js +19 -0
- package/{lib → dist/mjs}/data-structures/linked-list/singly-linked-list.js +12 -2
- package/{lib → dist/mjs}/data-structures/linked-list/skip-linked-list.js +14 -2
- package/dist/mjs/data-structures/matrix/index.js +20 -0
- package/{lib → dist/mjs}/data-structures/matrix/matrix.js +6 -1
- package/dist/{data-structures → mjs/data-structures}/matrix/matrix2d.js +5 -2
- package/{lib → dist/mjs}/data-structures/matrix/navigator.js +14 -2
- package/{lib → dist/mjs}/data-structures/matrix/vector2d.js +9 -2
- package/dist/mjs/data-structures/priority-queue/index.js +19 -0
- package/{lib → dist/mjs}/data-structures/priority-queue/max-priority-queue.js +6 -2
- package/{lib → dist/mjs}/data-structures/priority-queue/min-priority-queue.js +6 -2
- package/dist/mjs/data-structures/priority-queue/priority-queue.js +17 -0
- package/{lib → dist/mjs}/data-structures/queue/deque.js +21 -22
- package/dist/mjs/data-structures/queue/index.js +18 -0
- package/{lib → dist/mjs}/data-structures/queue/queue.js +11 -5
- package/dist/mjs/data-structures/stack/index.js +17 -0
- package/{lib → dist/mjs}/data-structures/stack/stack.js +6 -1
- package/dist/mjs/data-structures/tree/index.js +17 -0
- package/{lib → dist/mjs}/data-structures/tree/tree.js +8 -1
- package/dist/mjs/data-structures/trie/index.js +17 -0
- package/{lib → dist/mjs}/data-structures/trie/trie.js +12 -2
- package/dist/mjs/index.js +20 -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.js +2 -0
- package/dist/mjs/interfaces/heap.js +2 -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.js +2 -0
- package/dist/mjs/types/data-structures/binary-tree/binary-indexed-tree.js +2 -0
- package/{lib → dist/mjs}/types/data-structures/binary-tree/binary-tree.js +7 -4
- package/dist/mjs/types/data-structures/binary-tree/bst.js +2 -0
- package/dist/mjs/types/data-structures/binary-tree/index.js +22 -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.js +2 -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.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.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.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.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.js +2 -0
- package/dist/mjs/types/data-structures/matrix/index.js +17 -0
- package/dist/mjs/types/data-structures/matrix/matrix.js +2 -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.js +2 -0
- package/dist/mjs/types/data-structures/priority-queue/index.js +19 -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.js +2 -0
- package/dist/mjs/types/data-structures/priority-queue/priority-queue.js +2 -0
- package/dist/mjs/types/data-structures/queue/deque.js +2 -0
- package/dist/mjs/types/data-structures/queue/index.js +18 -0
- package/dist/mjs/types/data-structures/queue/queue.js +2 -0
- package/dist/mjs/types/data-structures/stack/index.js +17 -0
- package/dist/mjs/types/data-structures/stack/stack.js +2 -0
- package/dist/mjs/types/data-structures/tree/index.js +17 -0
- package/dist/mjs/types/data-structures/tree/tree.js +2 -0
- package/dist/mjs/types/data-structures/trie/index.js +17 -0
- package/dist/mjs/types/data-structures/trie/trie.js +2 -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.js +64 -0
- package/dist/umd/index.global.js +27 -0
- package/dist/umd/index.global.js.map +1 -0
- package/package.json +21 -23
- package/src/data-structures/binary-tree/avl-tree.ts +1 -1
- package/src/data-structures/binary-tree/binary-indexed-tree.ts +1 -1
- package/src/data-structures/binary-tree/binary-tree.ts +2 -2
- package/src/data-structures/binary-tree/tree-multiset.ts +1 -2
- package/src/data-structures/graph/abstract-graph.ts +10 -11
- package/src/data-structures/graph/directed-graph.ts +1 -2
- package/src/data-structures/graph/undirected-graph.ts +4 -5
- package/src/data-structures/hash/hash-map.ts +1 -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/linked-list/singly-linked-list.ts +1 -1
- package/src/data-structures/matrix/matrix.ts +1 -1
- package/src/data-structures/matrix/vector2d.ts +2 -1
- package/src/data-structures/queue/deque.ts +5 -4
- package/src/data-structures/queue/queue.ts +1 -1
- package/src/types/data-structures/matrix/navigator.ts +1 -1
- package/src/types/utils/utils.ts +1 -1
- package/src/types/utils/validate-type.ts +2 -2
- package/test/integration/bst.test.ts +1 -1
- package/test/integration/index.html +1 -2
- package/test/unit/data-structures/binary-tree/avl-tree.test.ts +1 -1
- package/test/unit/data-structures/binary-tree/binary-index-tree.test.ts +2 -1
- package/test/unit/data-structures/binary-tree/bst.test.ts +3 -3
- package/test/unit/data-structures/binary-tree/overall.test.ts +1 -1
- package/test/unit/data-structures/binary-tree/tree-multiset.test.ts +1 -1
- package/test/unit/data-structures/hash/hash-table.test.ts +1 -1
- package/test/unit/data-structures/heap/heap.test.ts +2 -2
- package/test/unit/data-structures/linked-list/doubly-linked-list.test.ts +1 -1
- package/test/unit/data-structures/linked-list/singly-linked-list.test.ts +2 -2
- package/test/unit/data-structures/matrix/navigator.test.ts +1 -1
- package/test/unit/data-structures/priority-queue/max-priority-queue.test.ts +2 -2
- package/test/unit/data-structures/queue/deque.test.ts +1 -1
- package/test/unit/data-structures/queue/queue.test.ts +1 -1
- package/test/utils/big-o.ts +1 -1
- package/tsconfig-base.json +27 -0
- package/tsconfig-cjs.json +9 -0
- package/tsup.config.js +11 -0
- package/umd/bundle.min.js +1 -1
- package/umd/bundle.min.js.map +1 -1
- package/dist/data-structures/binary-tree/avl-tree.js.map +0 -1
- package/dist/data-structures/binary-tree/binary-indexed-tree.js.map +0 -1
- package/dist/data-structures/binary-tree/binary-tree.js.map +0 -1
- package/dist/data-structures/binary-tree/bst.js.map +0 -1
- package/dist/data-structures/binary-tree/index.js.map +0 -1
- package/dist/data-structures/binary-tree/rb-tree.js.map +0 -1
- package/dist/data-structures/binary-tree/segment-tree.js.map +0 -1
- package/dist/data-structures/binary-tree/tree-multiset.js.map +0 -1
- package/dist/data-structures/graph/abstract-graph.js.map +0 -1
- 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.js.map +0 -1
- package/dist/data-structures/graph/undirected-graph.js.map +0 -1
- package/dist/data-structures/hash/coordinate-map.js.map +0 -1
- package/dist/data-structures/hash/coordinate-set.js.map +0 -1
- package/dist/data-structures/hash/hash-map.js.map +0 -1
- package/dist/data-structures/hash/hash-table.js.map +0 -1
- package/dist/data-structures/hash/index.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.js.map +0 -1
- package/dist/data-structures/heap/index.js.map +0 -1
- package/dist/data-structures/heap/max-heap.js.map +0 -1
- 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.js.map +0 -1
- package/dist/data-structures/linked-list/index.js.map +0 -1
- package/dist/data-structures/linked-list/singly-linked-list.js.map +0 -1
- 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.js.map +0 -1
- package/dist/data-structures/matrix/matrix2d.js.map +0 -1
- package/dist/data-structures/matrix/navigator.js.map +0 -1
- 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.js.map +0 -1
- package/dist/data-structures/priority-queue/min-priority-queue.js.map +0 -1
- package/dist/data-structures/priority-queue/priority-queue.js.map +0 -1
- 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.js.map +0 -1
- package/dist/data-structures/stack/index.js.map +0 -1
- 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.js.map +0 -1
- package/dist/data-structures/trie/index.js.map +0 -1
- package/dist/data-structures/trie/trie.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/interfaces/binary-tree.js.map +0 -1
- package/dist/interfaces/doubly-linked-list.js.map +0 -1
- package/dist/interfaces/index.js.map +0 -1
- package/dist/interfaces/priority-queue.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/types/data-structures/binary-tree/avl-tree.js.map +0 -1
- package/dist/types/data-structures/binary-tree/binary-indexed-tree.js.map +0 -1
- package/dist/types/data-structures/binary-tree/binary-tree.js.map +0 -1
- package/dist/types/data-structures/binary-tree/bst.js.map +0 -1
- package/dist/types/data-structures/binary-tree/index.js.map +0 -1
- package/dist/types/data-structures/binary-tree/rb-tree.js.map +0 -1
- package/dist/types/data-structures/binary-tree/segment-tree.js.map +0 -1
- package/dist/types/data-structures/binary-tree/tree-multiset.js.map +0 -1
- package/dist/types/data-structures/graph/abstract-graph.js.map +0 -1
- package/dist/types/data-structures/graph/directed-graph.js.map +0 -1
- package/dist/types/data-structures/graph/index.js.map +0 -1
- package/dist/types/data-structures/graph/map-graph.js.map +0 -1
- package/dist/types/data-structures/graph/undirected-graph.js.map +0 -1
- package/dist/types/data-structures/hash/coordinate-map.js.map +0 -1
- package/dist/types/data-structures/hash/coordinate-set.js.map +0 -1
- package/dist/types/data-structures/hash/hash-map.js.map +0 -1
- package/dist/types/data-structures/hash/hash-table.js.map +0 -1
- package/dist/types/data-structures/hash/index.js.map +0 -1
- package/dist/types/data-structures/hash/tree-map.js.map +0 -1
- package/dist/types/data-structures/hash/tree-set.js.map +0 -1
- package/dist/types/data-structures/heap/heap.js.map +0 -1
- package/dist/types/data-structures/heap/index.js.map +0 -1
- package/dist/types/data-structures/heap/max-heap.js.map +0 -1
- package/dist/types/data-structures/heap/min-heap.js.map +0 -1
- package/dist/types/data-structures/index.js.map +0 -1
- package/dist/types/data-structures/linked-list/doubly-linked-list.js.map +0 -1
- package/dist/types/data-structures/linked-list/index.js.map +0 -1
- package/dist/types/data-structures/linked-list/singly-linked-list.js.map +0 -1
- package/dist/types/data-structures/linked-list/skip-linked-list.js.map +0 -1
- package/dist/types/data-structures/matrix/index.js.map +0 -1
- package/dist/types/data-structures/matrix/matrix.js.map +0 -1
- package/dist/types/data-structures/matrix/matrix2d.js.map +0 -1
- package/dist/types/data-structures/matrix/navigator.js.map +0 -1
- package/dist/types/data-structures/matrix/vector2d.js.map +0 -1
- package/dist/types/data-structures/priority-queue/index.js.map +0 -1
- package/dist/types/data-structures/priority-queue/max-priority-queue.js.map +0 -1
- package/dist/types/data-structures/priority-queue/min-priority-queue.js.map +0 -1
- package/dist/types/data-structures/priority-queue/priority-queue.js.map +0 -1
- package/dist/types/data-structures/queue/deque.js.map +0 -1
- package/dist/types/data-structures/queue/index.js.map +0 -1
- package/dist/types/data-structures/queue/queue.js.map +0 -1
- package/dist/types/data-structures/stack/index.js.map +0 -1
- package/dist/types/data-structures/stack/stack.js.map +0 -1
- package/dist/types/data-structures/tree/index.js.map +0 -1
- package/dist/types/data-structures/tree/tree.js.map +0 -1
- package/dist/types/data-structures/trie/index.js.map +0 -1
- package/dist/types/data-structures/trie/trie.js.map +0 -1
- 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/validate-type.js.map +0 -1
- package/dist/utils/index.js.map +0 -1
- package/dist/utils/utils.js.map +0 -1
- package/lib/data-structures/binary-tree/index.js +0 -7
- package/lib/data-structures/binary-tree/rb-tree.js +0 -22
- package/lib/data-structures/graph/index.js +0 -4
- package/lib/data-structures/hash/index.js +0 -6
- 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/index.js +0 -3
- package/lib/data-structures/index.js +0 -11
- package/lib/data-structures/linked-list/index.js +0 -3
- package/lib/data-structures/matrix/index.js +0 -4
- package/lib/data-structures/priority-queue/index.js +0 -3
- package/lib/data-structures/priority-queue/priority-queue.js +0 -13
- package/lib/data-structures/queue/index.js +0 -2
- package/lib/data-structures/stack/index.js +0 -1
- package/lib/data-structures/tree/index.js +0 -1
- package/lib/data-structures/trie/index.js +0 -1
- package/lib/index.js +0 -4
- package/lib/interfaces/binary-tree.js +0 -1
- package/lib/interfaces/doubly-linked-list.js +0 -1
- package/lib/interfaces/graph.js +0 -1
- package/lib/interfaces/heap.js +0 -1
- package/lib/interfaces/index.js +0 -8
- package/lib/interfaces/navigator.js +0 -1
- package/lib/interfaces/priority-queue.js +0 -1
- package/lib/interfaces/segment-tree.js +0 -1
- package/lib/interfaces/singly-linked-list.js +0 -1
- package/lib/types/data-structures/binary-tree/avl-tree.js +0 -1
- package/lib/types/data-structures/binary-tree/binary-indexed-tree.js +0 -1
- package/lib/types/data-structures/binary-tree/bst.js +0 -1
- package/lib/types/data-structures/binary-tree/index.js +0 -6
- package/lib/types/data-structures/binary-tree/rb-tree.js +0 -5
- package/lib/types/data-structures/binary-tree/segment-tree.js +0 -1
- package/lib/types/data-structures/binary-tree/tree-multiset.js +0 -1
- package/lib/types/data-structures/graph/abstract-graph.js +0 -1
- package/lib/types/data-structures/graph/directed-graph.js +0 -6
- package/lib/types/data-structures/graph/index.js +0 -3
- package/lib/types/data-structures/graph/map-graph.js +0 -1
- package/lib/types/data-structures/graph/undirected-graph.js +0 -1
- package/lib/types/data-structures/hash/coordinate-map.js +0 -1
- package/lib/types/data-structures/hash/coordinate-set.js +0 -1
- package/lib/types/data-structures/hash/hash-map.js +0 -1
- package/lib/types/data-structures/hash/hash-table.js +0 -1
- package/lib/types/data-structures/hash/index.js +0 -1
- package/lib/types/data-structures/hash/tree-map.js +0 -1
- package/lib/types/data-structures/hash/tree-set.js +0 -1
- package/lib/types/data-structures/heap/heap.js +0 -1
- package/lib/types/data-structures/heap/index.js +0 -1
- package/lib/types/data-structures/heap/max-heap.js +0 -1
- package/lib/types/data-structures/heap/min-heap.js +0 -1
- package/lib/types/data-structures/index.js +0 -11
- package/lib/types/data-structures/linked-list/doubly-linked-list.js +0 -1
- package/lib/types/data-structures/linked-list/index.js +0 -2
- package/lib/types/data-structures/linked-list/singly-linked-list.js +0 -1
- package/lib/types/data-structures/linked-list/skip-linked-list.js +0 -1
- package/lib/types/data-structures/matrix/index.js +0 -1
- package/lib/types/data-structures/matrix/matrix.js +0 -1
- package/lib/types/data-structures/matrix/matrix2d.js +0 -1
- package/lib/types/data-structures/matrix/navigator.js +0 -1
- package/lib/types/data-structures/matrix/vector2d.js +0 -1
- package/lib/types/data-structures/priority-queue/index.js +0 -3
- package/lib/types/data-structures/priority-queue/max-priority-queue.js +0 -1
- package/lib/types/data-structures/priority-queue/min-priority-queue.js +0 -1
- package/lib/types/data-structures/priority-queue/priority-queue.js +0 -1
- package/lib/types/data-structures/queue/deque.js +0 -1
- package/lib/types/data-structures/queue/index.js +0 -2
- package/lib/types/data-structures/queue/queue.js +0 -1
- package/lib/types/data-structures/stack/index.js +0 -1
- package/lib/types/data-structures/stack/stack.js +0 -1
- package/lib/types/data-structures/tree/index.js +0 -1
- package/lib/types/data-structures/tree/tree.js +0 -1
- package/lib/types/data-structures/trie/index.js +0 -1
- package/lib/types/data-structures/trie/trie.js +0 -1
- package/lib/types/helpers.js +0 -6
- package/lib/types/index.js +0 -3
- package/lib/types/utils/index.js +0 -2
- package/lib/types/utils/utils.js +0 -1
- package/lib/types/utils/validate-type.js +0 -1
- package/lib/utils/index.js +0 -1
- package/lib/utils/utils.js +0 -63
- /package/dist/{data-structures → cjs/data-structures}/binary-tree/avl-tree.d.ts +0 -0
- /package/dist/{data-structures → cjs/data-structures}/binary-tree/avl-tree.js +0 -0
- /package/dist/{data-structures → cjs/data-structures}/binary-tree/binary-indexed-tree.d.ts +0 -0
- /package/dist/{data-structures → cjs/data-structures}/binary-tree/binary-indexed-tree.js +0 -0
- /package/dist/{data-structures → cjs/data-structures}/binary-tree/binary-tree.d.ts +0 -0
- /package/dist/{data-structures → cjs/data-structures}/binary-tree/binary-tree.js +0 -0
- /package/dist/{data-structures → cjs/data-structures}/binary-tree/bst.d.ts +0 -0
- /package/dist/{data-structures → cjs/data-structures}/binary-tree/bst.js +0 -0
- /package/dist/{data-structures → cjs/data-structures}/binary-tree/index.d.ts +0 -0
- /package/dist/{data-structures → cjs/data-structures}/binary-tree/index.js +0 -0
- /package/dist/{data-structures → cjs/data-structures}/binary-tree/rb-tree.d.ts +0 -0
- /package/dist/{data-structures → cjs/data-structures}/binary-tree/rb-tree.js +0 -0
- /package/dist/{data-structures → cjs/data-structures}/binary-tree/segment-tree.d.ts +0 -0
- /package/dist/{data-structures → cjs/data-structures}/binary-tree/segment-tree.js +0 -0
- /package/dist/{data-structures → cjs/data-structures}/binary-tree/tree-multiset.d.ts +0 -0
- /package/dist/{data-structures → cjs/data-structures}/binary-tree/tree-multiset.js +0 -0
- /package/dist/{data-structures → cjs/data-structures}/graph/abstract-graph.d.ts +0 -0
- /package/dist/{data-structures → cjs/data-structures}/graph/abstract-graph.js +0 -0
- /package/dist/{data-structures → cjs/data-structures}/graph/directed-graph.d.ts +0 -0
- /package/dist/{data-structures → cjs/data-structures}/graph/directed-graph.js +0 -0
- /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}/graph/map-graph.d.ts +0 -0
- /package/dist/{data-structures → cjs/data-structures}/graph/map-graph.js +0 -0
- /package/dist/{data-structures → cjs/data-structures}/graph/undirected-graph.d.ts +0 -0
- /package/dist/{data-structures → cjs/data-structures}/graph/undirected-graph.js +0 -0
- /package/dist/{data-structures → cjs/data-structures}/hash/coordinate-map.d.ts +0 -0
- /package/dist/{data-structures → cjs/data-structures}/hash/coordinate-map.js +0 -0
- /package/dist/{data-structures → cjs/data-structures}/hash/coordinate-set.d.ts +0 -0
- /package/dist/{data-structures → cjs/data-structures}/hash/coordinate-set.js +0 -0
- /package/dist/{data-structures → cjs/data-structures}/hash/hash-map.d.ts +0 -0
- /package/dist/{data-structures → cjs/data-structures}/hash/hash-map.js +0 -0
- /package/dist/{data-structures → cjs/data-structures}/hash/hash-table.d.ts +0 -0
- /package/dist/{data-structures → cjs/data-structures}/hash/hash-table.js +0 -0
- /package/dist/{data-structures → cjs/data-structures}/hash/index.d.ts +0 -0
- /package/dist/{data-structures → cjs/data-structures}/hash/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/heap.d.ts +0 -0
- /package/dist/{data-structures → cjs/data-structures}/heap/heap.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}/heap/max-heap.d.ts +0 -0
- /package/dist/{data-structures → cjs/data-structures}/heap/max-heap.js +0 -0
- /package/dist/{data-structures → cjs/data-structures}/heap/min-heap.d.ts +0 -0
- /package/dist/{data-structures → cjs/data-structures}/heap/min-heap.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/doubly-linked-list.d.ts +0 -0
- /package/dist/{data-structures → cjs/data-structures}/linked-list/doubly-linked-list.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}/linked-list/singly-linked-list.d.ts +0 -0
- /package/dist/{data-structures → cjs/data-structures}/linked-list/singly-linked-list.js +0 -0
- /package/dist/{data-structures → cjs/data-structures}/linked-list/skip-linked-list.d.ts +0 -0
- /package/dist/{data-structures → cjs/data-structures}/linked-list/skip-linked-list.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.d.ts +0 -0
- /package/dist/{data-structures → cjs/data-structures}/matrix/matrix.js +0 -0
- /package/dist/{data-structures → cjs/data-structures}/matrix/matrix2d.d.ts +0 -0
- /package/dist/{data-structures → cjs/data-structures}/matrix/navigator.d.ts +0 -0
- /package/dist/{data-structures → cjs/data-structures}/matrix/navigator.js +0 -0
- /package/dist/{data-structures → cjs/data-structures}/matrix/vector2d.d.ts +0 -0
- /package/dist/{data-structures → cjs/data-structures}/matrix/vector2d.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}/priority-queue/max-priority-queue.d.ts +0 -0
- /package/dist/{data-structures → cjs/data-structures}/priority-queue/max-priority-queue.js +0 -0
- /package/dist/{data-structures → cjs/data-structures}/priority-queue/min-priority-queue.d.ts +0 -0
- /package/dist/{data-structures → cjs/data-structures}/priority-queue/min-priority-queue.js +0 -0
- /package/dist/{data-structures → cjs/data-structures}/priority-queue/priority-queue.d.ts +0 -0
- /package/dist/{data-structures → cjs/data-structures}/priority-queue/priority-queue.js +0 -0
- /package/dist/{data-structures → cjs/data-structures}/queue/deque.d.ts +0 -0
- /package/dist/{data-structures → cjs/data-structures}/queue/deque.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}/queue/queue.d.ts +0 -0
- /package/dist/{data-structures → cjs/data-structures}/queue/queue.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}/stack/stack.d.ts +0 -0
- /package/dist/{data-structures → cjs/data-structures}/stack/stack.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}/tree/tree.d.ts +0 -0
- /package/dist/{data-structures → cjs/data-structures}/tree/tree.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/{data-structures → cjs/data-structures}/trie/trie.d.ts +0 -0
- /package/dist/{data-structures → cjs/data-structures}/trie/trie.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.d.ts +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}/graph.d.ts +0 -0
- /package/dist/{interfaces → cjs/interfaces}/graph.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}/index.d.ts +0 -0
- /package/dist/{interfaces → cjs/interfaces}/index.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/{types → cjs/types}/data-structures/binary-tree/avl-tree.d.ts +0 -0
- /package/dist/{types → cjs/types}/data-structures/binary-tree/avl-tree.js +0 -0
- /package/dist/{types → cjs/types}/data-structures/binary-tree/binary-indexed-tree.d.ts +0 -0
- /package/dist/{types → cjs/types}/data-structures/binary-tree/binary-indexed-tree.js +0 -0
- /package/dist/{types → cjs/types}/data-structures/binary-tree/binary-tree.d.ts +0 -0
- /package/dist/{types → cjs/types}/data-structures/binary-tree/binary-tree.js +0 -0
- /package/dist/{types → cjs/types}/data-structures/binary-tree/bst.d.ts +0 -0
- /package/dist/{types → cjs/types}/data-structures/binary-tree/bst.js +0 -0
- /package/dist/{types → cjs/types}/data-structures/binary-tree/index.d.ts +0 -0
- /package/dist/{types → cjs/types}/data-structures/binary-tree/index.js +0 -0
- /package/dist/{types → cjs/types}/data-structures/binary-tree/rb-tree.d.ts +0 -0
- /package/dist/{types → cjs/types}/data-structures/binary-tree/rb-tree.js +0 -0
- /package/dist/{types → cjs/types}/data-structures/binary-tree/segment-tree.d.ts +0 -0
- /package/dist/{types → cjs/types}/data-structures/binary-tree/segment-tree.js +0 -0
- /package/dist/{types → cjs/types}/data-structures/binary-tree/tree-multiset.d.ts +0 -0
- /package/dist/{types → cjs/types}/data-structures/binary-tree/tree-multiset.js +0 -0
- /package/dist/{types → cjs/types}/data-structures/graph/abstract-graph.d.ts +0 -0
- /package/dist/{types → cjs/types}/data-structures/graph/abstract-graph.js +0 -0
- /package/dist/{types → cjs/types}/data-structures/graph/directed-graph.d.ts +0 -0
- /package/dist/{types → cjs/types}/data-structures/graph/directed-graph.js +0 -0
- /package/dist/{types → cjs/types}/data-structures/graph/index.d.ts +0 -0
- /package/dist/{types → cjs/types}/data-structures/graph/index.js +0 -0
- /package/dist/{types → cjs/types}/data-structures/graph/map-graph.d.ts +0 -0
- /package/dist/{types → cjs/types}/data-structures/graph/map-graph.js +0 -0
- /package/dist/{types → cjs/types}/data-structures/graph/undirected-graph.d.ts +0 -0
- /package/dist/{types → cjs/types}/data-structures/graph/undirected-graph.js +0 -0
- /package/dist/{types → cjs/types}/data-structures/hash/coordinate-map.d.ts +0 -0
- /package/dist/{types → cjs/types}/data-structures/hash/coordinate-map.js +0 -0
- /package/dist/{types → cjs/types}/data-structures/hash/coordinate-set.d.ts +0 -0
- /package/dist/{types → cjs/types}/data-structures/hash/coordinate-set.js +0 -0
- /package/dist/{types → cjs/types}/data-structures/hash/hash-map.d.ts +0 -0
- /package/dist/{types → cjs/types}/data-structures/hash/hash-map.js +0 -0
- /package/dist/{types → cjs/types}/data-structures/hash/hash-table.d.ts +0 -0
- /package/dist/{types → cjs/types}/data-structures/hash/hash-table.js +0 -0
- /package/dist/{types → cjs/types}/data-structures/hash/index.d.ts +0 -0
- /package/dist/{types → cjs/types}/data-structures/hash/index.js +0 -0
- /package/dist/{types → cjs/types}/data-structures/hash/tree-map.d.ts +0 -0
- /package/dist/{types → cjs/types}/data-structures/hash/tree-map.js +0 -0
- /package/dist/{types → cjs/types}/data-structures/hash/tree-set.d.ts +0 -0
- /package/dist/{types → cjs/types}/data-structures/hash/tree-set.js +0 -0
- /package/dist/{types → cjs/types}/data-structures/heap/heap.d.ts +0 -0
- /package/dist/{types → cjs/types}/data-structures/heap/heap.js +0 -0
- /package/dist/{types → cjs/types}/data-structures/heap/index.d.ts +0 -0
- /package/dist/{types → cjs/types}/data-structures/heap/index.js +0 -0
- /package/dist/{types → cjs/types}/data-structures/heap/max-heap.d.ts +0 -0
- /package/dist/{types → cjs/types}/data-structures/heap/max-heap.js +0 -0
- /package/dist/{types → cjs/types}/data-structures/heap/min-heap.d.ts +0 -0
- /package/dist/{types → cjs/types}/data-structures/heap/min-heap.js +0 -0
- /package/dist/{types → cjs/types}/data-structures/index.d.ts +0 -0
- /package/dist/{types → cjs/types}/data-structures/index.js +0 -0
- /package/dist/{types → cjs/types}/data-structures/linked-list/doubly-linked-list.d.ts +0 -0
- /package/dist/{types → cjs/types}/data-structures/linked-list/doubly-linked-list.js +0 -0
- /package/dist/{types → cjs/types}/data-structures/linked-list/index.d.ts +0 -0
- /package/dist/{types → cjs/types}/data-structures/linked-list/index.js +0 -0
- /package/dist/{types → cjs/types}/data-structures/linked-list/singly-linked-list.d.ts +0 -0
- /package/dist/{types → cjs/types}/data-structures/linked-list/singly-linked-list.js +0 -0
- /package/dist/{types → cjs/types}/data-structures/linked-list/skip-linked-list.d.ts +0 -0
- /package/dist/{types → cjs/types}/data-structures/linked-list/skip-linked-list.js +0 -0
- /package/dist/{types → cjs/types}/data-structures/matrix/index.d.ts +0 -0
- /package/dist/{types → cjs/types}/data-structures/matrix/index.js +0 -0
- /package/dist/{types → cjs/types}/data-structures/matrix/matrix.d.ts +0 -0
- /package/dist/{types → cjs/types}/data-structures/matrix/matrix.js +0 -0
- /package/dist/{types → cjs/types}/data-structures/matrix/matrix2d.d.ts +0 -0
- /package/dist/{types → cjs/types}/data-structures/matrix/matrix2d.js +0 -0
- /package/dist/{types → cjs/types}/data-structures/matrix/navigator.d.ts +0 -0
- /package/dist/{types → cjs/types}/data-structures/matrix/navigator.js +0 -0
- /package/dist/{types → cjs/types}/data-structures/matrix/vector2d.d.ts +0 -0
- /package/dist/{types → cjs/types}/data-structures/matrix/vector2d.js +0 -0
- /package/dist/{types → cjs/types}/data-structures/priority-queue/index.d.ts +0 -0
- /package/dist/{types → cjs/types}/data-structures/priority-queue/index.js +0 -0
- /package/dist/{types → cjs/types}/data-structures/priority-queue/max-priority-queue.d.ts +0 -0
- /package/dist/{types → cjs/types}/data-structures/priority-queue/max-priority-queue.js +0 -0
- /package/dist/{types → cjs/types}/data-structures/priority-queue/min-priority-queue.d.ts +0 -0
- /package/dist/{types → cjs/types}/data-structures/priority-queue/min-priority-queue.js +0 -0
- /package/dist/{types → cjs/types}/data-structures/priority-queue/priority-queue.d.ts +0 -0
- /package/dist/{types → cjs/types}/data-structures/priority-queue/priority-queue.js +0 -0
- /package/dist/{types → cjs/types}/data-structures/queue/deque.d.ts +0 -0
- /package/dist/{types → cjs/types}/data-structures/queue/deque.js +0 -0
- /package/dist/{types → cjs/types}/data-structures/queue/index.d.ts +0 -0
- /package/dist/{types → cjs/types}/data-structures/queue/index.js +0 -0
- /package/dist/{types → cjs/types}/data-structures/queue/queue.d.ts +0 -0
- /package/dist/{types → cjs/types}/data-structures/queue/queue.js +0 -0
- /package/dist/{types → cjs/types}/data-structures/stack/index.d.ts +0 -0
- /package/dist/{types → cjs/types}/data-structures/stack/index.js +0 -0
- /package/dist/{types → cjs/types}/data-structures/stack/stack.d.ts +0 -0
- /package/dist/{types → cjs/types}/data-structures/stack/stack.js +0 -0
- /package/dist/{types → cjs/types}/data-structures/tree/index.d.ts +0 -0
- /package/dist/{types → cjs/types}/data-structures/tree/index.js +0 -0
- /package/dist/{types → cjs/types}/data-structures/tree/tree.d.ts +0 -0
- /package/dist/{types → cjs/types}/data-structures/tree/tree.js +0 -0
- /package/dist/{types → cjs/types}/data-structures/trie/index.d.ts +0 -0
- /package/dist/{types → cjs/types}/data-structures/trie/index.js +0 -0
- /package/dist/{types → cjs/types}/data-structures/trie/trie.d.ts +0 -0
- /package/dist/{types → cjs/types}/data-structures/trie/trie.js +0 -0
- /package/dist/{types → cjs/types}/helpers.d.ts +0 -0
- /package/dist/{types → cjs/types}/helpers.js +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/dist/{utils → cjs/utils}/utils.d.ts +0 -0
- /package/dist/{utils → cjs/utils}/utils.js +0 -0
- /package/{lib → dist/mjs}/data-structures/binary-tree/avl-tree.d.ts +0 -0
- /package/{lib → dist/mjs}/data-structures/binary-tree/binary-indexed-tree.d.ts +0 -0
- /package/{lib → dist/mjs}/data-structures/binary-tree/binary-tree.d.ts +0 -0
- /package/{lib → dist/mjs}/data-structures/binary-tree/bst.d.ts +0 -0
- /package/{lib → dist/mjs}/data-structures/binary-tree/index.d.ts +0 -0
- /package/{lib → dist/mjs}/data-structures/binary-tree/rb-tree.d.ts +0 -0
- /package/{lib → dist/mjs}/data-structures/binary-tree/segment-tree.d.ts +0 -0
- /package/{lib → dist/mjs}/data-structures/binary-tree/tree-multiset.d.ts +0 -0
- /package/{lib → dist/mjs}/data-structures/graph/abstract-graph.d.ts +0 -0
- /package/{lib → dist/mjs}/data-structures/graph/directed-graph.d.ts +0 -0
- /package/{lib → dist/mjs}/data-structures/graph/index.d.ts +0 -0
- /package/{lib → dist/mjs}/data-structures/graph/map-graph.d.ts +0 -0
- /package/{lib → dist/mjs}/data-structures/graph/undirected-graph.d.ts +0 -0
- /package/{lib → dist/mjs}/data-structures/hash/coordinate-map.d.ts +0 -0
- /package/{lib → dist/mjs}/data-structures/hash/coordinate-set.d.ts +0 -0
- /package/{lib → dist/mjs}/data-structures/hash/hash-map.d.ts +0 -0
- /package/{lib → dist/mjs}/data-structures/hash/hash-table.d.ts +0 -0
- /package/{lib → dist/mjs}/data-structures/hash/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/heap.d.ts +0 -0
- /package/{lib → dist/mjs}/data-structures/heap/index.d.ts +0 -0
- /package/{lib → dist/mjs}/data-structures/heap/max-heap.d.ts +0 -0
- /package/{lib → dist/mjs}/data-structures/heap/min-heap.d.ts +0 -0
- /package/{lib → dist/mjs}/data-structures/index.d.ts +0 -0
- /package/{lib → dist/mjs}/data-structures/linked-list/doubly-linked-list.d.ts +0 -0
- /package/{lib → dist/mjs}/data-structures/linked-list/index.d.ts +0 -0
- /package/{lib → dist/mjs}/data-structures/linked-list/singly-linked-list.d.ts +0 -0
- /package/{lib → dist/mjs}/data-structures/linked-list/skip-linked-list.d.ts +0 -0
- /package/{lib → dist/mjs}/data-structures/matrix/index.d.ts +0 -0
- /package/{lib → dist/mjs}/data-structures/matrix/matrix.d.ts +0 -0
- /package/{lib → dist/mjs}/data-structures/matrix/matrix2d.d.ts +0 -0
- /package/{lib → dist/mjs}/data-structures/matrix/navigator.d.ts +0 -0
- /package/{lib → dist/mjs}/data-structures/matrix/vector2d.d.ts +0 -0
- /package/{lib → dist/mjs}/data-structures/priority-queue/index.d.ts +0 -0
- /package/{lib → dist/mjs}/data-structures/priority-queue/max-priority-queue.d.ts +0 -0
- /package/{lib → dist/mjs}/data-structures/priority-queue/min-priority-queue.d.ts +0 -0
- /package/{lib → dist/mjs}/data-structures/priority-queue/priority-queue.d.ts +0 -0
- /package/{lib → dist/mjs}/data-structures/queue/deque.d.ts +0 -0
- /package/{lib → dist/mjs}/data-structures/queue/index.d.ts +0 -0
- /package/{lib → dist/mjs}/data-structures/queue/queue.d.ts +0 -0
- /package/{lib → dist/mjs}/data-structures/stack/index.d.ts +0 -0
- /package/{lib → dist/mjs}/data-structures/stack/stack.d.ts +0 -0
- /package/{lib → dist/mjs}/data-structures/tree/index.d.ts +0 -0
- /package/{lib → dist/mjs}/data-structures/tree/tree.d.ts +0 -0
- /package/{lib → dist/mjs}/data-structures/trie/index.d.ts +0 -0
- /package/{lib → dist/mjs}/data-structures/trie/trie.d.ts +0 -0
- /package/{lib → dist/mjs}/index.d.ts +0 -0
- /package/{lib → dist/mjs}/interfaces/binary-tree.d.ts +0 -0
- /package/{lib → dist/mjs}/interfaces/doubly-linked-list.d.ts +0 -0
- /package/{lib → dist/mjs}/interfaces/graph.d.ts +0 -0
- /package/{lib → dist/mjs}/interfaces/heap.d.ts +0 -0
- /package/{lib → dist/mjs}/interfaces/index.d.ts +0 -0
- /package/{lib → dist/mjs}/interfaces/navigator.d.ts +0 -0
- /package/{lib → dist/mjs}/interfaces/priority-queue.d.ts +0 -0
- /package/{lib → dist/mjs}/interfaces/segment-tree.d.ts +0 -0
- /package/{lib → dist/mjs}/interfaces/singly-linked-list.d.ts +0 -0
- /package/{lib → dist/mjs}/types/data-structures/binary-tree/avl-tree.d.ts +0 -0
- /package/{lib → dist/mjs}/types/data-structures/binary-tree/binary-indexed-tree.d.ts +0 -0
- /package/{lib → dist/mjs}/types/data-structures/binary-tree/binary-tree.d.ts +0 -0
- /package/{lib → dist/mjs}/types/data-structures/binary-tree/bst.d.ts +0 -0
- /package/{lib → dist/mjs}/types/data-structures/binary-tree/index.d.ts +0 -0
- /package/{lib → dist/mjs}/types/data-structures/binary-tree/rb-tree.d.ts +0 -0
- /package/{lib → dist/mjs}/types/data-structures/binary-tree/segment-tree.d.ts +0 -0
- /package/{lib → dist/mjs}/types/data-structures/binary-tree/tree-multiset.d.ts +0 -0
- /package/{lib → dist/mjs}/types/data-structures/graph/abstract-graph.d.ts +0 -0
- /package/{lib → dist/mjs}/types/data-structures/graph/directed-graph.d.ts +0 -0
- /package/{lib → dist/mjs}/types/data-structures/graph/index.d.ts +0 -0
- /package/{lib → dist/mjs}/types/data-structures/graph/map-graph.d.ts +0 -0
- /package/{lib → dist/mjs}/types/data-structures/graph/undirected-graph.d.ts +0 -0
- /package/{lib → dist/mjs}/types/data-structures/hash/coordinate-map.d.ts +0 -0
- /package/{lib → dist/mjs}/types/data-structures/hash/coordinate-set.d.ts +0 -0
- /package/{lib → dist/mjs}/types/data-structures/hash/hash-map.d.ts +0 -0
- /package/{lib → dist/mjs}/types/data-structures/hash/hash-table.d.ts +0 -0
- /package/{lib → dist/mjs}/types/data-structures/hash/index.d.ts +0 -0
- /package/{lib → dist/mjs}/types/data-structures/hash/tree-map.d.ts +0 -0
- /package/{lib → dist/mjs}/types/data-structures/hash/tree-set.d.ts +0 -0
- /package/{lib → dist/mjs}/types/data-structures/heap/heap.d.ts +0 -0
- /package/{lib → dist/mjs}/types/data-structures/heap/index.d.ts +0 -0
- /package/{lib → dist/mjs}/types/data-structures/heap/max-heap.d.ts +0 -0
- /package/{lib → dist/mjs}/types/data-structures/heap/min-heap.d.ts +0 -0
- /package/{lib → dist/mjs}/types/data-structures/index.d.ts +0 -0
- /package/{lib → dist/mjs}/types/data-structures/linked-list/doubly-linked-list.d.ts +0 -0
- /package/{lib → dist/mjs}/types/data-structures/linked-list/index.d.ts +0 -0
- /package/{lib → dist/mjs}/types/data-structures/linked-list/singly-linked-list.d.ts +0 -0
- /package/{lib → dist/mjs}/types/data-structures/linked-list/skip-linked-list.d.ts +0 -0
- /package/{lib → dist/mjs}/types/data-structures/matrix/index.d.ts +0 -0
- /package/{lib → dist/mjs}/types/data-structures/matrix/matrix.d.ts +0 -0
- /package/{lib → dist/mjs}/types/data-structures/matrix/matrix2d.d.ts +0 -0
- /package/{lib → dist/mjs}/types/data-structures/matrix/navigator.d.ts +0 -0
- /package/{lib → dist/mjs}/types/data-structures/matrix/vector2d.d.ts +0 -0
- /package/{lib → dist/mjs}/types/data-structures/priority-queue/index.d.ts +0 -0
- /package/{lib → dist/mjs}/types/data-structures/priority-queue/max-priority-queue.d.ts +0 -0
- /package/{lib → dist/mjs}/types/data-structures/priority-queue/min-priority-queue.d.ts +0 -0
- /package/{lib → dist/mjs}/types/data-structures/priority-queue/priority-queue.d.ts +0 -0
- /package/{lib → dist/mjs}/types/data-structures/queue/deque.d.ts +0 -0
- /package/{lib → dist/mjs}/types/data-structures/queue/index.d.ts +0 -0
- /package/{lib → dist/mjs}/types/data-structures/queue/queue.d.ts +0 -0
- /package/{lib → dist/mjs}/types/data-structures/stack/index.d.ts +0 -0
- /package/{lib → dist/mjs}/types/data-structures/stack/stack.d.ts +0 -0
- /package/{lib → dist/mjs}/types/data-structures/tree/index.d.ts +0 -0
- /package/{lib → dist/mjs}/types/data-structures/tree/tree.d.ts +0 -0
- /package/{lib → dist/mjs}/types/data-structures/trie/index.d.ts +0 -0
- /package/{lib → dist/mjs}/types/data-structures/trie/trie.d.ts +0 -0
- /package/{lib → dist/mjs}/types/helpers.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/{lib → dist/mjs}/utils/utils.d.ts +0 -0
package/package.json
CHANGED
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "data-structure-typed",
|
|
3
|
-
"version": "1.38.
|
|
3
|
+
"version": "1.38.2",
|
|
4
4
|
"description": "Data Structures of Javascript & TypeScript. Binary Tree, BST, Graph, Heap, Priority Queue, Linked List, Queue, Deque, Stack, AVL Tree, Tree Multiset, Trie, Directed Graph, Undirected Graph, Singly Linked List, Doubly Linked List, Max Heap, Max Priority Queue, Min Heap, Min Priority Queue.",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"module": "
|
|
7
|
-
"types": "
|
|
8
|
-
"
|
|
9
|
-
"umd:main": "umd/bundle.min.js",
|
|
5
|
+
"main": "dist/cjs/index.js",
|
|
6
|
+
"module": "dist/mjs/index.js",
|
|
7
|
+
"types": "dist/mjs/index.d.ts",
|
|
8
|
+
"umd:main": "dist/umd/index.global.js",
|
|
10
9
|
"exports": {
|
|
11
|
-
"
|
|
12
|
-
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./dist/mjs/index.js",
|
|
12
|
+
"require": "./dist/cjs/index.js",
|
|
13
|
+
"types": "./dist/mjs/index.d.ts"
|
|
14
|
+
}
|
|
13
15
|
},
|
|
14
16
|
"scripts": {
|
|
15
|
-
"build": "npm run build:
|
|
16
|
-
"build:
|
|
17
|
-
"build:
|
|
18
|
-
"build:umd": "
|
|
17
|
+
"build": "npm run build:mjs && npm run build:cjs && npm run build:umd && npm run build:docs",
|
|
18
|
+
"build:mjs": "rm -rf dist/mjs && tsc -p tsconfig.json",
|
|
19
|
+
"build:cjs": "rm -rf dist/cjs && tsc -p tsconfig-cjs.json",
|
|
20
|
+
"build:umd": "tsup",
|
|
19
21
|
"build:docs": "typedoc --out docs ./src",
|
|
20
22
|
"check": "tsc --noEmit",
|
|
21
23
|
"lint:src": "eslint --fix 'src/**/*.{js,ts}'",
|
|
@@ -59,26 +61,25 @@
|
|
|
59
61
|
"@typescript-eslint/eslint-plugin": "^6.7.4",
|
|
60
62
|
"@typescript-eslint/parser": "^6.7.4",
|
|
61
63
|
"auto-changelog": "^2.4.0",
|
|
62
|
-
"avl-tree-typed": "^1.38.
|
|
64
|
+
"avl-tree-typed": "^1.38.1",
|
|
63
65
|
"benchmark": "^2.1.4",
|
|
64
|
-
"binary-tree-typed": "^1.38.
|
|
65
|
-
"bst-typed": "^1.38.
|
|
66
|
+
"binary-tree-typed": "^1.38.1",
|
|
67
|
+
"bst-typed": "^1.38.1",
|
|
66
68
|
"dependency-cruiser": "^14.1.0",
|
|
67
69
|
"eslint": "^8.50.0",
|
|
68
70
|
"eslint-config-prettier": "^9.0.0",
|
|
69
71
|
"eslint-import-resolver-alias": "^1.1.2",
|
|
70
72
|
"eslint-import-resolver-typescript": "^3.6.1",
|
|
71
73
|
"eslint-plugin-import": "^2.28.1",
|
|
72
|
-
"heap-typed": "^1.38.
|
|
74
|
+
"heap-typed": "^1.38.1",
|
|
73
75
|
"istanbul-badges-readme": "^1.8.5",
|
|
74
76
|
"jest": "^29.7.0",
|
|
75
77
|
"prettier": "^3.0.3",
|
|
76
78
|
"ts-jest": "^29.1.1",
|
|
77
79
|
"ts-loader": "^9.4.4",
|
|
80
|
+
"tsup": "^7.2.0",
|
|
78
81
|
"typedoc": "^0.25.1",
|
|
79
|
-
"typescript": "^5.2.2"
|
|
80
|
-
"webpack": "^5.88.2",
|
|
81
|
-
"webpack-cli": "^5.1.4"
|
|
82
|
+
"typescript": "^5.2.2"
|
|
82
83
|
},
|
|
83
84
|
"keywords": [
|
|
84
85
|
"data",
|
|
@@ -226,8 +227,5 @@
|
|
|
226
227
|
"tarjan",
|
|
227
228
|
"Tarjan",
|
|
228
229
|
"Tarjan's"
|
|
229
|
-
]
|
|
230
|
-
"dependencies": {
|
|
231
|
-
"data-structure-typed": "^1.37.5"
|
|
232
|
-
}
|
|
230
|
+
]
|
|
233
231
|
}
|
|
@@ -152,7 +152,7 @@ export class AVLTree<N extends AVLTreeNode<N['val'], N> = AVLTreeNode> extends B
|
|
|
152
152
|
// 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:
|
|
153
153
|
switch (
|
|
154
154
|
this._balanceFactor(A) // second O(1)
|
|
155
|
-
|
|
155
|
+
) {
|
|
156
156
|
case -2:
|
|
157
157
|
if (A && A.left) {
|
|
158
158
|
if (this._balanceFactor(A.left) <= 0) {
|
|
@@ -17,7 +17,7 @@ export class BinaryIndexedTree {
|
|
|
17
17
|
* @param - - `frequency`: The default frequency value. It is optional and has a default
|
|
18
18
|
* value of 0.
|
|
19
19
|
*/
|
|
20
|
-
constructor({frequency = 0, max}: {frequency?: number; max: number}) {
|
|
20
|
+
constructor({frequency = 0, max}: { frequency?: number; max: number }) {
|
|
21
21
|
this._freq = frequency;
|
|
22
22
|
this._max = max;
|
|
23
23
|
this._freqMap = {0: 0};
|
|
@@ -407,7 +407,7 @@ export class BinaryTree<N extends BinaryTreeNode<N['val'], N> = BinaryTreeNode>
|
|
|
407
407
|
return -1;
|
|
408
408
|
}
|
|
409
409
|
|
|
410
|
-
const stack: {node: N; depth: number}[] = [{node: beginRoot, depth: 0}];
|
|
410
|
+
const stack: { node: N; depth: number }[] = [{node: beginRoot, depth: 0}];
|
|
411
411
|
let maxHeight = 0;
|
|
412
412
|
|
|
413
413
|
while (stack.length > 0) {
|
|
@@ -842,7 +842,7 @@ export class BinaryTree<N extends BinaryTreeNode<N['val'], N> = BinaryTreeNode>
|
|
|
842
842
|
_traverse(beginRoot);
|
|
843
843
|
} else {
|
|
844
844
|
// 0: visit, 1: print
|
|
845
|
-
const stack: {opt: 0 | 1; node: N | null | undefined}[] = [{opt: 0, node: beginRoot}];
|
|
845
|
+
const stack: { opt: 0 | 1; node: N | null | undefined }[] = [{opt: 0, node: beginRoot}];
|
|
846
846
|
|
|
847
847
|
while (stack.length > 0) {
|
|
848
848
|
const cur = stack.pop();
|
|
@@ -37,8 +37,7 @@ export class TreeMultisetNode<
|
|
|
37
37
|
*/
|
|
38
38
|
export class TreeMultiset<N extends TreeMultisetNode<N['val'], N> = TreeMultisetNode>
|
|
39
39
|
extends AVLTree<N>
|
|
40
|
-
implements IBinaryTree<N>
|
|
41
|
-
{
|
|
40
|
+
implements IBinaryTree<N> {
|
|
42
41
|
/**
|
|
43
42
|
* The constructor function for a TreeMultiset class in TypeScript, which extends another class and sets an option to
|
|
44
43
|
* merge duplicated values.
|
|
@@ -105,8 +105,7 @@ export abstract class AbstractEdge<V = any> {
|
|
|
105
105
|
export abstract class AbstractGraph<
|
|
106
106
|
V extends AbstractVertex<any> = AbstractVertex<any>,
|
|
107
107
|
E extends AbstractEdge<any> = AbstractEdge<any>
|
|
108
|
-
> implements IGraph<V, E>
|
|
109
|
-
{
|
|
108
|
+
> implements IGraph<V, E> {
|
|
110
109
|
private _vertices: Map<VertexKey, V> = new Map<VertexKey, V>();
|
|
111
110
|
|
|
112
111
|
get vertices(): Map<VertexKey, V> {
|
|
@@ -554,14 +553,14 @@ export abstract class AbstractGraph<
|
|
|
554
553
|
}
|
|
555
554
|
|
|
556
555
|
getMinDist &&
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
}
|
|
556
|
+
distMap.forEach((d, v) => {
|
|
557
|
+
if (v !== srcVertex) {
|
|
558
|
+
if (d < minDist) {
|
|
559
|
+
minDist = d;
|
|
560
|
+
if (genPaths) minDest = v;
|
|
563
561
|
}
|
|
564
|
-
}
|
|
562
|
+
}
|
|
563
|
+
});
|
|
565
564
|
|
|
566
565
|
genPaths && getPaths(minDest);
|
|
567
566
|
|
|
@@ -623,7 +622,7 @@ export abstract class AbstractGraph<
|
|
|
623
622
|
if (vertexOrKey instanceof AbstractVertex) distMap.set(vertexOrKey, Infinity);
|
|
624
623
|
}
|
|
625
624
|
|
|
626
|
-
const heap = new PriorityQueue<{key: number; val: V}>((a, b) => a.key - b.key);
|
|
625
|
+
const heap = new PriorityQueue<{ key: number; val: V }>((a, b) => a.key - b.key);
|
|
627
626
|
heap.add({key: 0, val: srcVertex});
|
|
628
627
|
|
|
629
628
|
distMap.set(srcVertex, 0);
|
|
@@ -852,7 +851,7 @@ export abstract class AbstractGraph<
|
|
|
852
851
|
* `predecessor` property is a 2D array of vertices (or `null`) representing the predecessor vertices in the shortest
|
|
853
852
|
* path between vertices in the
|
|
854
853
|
*/
|
|
855
|
-
floyd(): {costs: number[][]; predecessor: (V | null)[][]} {
|
|
854
|
+
floyd(): { costs: number[][]; predecessor: (V | null)[][] } {
|
|
856
855
|
const idAndVertices = [...this._vertices];
|
|
857
856
|
const n = idAndVertices.length;
|
|
858
857
|
|
|
@@ -64,8 +64,7 @@ export class DirectedEdge<V = any> extends AbstractEdge<V> {
|
|
|
64
64
|
|
|
65
65
|
export class DirectedGraph<V extends DirectedVertex<any> = DirectedVertex, E extends DirectedEdge<any> = DirectedEdge>
|
|
66
66
|
extends AbstractGraph<V, E>
|
|
67
|
-
implements IGraph<V, E>
|
|
68
|
-
{
|
|
67
|
+
implements IGraph<V, E> {
|
|
69
68
|
/**
|
|
70
69
|
* The constructor function initializes an instance of a class.
|
|
71
70
|
*/
|
|
@@ -51,12 +51,11 @@ export class UndirectedEdge<V = number> extends AbstractEdge<V> {
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
export class UndirectedGraph<
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
V extends UndirectedVertex<any> = UndirectedVertex,
|
|
55
|
+
E extends UndirectedEdge<any> = UndirectedEdge
|
|
56
|
+
>
|
|
57
57
|
extends AbstractGraph<V, E>
|
|
58
|
-
implements IGraph<V, E>
|
|
59
|
-
{
|
|
58
|
+
implements IGraph<V, E> {
|
|
60
59
|
/**
|
|
61
60
|
* The constructor initializes a new Map object to store edges.
|
|
62
61
|
*/
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export class TreeMap {
|
|
1
|
+
export class TreeMap {
|
|
2
|
+
}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export class TreeSet {
|
|
1
|
+
export class TreeSet {
|
|
2
|
+
}
|
|
@@ -14,7 +14,7 @@ export class MatrixNTI2D<V = any> {
|
|
|
14
14
|
* given initial value or 0 if not provided.
|
|
15
15
|
* @param options - An object containing the following properties:
|
|
16
16
|
*/
|
|
17
|
-
constructor(options: {row: number; col: number; initialVal?: V}) {
|
|
17
|
+
constructor(options: { row: number; col: number; initialVal?: V }) {
|
|
18
18
|
const {row, col, initialVal} = options;
|
|
19
19
|
this._matrix = new Array(row).fill(undefined).map(() => new Array(col).fill(initialVal || 0));
|
|
20
20
|
}
|
|
@@ -9,7 +9,8 @@ import {DoublyLinkedList} from '../linked-list';
|
|
|
9
9
|
|
|
10
10
|
// O(n) time complexity of obtaining the value
|
|
11
11
|
// O(1) time complexity of adding at the beginning and the end
|
|
12
|
-
export class Deque<E = any> extends DoublyLinkedList<E> {
|
|
12
|
+
export class Deque<E = any> extends DoublyLinkedList<E> {
|
|
13
|
+
}
|
|
13
14
|
|
|
14
15
|
// O(1) time complexity of obtaining the value
|
|
15
16
|
// O(n) time complexity of adding at the beginning and the end
|
|
@@ -19,9 +20,9 @@ export class ObjectDeque<E = number> {
|
|
|
19
20
|
if (capacity !== undefined) this._capacity = capacity;
|
|
20
21
|
}
|
|
21
22
|
|
|
22
|
-
private _nodes: {[key: number]: E} = {};
|
|
23
|
+
private _nodes: { [key: number]: E } = {};
|
|
23
24
|
|
|
24
|
-
get nodes(): {[p: number]: E} {
|
|
25
|
+
get nodes(): { [p: number]: E } {
|
|
25
26
|
return this._nodes;
|
|
26
27
|
}
|
|
27
28
|
|
|
@@ -156,7 +157,7 @@ export class ObjectDeque<E = number> {
|
|
|
156
157
|
return this._size <= 0;
|
|
157
158
|
}
|
|
158
159
|
|
|
159
|
-
protected _seNodes(value: {[p: number]: E}) {
|
|
160
|
+
protected _seNodes(value: { [p: number]: E }) {
|
|
160
161
|
this._nodes = value;
|
|
161
162
|
}
|
|
162
163
|
|
package/src/types/utils/utils.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type ToThunkFn = () => ReturnType<TrlFn>;
|
|
2
|
-
export type Thunk = () => ReturnType<ToThunkFn> & {__THUNK__: symbol};
|
|
2
|
+
export type Thunk = () => ReturnType<ToThunkFn> & { __THUNK__: symbol };
|
|
3
3
|
export type TrlFn = (...args: any[]) => any;
|
|
4
4
|
export type TrlAsyncFn = (...args: any[]) => any;
|
|
5
5
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export type KeyValueObject = {[key: string]: any};
|
|
1
|
+
export type KeyValueObject = { [key: string]: any };
|
|
2
2
|
|
|
3
|
-
export type KeyValueObjectWithKey = {[key: string]: any; key: string | number | symbol};
|
|
3
|
+
export type KeyValueObjectWithKey = { [key: string]: any; key: string | number | symbol };
|
|
4
4
|
|
|
5
5
|
export type NonNumberNonObjectButDefined = string | boolean | symbol | null;
|
|
6
6
|
|
|
@@ -183,7 +183,7 @@ describe('Individual package BST operations test', () => {
|
|
|
183
183
|
});
|
|
184
184
|
|
|
185
185
|
it('should perform various operations on a Binary Search Tree with object values', () => {
|
|
186
|
-
const objBST = new BST<BSTNode<{key: number; keyA: number}>>();
|
|
186
|
+
const objBST = new BST<BSTNode<{ key: number; keyA: number }>>();
|
|
187
187
|
expect(objBST).toBeInstanceOf(BST);
|
|
188
188
|
objBST.add(11, {key: 11, keyA: 11});
|
|
189
189
|
objBST.add(3, {key: 3, keyA: 3});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {BinaryIndexedTree} from '../../../../src';
|
|
2
|
-
import {isDebugTest} from '../../../config';
|
|
2
|
+
// import {isDebugTest} from '../../../config';
|
|
3
3
|
|
|
4
4
|
// const isDebug = isDebugTest;
|
|
5
5
|
|
|
@@ -251,6 +251,7 @@ describe('BinaryIndexedTree additional tests', () => {
|
|
|
251
251
|
expect(bit.lowerBound(200)).toBe(10);
|
|
252
252
|
});
|
|
253
253
|
});
|
|
254
|
+
|
|
254
255
|
function loopUpperBoundTests(bit: BinaryIndexedTree, values: number[]) {
|
|
255
256
|
for (const value of values) {
|
|
256
257
|
const index = bit.upperBound(value);
|
|
@@ -189,7 +189,7 @@ describe('BST operations test', () => {
|
|
|
189
189
|
});
|
|
190
190
|
|
|
191
191
|
it('should perform various operations on a Binary Search Tree with object values', () => {
|
|
192
|
-
const objBST = new BST<BSTNode<{key: number; keyA: number}>>();
|
|
192
|
+
const objBST = new BST<BSTNode<{ key: number; keyA: number }>>();
|
|
193
193
|
expect(objBST).toBeInstanceOf(BST);
|
|
194
194
|
objBST.add(11, {key: 11, keyA: 11});
|
|
195
195
|
objBST.add(3, {key: 3, keyA: 3});
|
|
@@ -260,7 +260,7 @@ describe('BST operations test', () => {
|
|
|
260
260
|
objBST.perfectlyBalance();
|
|
261
261
|
expect(objBST.isPerfectlyBalanced()).toBe(true);
|
|
262
262
|
|
|
263
|
-
const bfsNodesAfterBalanced: BSTNode<{key: number; keyA: number}>[] = [];
|
|
263
|
+
const bfsNodesAfterBalanced: BSTNode<{ key: number; keyA: number }>[] = [];
|
|
264
264
|
objBST.bfs(node => bfsNodesAfterBalanced.push(node));
|
|
265
265
|
expect(bfsNodesAfterBalanced[0].key).toBe(8);
|
|
266
266
|
expect(bfsNodesAfterBalanced[bfsNodesAfterBalanced.length - 1].key).toBe(16);
|
|
@@ -385,7 +385,7 @@ describe('BST operations test', () => {
|
|
|
385
385
|
expect(bfsIDs[1]).toBe(12);
|
|
386
386
|
expect(bfsIDs[2]).toBe(16);
|
|
387
387
|
|
|
388
|
-
const bfsNodes: BSTNode<{key: number; keyA: number}>[] = [];
|
|
388
|
+
const bfsNodes: BSTNode<{ key: number; keyA: number }>[] = [];
|
|
389
389
|
objBST.bfs(node => bfsNodes.push(node));
|
|
390
390
|
expect(bfsNodes[0].key).toBe(2);
|
|
391
391
|
expect(bfsNodes[1].key).toBe(12);
|
|
@@ -29,7 +29,7 @@ describe('Overall BinaryTree Test', () => {
|
|
|
29
29
|
bfsIDs[0] === 11; // true
|
|
30
30
|
expect(bfsIDs[0]).toBe(11);
|
|
31
31
|
|
|
32
|
-
const objBST = new BST<BSTNode<{key: number; keyA: number}>>();
|
|
32
|
+
const objBST = new BST<BSTNode<{ key: number; keyA: number }>>();
|
|
33
33
|
objBST.add(11, {key: 11, keyA: 11});
|
|
34
34
|
objBST.add(3, {key: 3, keyA: 3});
|
|
35
35
|
|
|
@@ -206,7 +206,7 @@ describe('TreeMultiset operations test', () => {
|
|
|
206
206
|
});
|
|
207
207
|
|
|
208
208
|
it('should perform various operations on a Binary Search Tree with object values', () => {
|
|
209
|
-
const objTreeMultiset = new TreeMultiset<TreeMultisetNode<{key: number; keyA: number}>>();
|
|
209
|
+
const objTreeMultiset = new TreeMultiset<TreeMultisetNode<{ key: number; keyA: number }>>();
|
|
210
210
|
expect(objTreeMultiset).toBeInstanceOf(TreeMultiset);
|
|
211
211
|
objTreeMultiset.add(11, {key: 11, keyA: 11});
|
|
212
212
|
objTreeMultiset.add(3, {key: 3, keyA: 3});
|
|
@@ -22,7 +22,7 @@ describe('Heap Operation Test', () => {
|
|
|
22
22
|
});
|
|
23
23
|
|
|
24
24
|
it('should object heap work well', function () {
|
|
25
|
-
const minHeap = new MinHeap<{a: string; key: number}>((a, b) => a.key - b.key);
|
|
25
|
+
const minHeap = new MinHeap<{ a: string; key: number }>((a, b) => a.key - b.key);
|
|
26
26
|
minHeap.add({key: 1, a: 'a1'});
|
|
27
27
|
minHeap.add({key: 6, a: 'a6'});
|
|
28
28
|
minHeap.add({key: 2, a: 'a2'});
|
|
@@ -37,7 +37,7 @@ describe('Heap Operation Test', () => {
|
|
|
37
37
|
i++;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
const maxHeap = new MaxHeap<{key: number; a: string}>((a, b) => b.key - a.key);
|
|
40
|
+
const maxHeap = new MaxHeap<{ key: number; a: string }>((a, b) => b.key - a.key);
|
|
41
41
|
maxHeap.add({key: 1, a: 'a1'});
|
|
42
42
|
maxHeap.add({key: 6, a: 'a6'});
|
|
43
43
|
maxHeap.add({key: 5, a: 'a5'});
|
|
@@ -3,7 +3,7 @@ import {bigO, magnitude} from '../../../utils';
|
|
|
3
3
|
|
|
4
4
|
describe('DoublyLinkedList Operation Test', () => {
|
|
5
5
|
let list: DoublyLinkedList<number>;
|
|
6
|
-
let objectList: DoublyLinkedList<{keyA: number}>;
|
|
6
|
+
let objectList: DoublyLinkedList<{ keyA: number }>;
|
|
7
7
|
|
|
8
8
|
beforeEach(() => {
|
|
9
9
|
list = new DoublyLinkedList();
|
|
@@ -3,10 +3,10 @@ import {bigO, magnitude} from '../../../utils';
|
|
|
3
3
|
|
|
4
4
|
describe('SinglyLinkedList Operation Test', () => {
|
|
5
5
|
let list: SinglyLinkedList<number>;
|
|
6
|
-
let objectList: SinglyLinkedList<{keyA: number}>;
|
|
6
|
+
let objectList: SinglyLinkedList<{ keyA: number }>;
|
|
7
7
|
beforeEach(() => {
|
|
8
8
|
list = new SinglyLinkedList<number>();
|
|
9
|
-
objectList = new SinglyLinkedList<{keyA: number}>();
|
|
9
|
+
objectList = new SinglyLinkedList<{ keyA: number }>();
|
|
10
10
|
});
|
|
11
11
|
|
|
12
12
|
describe('push', () => {
|
|
@@ -17,7 +17,7 @@ describe('MaxPriorityQueue Operation Test', () => {
|
|
|
17
17
|
});
|
|
18
18
|
|
|
19
19
|
it('should add elements and maintain heap property in a object MaxPriorityQueue', () => {
|
|
20
|
-
const priorityQueue = new MaxPriorityQueue<{keyA: number}>((a, b) => b.keyA - a.keyA);
|
|
20
|
+
const priorityQueue = new MaxPriorityQueue<{ keyA: number }>((a, b) => b.keyA - a.keyA);
|
|
21
21
|
priorityQueue.refill([{keyA: 5}, {keyA: 3}, {keyA: 1}]);
|
|
22
22
|
priorityQueue.add({keyA: 7});
|
|
23
23
|
|
|
@@ -64,7 +64,7 @@ describe('MaxPriorityQueue Operation Test', () => {
|
|
|
64
64
|
|
|
65
65
|
it('should correctly heapify an object array', () => {
|
|
66
66
|
const nodes = [{keyA: 5}, {keyA: 3}, {keyA: 7}, {keyA: 1}];
|
|
67
|
-
const maxPQ = MaxPriorityQueue.heapify<{keyA: number}>(nodes, (a, b) => b.keyA - a.keyA);
|
|
67
|
+
const maxPQ = MaxPriorityQueue.heapify<{ keyA: number }>(nodes, (a, b) => b.keyA - a.keyA);
|
|
68
68
|
|
|
69
69
|
expect(maxPQ.poll()?.keyA).toBe(7);
|
|
70
70
|
expect(maxPQ.poll()?.keyA).toBe(5);
|
package/test/utils/big-o.ts
CHANGED
|
@@ -26,7 +26,7 @@ export const bigO = {
|
|
|
26
26
|
|
|
27
27
|
function findPotentialN(input: any): number {
|
|
28
28
|
let longestArray: any[] = [];
|
|
29
|
-
let mostProperties: {[key: string]: any} = {};
|
|
29
|
+
let mostProperties: { [key: string]: any } = {};
|
|
30
30
|
|
|
31
31
|
function recurse(obj: any) {
|
|
32
32
|
if (Array.isArray(obj)) {
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"allowJs": true,
|
|
4
|
+
"allowSyntheticDefaultImports": true,
|
|
5
|
+
"baseUrl": "src",
|
|
6
|
+
"declaration": true,
|
|
7
|
+
"esModuleInterop": true,
|
|
8
|
+
"inlineSourceMap": false,
|
|
9
|
+
"lib": ["esnext"],
|
|
10
|
+
"listEmittedFiles": false,
|
|
11
|
+
"listFiles": false,
|
|
12
|
+
"moduleResolution": "node",
|
|
13
|
+
"noFallthroughCasesInSwitch": true,
|
|
14
|
+
"pretty": true,
|
|
15
|
+
"resolveJsonModule": true,
|
|
16
|
+
"rootDir": "src",
|
|
17
|
+
"skipLibCheck": true,
|
|
18
|
+
"strict": true,
|
|
19
|
+
"traceResolution": false,
|
|
20
|
+
"types": ["node", "jest"]
|
|
21
|
+
},
|
|
22
|
+
"compileOnSave": false,
|
|
23
|
+
"exclude": ["node_modules", "dist"],
|
|
24
|
+
"include": [
|
|
25
|
+
"./src/**/*.ts", // Include your .ts files
|
|
26
|
+
]
|
|
27
|
+
}
|