data-structure-typed 1.41.5 → 1.41.7
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/CHANGELOG.md +1 -1
- package/README.md +15 -535
- package/benchmark/report.html +14 -12
- package/benchmark/report.json +113 -113
- package/dist/cjs/{data-structures → src/data-structures}/binary-tree/avl-tree.d.ts +1 -1
- package/dist/cjs/{data-structures → src/data-structures}/binary-tree/avl-tree.js +2 -2
- package/dist/cjs/src/data-structures/binary-tree/avl-tree.js.map +1 -0
- package/dist/cjs/src/data-structures/binary-tree/binary-indexed-tree.js.map +1 -0
- package/dist/cjs/{data-structures → src/data-structures}/binary-tree/binary-tree.d.ts +4 -3
- package/dist/cjs/{data-structures → src/data-structures}/binary-tree/binary-tree.js +19 -18
- package/dist/cjs/src/data-structures/binary-tree/binary-tree.js.map +1 -0
- package/dist/{mjs → cjs/src}/data-structures/binary-tree/bst.d.ts +1 -20
- package/dist/cjs/{data-structures → src/data-structures}/binary-tree/bst.js +5 -27
- package/dist/cjs/src/data-structures/binary-tree/bst.js.map +1 -0
- package/dist/cjs/src/data-structures/binary-tree/index.js.map +1 -0
- package/dist/cjs/src/data-structures/binary-tree/rb-tree.js.map +1 -0
- package/dist/cjs/src/data-structures/binary-tree/segment-tree.js.map +1 -0
- package/dist/{mjs → cjs/src}/data-structures/binary-tree/tree-multiset.d.ts +1 -1
- package/dist/cjs/{data-structures → src/data-structures}/binary-tree/tree-multiset.js +2 -2
- package/dist/cjs/src/data-structures/binary-tree/tree-multiset.js.map +1 -0
- package/dist/cjs/{data-structures → src/data-structures}/graph/abstract-graph.js +5 -5
- package/dist/cjs/src/data-structures/graph/abstract-graph.js.map +1 -0
- package/dist/cjs/src/data-structures/graph/directed-graph.js.map +1 -0
- package/dist/cjs/src/data-structures/graph/index.js.map +1 -0
- package/dist/cjs/src/data-structures/graph/map-graph.js.map +1 -0
- package/dist/cjs/src/data-structures/graph/undirected-graph.js.map +1 -0
- package/dist/cjs/src/data-structures/hash/coordinate-map.js.map +1 -0
- package/dist/cjs/src/data-structures/hash/coordinate-set.js.map +1 -0
- package/dist/cjs/src/data-structures/hash/hash-map.js.map +1 -0
- package/dist/cjs/src/data-structures/hash/hash-table.js.map +1 -0
- package/dist/cjs/src/data-structures/hash/index.js.map +1 -0
- package/dist/cjs/src/data-structures/hash/tree-map.js.map +1 -0
- package/dist/cjs/src/data-structures/hash/tree-set.js.map +1 -0
- package/dist/cjs/src/data-structures/heap/heap.js.map +1 -0
- package/dist/cjs/src/data-structures/heap/index.js.map +1 -0
- package/dist/cjs/src/data-structures/heap/max-heap.js.map +1 -0
- package/dist/cjs/src/data-structures/heap/min-heap.js.map +1 -0
- package/dist/cjs/src/data-structures/index.js.map +1 -0
- package/dist/cjs/src/data-structures/linked-list/doubly-linked-list.js.map +1 -0
- package/dist/cjs/src/data-structures/linked-list/index.js.map +1 -0
- package/dist/cjs/src/data-structures/linked-list/singly-linked-list.js.map +1 -0
- package/dist/cjs/src/data-structures/linked-list/skip-linked-list.js.map +1 -0
- package/dist/cjs/src/data-structures/matrix/index.js.map +1 -0
- package/dist/cjs/src/data-structures/matrix/matrix.js.map +1 -0
- package/dist/cjs/src/data-structures/matrix/matrix2d.js.map +1 -0
- package/dist/cjs/src/data-structures/matrix/navigator.js.map +1 -0
- package/dist/cjs/src/data-structures/matrix/vector2d.js.map +1 -0
- package/dist/cjs/src/data-structures/priority-queue/index.js.map +1 -0
- package/dist/cjs/src/data-structures/priority-queue/max-priority-queue.js.map +1 -0
- package/dist/cjs/src/data-structures/priority-queue/min-priority-queue.js.map +1 -0
- package/dist/cjs/src/data-structures/priority-queue/priority-queue.js.map +1 -0
- package/dist/cjs/src/data-structures/queue/deque.js.map +1 -0
- package/dist/cjs/src/data-structures/queue/index.js.map +1 -0
- package/dist/cjs/src/data-structures/queue/queue.js.map +1 -0
- package/dist/cjs/src/data-structures/stack/index.js.map +1 -0
- package/dist/cjs/src/data-structures/stack/stack.js.map +1 -0
- package/dist/cjs/src/data-structures/tree/index.js.map +1 -0
- package/dist/cjs/src/data-structures/tree/tree.js.map +1 -0
- package/dist/cjs/src/data-structures/trie/index.js.map +1 -0
- package/dist/cjs/src/data-structures/trie/trie.js.map +1 -0
- package/dist/cjs/src/index.js.map +1 -0
- package/dist/cjs/src/interfaces/binary-tree.js.map +1 -0
- package/dist/cjs/src/interfaces/doubly-linked-list.js.map +1 -0
- package/dist/cjs/{interfaces → src/interfaces}/graph.js.map +1 -1
- package/dist/cjs/{interfaces → src/interfaces}/heap.js.map +1 -1
- package/dist/cjs/src/interfaces/index.js.map +1 -0
- package/dist/cjs/src/interfaces/navigator.js.map +1 -0
- package/dist/cjs/src/interfaces/priority-queue.js.map +1 -0
- package/dist/cjs/src/interfaces/segment-tree.js.map +1 -0
- package/dist/cjs/src/interfaces/singly-linked-list.js.map +1 -0
- package/dist/cjs/src/types/data-structures/binary-tree/avl-tree.js.map +1 -0
- package/dist/cjs/src/types/data-structures/binary-tree/binary-indexed-tree.js.map +1 -0
- package/dist/cjs/src/types/data-structures/binary-tree/binary-tree.js.map +1 -0
- package/dist/cjs/src/types/data-structures/binary-tree/bst.js.map +1 -0
- package/dist/cjs/src/types/data-structures/binary-tree/index.js.map +1 -0
- package/dist/cjs/src/types/data-structures/binary-tree/rb-tree.js.map +1 -0
- package/dist/cjs/src/types/data-structures/binary-tree/segment-tree.js.map +1 -0
- package/dist/cjs/src/types/data-structures/binary-tree/tree-multiset.js.map +1 -0
- package/dist/cjs/src/types/data-structures/graph/abstract-graph.js.map +1 -0
- package/dist/cjs/src/types/data-structures/graph/directed-graph.js.map +1 -0
- package/dist/cjs/src/types/data-structures/graph/index.js.map +1 -0
- package/dist/cjs/src/types/data-structures/graph/map-graph.js.map +1 -0
- package/dist/cjs/src/types/data-structures/graph/undirected-graph.js.map +1 -0
- package/dist/cjs/src/types/data-structures/hash/coordinate-map.js.map +1 -0
- package/dist/cjs/src/types/data-structures/hash/coordinate-set.js.map +1 -0
- package/dist/cjs/src/types/data-structures/hash/hash-map.js.map +1 -0
- package/dist/cjs/src/types/data-structures/hash/hash-table.js.map +1 -0
- package/dist/cjs/src/types/data-structures/hash/index.js.map +1 -0
- package/dist/cjs/src/types/data-structures/hash/tree-map.js.map +1 -0
- package/dist/cjs/src/types/data-structures/hash/tree-set.js.map +1 -0
- package/dist/cjs/src/types/data-structures/heap/heap.js.map +1 -0
- package/dist/cjs/src/types/data-structures/heap/index.js.map +1 -0
- package/dist/cjs/src/types/data-structures/heap/max-heap.js.map +1 -0
- package/dist/cjs/src/types/data-structures/heap/min-heap.js.map +1 -0
- package/dist/cjs/src/types/data-structures/index.js.map +1 -0
- package/dist/cjs/src/types/data-structures/linked-list/doubly-linked-list.js.map +1 -0
- package/dist/cjs/src/types/data-structures/linked-list/index.js.map +1 -0
- package/dist/cjs/src/types/data-structures/linked-list/singly-linked-list.js.map +1 -0
- package/dist/cjs/src/types/data-structures/linked-list/skip-linked-list.js.map +1 -0
- package/dist/cjs/src/types/data-structures/matrix/index.js.map +1 -0
- package/dist/cjs/src/types/data-structures/matrix/matrix.js.map +1 -0
- package/dist/cjs/src/types/data-structures/matrix/matrix2d.js.map +1 -0
- package/dist/cjs/src/types/data-structures/matrix/navigator.js.map +1 -0
- package/dist/cjs/src/types/data-structures/matrix/vector2d.js.map +1 -0
- package/dist/cjs/src/types/data-structures/priority-queue/index.js.map +1 -0
- package/dist/cjs/src/types/data-structures/priority-queue/max-priority-queue.js.map +1 -0
- package/dist/cjs/src/types/data-structures/priority-queue/min-priority-queue.js.map +1 -0
- package/dist/cjs/src/types/data-structures/priority-queue/priority-queue.js.map +1 -0
- package/dist/cjs/src/types/data-structures/queue/deque.js.map +1 -0
- package/dist/cjs/src/types/data-structures/queue/index.js.map +1 -0
- package/dist/cjs/src/types/data-structures/queue/queue.js.map +1 -0
- package/dist/cjs/src/types/data-structures/stack/index.js.map +1 -0
- package/dist/cjs/src/types/data-structures/stack/stack.js.map +1 -0
- package/dist/cjs/src/types/data-structures/tree/index.js.map +1 -0
- package/dist/cjs/src/types/data-structures/tree/tree.js.map +1 -0
- package/dist/cjs/src/types/data-structures/trie/index.js.map +1 -0
- package/dist/cjs/src/types/data-structures/trie/trie.js.map +1 -0
- package/dist/cjs/src/types/helpers.js.map +1 -0
- package/dist/cjs/src/types/index.js.map +1 -0
- package/dist/cjs/src/types/utils/index.js.map +1 -0
- package/dist/cjs/{types → src/types}/utils/utils.js.map +1 -1
- package/dist/cjs/src/types/utils/validate-type.js.map +1 -0
- package/dist/cjs/src/utils/index.js.map +1 -0
- package/dist/cjs/src/utils/utils.js.map +1 -0
- package/dist/mjs/{data-structures → src/data-structures}/binary-tree/avl-tree.d.ts +1 -1
- package/dist/mjs/{data-structures → src/data-structures}/binary-tree/avl-tree.js +2 -2
- package/dist/mjs/{data-structures → src/data-structures}/binary-tree/binary-tree.d.ts +4 -3
- package/dist/mjs/{data-structures → src/data-structures}/binary-tree/binary-tree.js +19 -18
- package/dist/{cjs → mjs/src}/data-structures/binary-tree/bst.d.ts +1 -20
- package/dist/mjs/{data-structures → src/data-structures}/binary-tree/bst.js +5 -26
- package/dist/{cjs → mjs/src}/data-structures/binary-tree/tree-multiset.d.ts +1 -1
- package/dist/mjs/{data-structures → src/data-structures}/binary-tree/tree-multiset.js +2 -2
- package/dist/mjs/{data-structures → src/data-structures}/graph/abstract-graph.js +5 -5
- package/dist/umd/data-structure-typed.min.js +1 -1
- package/dist/umd/data-structure-typed.min.js.map +1 -1
- package/package.json +12 -12
- package/src/data-structures/binary-tree/avl-tree.ts +2 -2
- package/src/data-structures/binary-tree/binary-tree.ts +20 -18
- package/src/data-structures/binary-tree/bst.ts +6 -33
- package/src/data-structures/binary-tree/tree-multiset.ts +2 -2
- package/src/data-structures/graph/abstract-graph.ts +6 -6
- package/test/performance/reportor.ts +23 -20
- package/test/unit/data-structures/graph/salty-edges.json +1 -0
- package/test/unit/data-structures/graph/salty-vertexes.json +1 -0
- package/test/unit/data-structures/graph/undirected-graph.test.ts +19 -0
- package/tsconfig-base.json +20 -24
- package/tsconfig-cjs.json +5 -1
- package/tsconfig-mjs.json +12 -0
- package/dist/cjs/data-structures/binary-tree/avl-tree.js.map +0 -1
- package/dist/cjs/data-structures/binary-tree/binary-indexed-tree.js.map +0 -1
- package/dist/cjs/data-structures/binary-tree/binary-tree.js.map +0 -1
- package/dist/cjs/data-structures/binary-tree/bst.js.map +0 -1
- package/dist/cjs/data-structures/binary-tree/index.js.map +0 -1
- package/dist/cjs/data-structures/binary-tree/rb-tree.js.map +0 -1
- package/dist/cjs/data-structures/binary-tree/segment-tree.js.map +0 -1
- package/dist/cjs/data-structures/binary-tree/tree-multiset.js.map +0 -1
- package/dist/cjs/data-structures/graph/abstract-graph.js.map +0 -1
- package/dist/cjs/data-structures/graph/directed-graph.js.map +0 -1
- package/dist/cjs/data-structures/graph/index.js.map +0 -1
- package/dist/cjs/data-structures/graph/map-graph.js.map +0 -1
- package/dist/cjs/data-structures/graph/undirected-graph.js.map +0 -1
- package/dist/cjs/data-structures/hash/coordinate-map.js.map +0 -1
- package/dist/cjs/data-structures/hash/coordinate-set.js.map +0 -1
- package/dist/cjs/data-structures/hash/hash-map.js.map +0 -1
- package/dist/cjs/data-structures/hash/hash-table.js.map +0 -1
- package/dist/cjs/data-structures/hash/index.js.map +0 -1
- package/dist/cjs/data-structures/hash/tree-map.js.map +0 -1
- package/dist/cjs/data-structures/hash/tree-set.js.map +0 -1
- package/dist/cjs/data-structures/heap/heap.js.map +0 -1
- package/dist/cjs/data-structures/heap/index.js.map +0 -1
- package/dist/cjs/data-structures/heap/max-heap.js.map +0 -1
- package/dist/cjs/data-structures/heap/min-heap.js.map +0 -1
- package/dist/cjs/data-structures/index.js.map +0 -1
- package/dist/cjs/data-structures/linked-list/doubly-linked-list.js.map +0 -1
- package/dist/cjs/data-structures/linked-list/index.js.map +0 -1
- package/dist/cjs/data-structures/linked-list/singly-linked-list.js.map +0 -1
- package/dist/cjs/data-structures/linked-list/skip-linked-list.js.map +0 -1
- package/dist/cjs/data-structures/matrix/index.js.map +0 -1
- package/dist/cjs/data-structures/matrix/matrix.js.map +0 -1
- package/dist/cjs/data-structures/matrix/matrix2d.js.map +0 -1
- package/dist/cjs/data-structures/matrix/navigator.js.map +0 -1
- package/dist/cjs/data-structures/matrix/vector2d.js.map +0 -1
- package/dist/cjs/data-structures/priority-queue/index.js.map +0 -1
- package/dist/cjs/data-structures/priority-queue/max-priority-queue.js.map +0 -1
- package/dist/cjs/data-structures/priority-queue/min-priority-queue.js.map +0 -1
- package/dist/cjs/data-structures/priority-queue/priority-queue.js.map +0 -1
- package/dist/cjs/data-structures/queue/deque.js.map +0 -1
- package/dist/cjs/data-structures/queue/index.js.map +0 -1
- package/dist/cjs/data-structures/queue/queue.js.map +0 -1
- package/dist/cjs/data-structures/stack/index.js.map +0 -1
- package/dist/cjs/data-structures/stack/stack.js.map +0 -1
- package/dist/cjs/data-structures/tree/index.js.map +0 -1
- package/dist/cjs/data-structures/tree/tree.js.map +0 -1
- package/dist/cjs/data-structures/trie/index.js.map +0 -1
- package/dist/cjs/data-structures/trie/trie.js.map +0 -1
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/interfaces/binary-tree.js.map +0 -1
- package/dist/cjs/interfaces/doubly-linked-list.js.map +0 -1
- package/dist/cjs/interfaces/index.js.map +0 -1
- package/dist/cjs/interfaces/navigator.js.map +0 -1
- package/dist/cjs/interfaces/priority-queue.js.map +0 -1
- package/dist/cjs/interfaces/segment-tree.js.map +0 -1
- package/dist/cjs/interfaces/singly-linked-list.js.map +0 -1
- package/dist/cjs/types/data-structures/binary-tree/avl-tree.js.map +0 -1
- package/dist/cjs/types/data-structures/binary-tree/binary-indexed-tree.js.map +0 -1
- package/dist/cjs/types/data-structures/binary-tree/binary-tree.js.map +0 -1
- package/dist/cjs/types/data-structures/binary-tree/bst.js.map +0 -1
- package/dist/cjs/types/data-structures/binary-tree/index.js.map +0 -1
- package/dist/cjs/types/data-structures/binary-tree/rb-tree.js.map +0 -1
- package/dist/cjs/types/data-structures/binary-tree/segment-tree.js.map +0 -1
- package/dist/cjs/types/data-structures/binary-tree/tree-multiset.js.map +0 -1
- package/dist/cjs/types/data-structures/graph/abstract-graph.js.map +0 -1
- package/dist/cjs/types/data-structures/graph/directed-graph.js.map +0 -1
- package/dist/cjs/types/data-structures/graph/index.js.map +0 -1
- package/dist/cjs/types/data-structures/graph/map-graph.js.map +0 -1
- package/dist/cjs/types/data-structures/graph/undirected-graph.js.map +0 -1
- package/dist/cjs/types/data-structures/hash/coordinate-map.js.map +0 -1
- package/dist/cjs/types/data-structures/hash/coordinate-set.js.map +0 -1
- package/dist/cjs/types/data-structures/hash/hash-map.js.map +0 -1
- package/dist/cjs/types/data-structures/hash/hash-table.js.map +0 -1
- package/dist/cjs/types/data-structures/hash/index.js.map +0 -1
- package/dist/cjs/types/data-structures/hash/tree-map.js.map +0 -1
- package/dist/cjs/types/data-structures/hash/tree-set.js.map +0 -1
- package/dist/cjs/types/data-structures/heap/heap.js.map +0 -1
- package/dist/cjs/types/data-structures/heap/index.js.map +0 -1
- package/dist/cjs/types/data-structures/heap/max-heap.js.map +0 -1
- package/dist/cjs/types/data-structures/heap/min-heap.js.map +0 -1
- package/dist/cjs/types/data-structures/index.js.map +0 -1
- package/dist/cjs/types/data-structures/linked-list/doubly-linked-list.js.map +0 -1
- package/dist/cjs/types/data-structures/linked-list/index.js.map +0 -1
- package/dist/cjs/types/data-structures/linked-list/singly-linked-list.js.map +0 -1
- package/dist/cjs/types/data-structures/linked-list/skip-linked-list.js.map +0 -1
- package/dist/cjs/types/data-structures/matrix/index.js.map +0 -1
- package/dist/cjs/types/data-structures/matrix/matrix.js.map +0 -1
- package/dist/cjs/types/data-structures/matrix/matrix2d.js.map +0 -1
- package/dist/cjs/types/data-structures/matrix/navigator.js.map +0 -1
- package/dist/cjs/types/data-structures/matrix/vector2d.js.map +0 -1
- package/dist/cjs/types/data-structures/priority-queue/index.js.map +0 -1
- package/dist/cjs/types/data-structures/priority-queue/max-priority-queue.js.map +0 -1
- package/dist/cjs/types/data-structures/priority-queue/min-priority-queue.js.map +0 -1
- package/dist/cjs/types/data-structures/priority-queue/priority-queue.js.map +0 -1
- package/dist/cjs/types/data-structures/queue/deque.js.map +0 -1
- package/dist/cjs/types/data-structures/queue/index.js.map +0 -1
- package/dist/cjs/types/data-structures/queue/queue.js.map +0 -1
- package/dist/cjs/types/data-structures/stack/index.js.map +0 -1
- package/dist/cjs/types/data-structures/stack/stack.js.map +0 -1
- package/dist/cjs/types/data-structures/tree/index.js.map +0 -1
- package/dist/cjs/types/data-structures/tree/tree.js.map +0 -1
- package/dist/cjs/types/data-structures/trie/index.js.map +0 -1
- package/dist/cjs/types/data-structures/trie/trie.js.map +0 -1
- package/dist/cjs/types/helpers.js.map +0 -1
- package/dist/cjs/types/index.js.map +0 -1
- package/dist/cjs/types/utils/index.js.map +0 -1
- package/dist/cjs/types/utils/validate-type.js.map +0 -1
- package/dist/cjs/utils/index.js.map +0 -1
- package/dist/cjs/utils/utils.js.map +0 -1
- package/umd/bundle.min.js +0 -3
- package/umd/bundle.min.js.LICENSE.txt +0 -28
- package/umd/bundle.min.js.map +0 -1
- /package/dist/cjs/{data-structures → src/data-structures}/binary-tree/binary-indexed-tree.d.ts +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/binary-tree/binary-indexed-tree.js +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/binary-tree/index.d.ts +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/binary-tree/index.js +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/binary-tree/rb-tree.d.ts +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/binary-tree/rb-tree.js +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/binary-tree/segment-tree.d.ts +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/binary-tree/segment-tree.js +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/graph/abstract-graph.d.ts +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/graph/directed-graph.d.ts +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/graph/directed-graph.js +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/graph/index.d.ts +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/graph/index.js +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/graph/map-graph.d.ts +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/graph/map-graph.js +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/graph/undirected-graph.d.ts +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/graph/undirected-graph.js +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/hash/coordinate-map.d.ts +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/hash/coordinate-map.js +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/hash/coordinate-set.d.ts +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/hash/coordinate-set.js +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/hash/hash-map.d.ts +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/hash/hash-map.js +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/hash/hash-table.d.ts +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/hash/hash-table.js +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/hash/index.d.ts +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/hash/index.js +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/hash/tree-map.d.ts +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/hash/tree-map.js +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/hash/tree-set.d.ts +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/hash/tree-set.js +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/heap/heap.d.ts +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/heap/heap.js +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/heap/index.d.ts +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/heap/index.js +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/heap/max-heap.d.ts +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/heap/max-heap.js +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/heap/min-heap.d.ts +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/heap/min-heap.js +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/index.d.ts +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/index.js +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/linked-list/doubly-linked-list.d.ts +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/linked-list/doubly-linked-list.js +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/linked-list/index.d.ts +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/linked-list/index.js +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/linked-list/singly-linked-list.d.ts +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/linked-list/singly-linked-list.js +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/linked-list/skip-linked-list.d.ts +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/linked-list/skip-linked-list.js +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/matrix/index.d.ts +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/matrix/index.js +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/matrix/matrix.d.ts +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/matrix/matrix.js +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/matrix/matrix2d.d.ts +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/matrix/matrix2d.js +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/matrix/navigator.d.ts +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/matrix/navigator.js +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/matrix/vector2d.d.ts +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/matrix/vector2d.js +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/priority-queue/index.d.ts +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/priority-queue/index.js +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/priority-queue/max-priority-queue.d.ts +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/priority-queue/max-priority-queue.js +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/priority-queue/min-priority-queue.d.ts +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/priority-queue/min-priority-queue.js +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/priority-queue/priority-queue.d.ts +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/priority-queue/priority-queue.js +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/queue/deque.d.ts +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/queue/deque.js +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/queue/index.d.ts +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/queue/index.js +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/queue/queue.d.ts +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/queue/queue.js +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/stack/index.d.ts +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/stack/index.js +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/stack/stack.d.ts +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/stack/stack.js +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/tree/index.d.ts +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/tree/index.js +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/tree/tree.d.ts +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/tree/tree.js +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/trie/index.d.ts +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/trie/index.js +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/trie/trie.d.ts +0 -0
- /package/dist/cjs/{data-structures → src/data-structures}/trie/trie.js +0 -0
- /package/dist/cjs/{index.d.ts → src/index.d.ts} +0 -0
- /package/dist/cjs/{index.js → src/index.js} +0 -0
- /package/dist/cjs/{interfaces → src/interfaces}/binary-tree.d.ts +0 -0
- /package/dist/cjs/{interfaces → src/interfaces}/binary-tree.js +0 -0
- /package/dist/cjs/{interfaces → src/interfaces}/doubly-linked-list.d.ts +0 -0
- /package/dist/cjs/{interfaces → src/interfaces}/doubly-linked-list.js +0 -0
- /package/dist/cjs/{interfaces → src/interfaces}/graph.d.ts +0 -0
- /package/dist/cjs/{interfaces → src/interfaces}/graph.js +0 -0
- /package/dist/cjs/{interfaces → src/interfaces}/heap.d.ts +0 -0
- /package/dist/cjs/{interfaces → src/interfaces}/heap.js +0 -0
- /package/dist/cjs/{interfaces → src/interfaces}/index.d.ts +0 -0
- /package/dist/cjs/{interfaces → src/interfaces}/index.js +0 -0
- /package/dist/cjs/{interfaces → src/interfaces}/navigator.d.ts +0 -0
- /package/dist/cjs/{interfaces → src/interfaces}/navigator.js +0 -0
- /package/dist/cjs/{interfaces → src/interfaces}/priority-queue.d.ts +0 -0
- /package/dist/cjs/{interfaces → src/interfaces}/priority-queue.js +0 -0
- /package/dist/cjs/{interfaces → src/interfaces}/segment-tree.d.ts +0 -0
- /package/dist/cjs/{interfaces → src/interfaces}/segment-tree.js +0 -0
- /package/dist/cjs/{interfaces → src/interfaces}/singly-linked-list.d.ts +0 -0
- /package/dist/cjs/{interfaces → src/interfaces}/singly-linked-list.js +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/binary-tree/avl-tree.d.ts +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/binary-tree/avl-tree.js +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/binary-tree/binary-indexed-tree.d.ts +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/binary-tree/binary-indexed-tree.js +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/binary-tree/binary-tree.d.ts +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/binary-tree/binary-tree.js +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/binary-tree/bst.d.ts +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/binary-tree/bst.js +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/binary-tree/index.d.ts +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/binary-tree/index.js +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/binary-tree/rb-tree.d.ts +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/binary-tree/rb-tree.js +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/binary-tree/segment-tree.d.ts +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/binary-tree/segment-tree.js +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/binary-tree/tree-multiset.d.ts +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/binary-tree/tree-multiset.js +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/graph/abstract-graph.d.ts +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/graph/abstract-graph.js +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/graph/directed-graph.d.ts +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/graph/directed-graph.js +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/graph/index.d.ts +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/graph/index.js +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/graph/map-graph.d.ts +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/graph/map-graph.js +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/graph/undirected-graph.d.ts +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/graph/undirected-graph.js +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/hash/coordinate-map.d.ts +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/hash/coordinate-map.js +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/hash/coordinate-set.d.ts +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/hash/coordinate-set.js +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/hash/hash-map.d.ts +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/hash/hash-map.js +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/hash/hash-table.d.ts +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/hash/hash-table.js +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/hash/index.d.ts +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/hash/index.js +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/hash/tree-map.d.ts +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/hash/tree-map.js +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/hash/tree-set.d.ts +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/hash/tree-set.js +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/heap/heap.d.ts +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/heap/heap.js +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/heap/index.d.ts +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/heap/index.js +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/heap/max-heap.d.ts +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/heap/max-heap.js +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/heap/min-heap.d.ts +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/heap/min-heap.js +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/index.d.ts +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/index.js +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/linked-list/doubly-linked-list.d.ts +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/linked-list/doubly-linked-list.js +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/linked-list/index.d.ts +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/linked-list/index.js +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/linked-list/singly-linked-list.d.ts +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/linked-list/singly-linked-list.js +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/linked-list/skip-linked-list.d.ts +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/linked-list/skip-linked-list.js +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/matrix/index.d.ts +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/matrix/index.js +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/matrix/matrix.d.ts +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/matrix/matrix.js +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/matrix/matrix2d.d.ts +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/matrix/matrix2d.js +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/matrix/navigator.d.ts +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/matrix/navigator.js +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/matrix/vector2d.d.ts +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/matrix/vector2d.js +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/priority-queue/index.d.ts +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/priority-queue/index.js +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/priority-queue/max-priority-queue.d.ts +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/priority-queue/max-priority-queue.js +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/priority-queue/min-priority-queue.d.ts +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/priority-queue/min-priority-queue.js +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/priority-queue/priority-queue.d.ts +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/priority-queue/priority-queue.js +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/queue/deque.d.ts +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/queue/deque.js +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/queue/index.d.ts +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/queue/index.js +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/queue/queue.d.ts +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/queue/queue.js +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/stack/index.d.ts +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/stack/index.js +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/stack/stack.d.ts +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/stack/stack.js +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/tree/index.d.ts +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/tree/index.js +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/tree/tree.d.ts +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/tree/tree.js +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/trie/index.d.ts +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/trie/index.js +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/trie/trie.d.ts +0 -0
- /package/dist/cjs/{types → src/types}/data-structures/trie/trie.js +0 -0
- /package/dist/cjs/{types → src/types}/helpers.d.ts +0 -0
- /package/dist/cjs/{types → src/types}/helpers.js +0 -0
- /package/dist/cjs/{types → src/types}/index.d.ts +0 -0
- /package/dist/cjs/{types → src/types}/index.js +0 -0
- /package/dist/cjs/{types → src/types}/utils/index.d.ts +0 -0
- /package/dist/cjs/{types → src/types}/utils/index.js +0 -0
- /package/dist/cjs/{types → src/types}/utils/utils.d.ts +0 -0
- /package/dist/cjs/{types → src/types}/utils/utils.js +0 -0
- /package/dist/cjs/{types → src/types}/utils/validate-type.d.ts +0 -0
- /package/dist/cjs/{types → src/types}/utils/validate-type.js +0 -0
- /package/dist/cjs/{utils → src/utils}/index.d.ts +0 -0
- /package/dist/cjs/{utils → src/utils}/index.js +0 -0
- /package/dist/cjs/{utils → src/utils}/utils.d.ts +0 -0
- /package/dist/cjs/{utils → src/utils}/utils.js +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/binary-tree/binary-indexed-tree.d.ts +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/binary-tree/binary-indexed-tree.js +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/binary-tree/index.d.ts +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/binary-tree/index.js +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/binary-tree/rb-tree.d.ts +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/binary-tree/rb-tree.js +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/binary-tree/segment-tree.d.ts +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/binary-tree/segment-tree.js +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/graph/abstract-graph.d.ts +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/graph/directed-graph.d.ts +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/graph/directed-graph.js +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/graph/index.d.ts +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/graph/index.js +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/graph/map-graph.d.ts +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/graph/map-graph.js +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/graph/undirected-graph.d.ts +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/graph/undirected-graph.js +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/hash/coordinate-map.d.ts +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/hash/coordinate-map.js +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/hash/coordinate-set.d.ts +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/hash/coordinate-set.js +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/hash/hash-map.d.ts +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/hash/hash-map.js +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/hash/hash-table.d.ts +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/hash/hash-table.js +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/hash/index.d.ts +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/hash/index.js +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/hash/tree-map.d.ts +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/hash/tree-map.js +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/hash/tree-set.d.ts +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/hash/tree-set.js +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/heap/heap.d.ts +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/heap/heap.js +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/heap/index.d.ts +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/heap/index.js +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/heap/max-heap.d.ts +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/heap/max-heap.js +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/heap/min-heap.d.ts +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/heap/min-heap.js +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/index.d.ts +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/index.js +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/linked-list/doubly-linked-list.d.ts +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/linked-list/doubly-linked-list.js +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/linked-list/index.d.ts +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/linked-list/index.js +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/linked-list/singly-linked-list.d.ts +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/linked-list/singly-linked-list.js +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/linked-list/skip-linked-list.d.ts +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/linked-list/skip-linked-list.js +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/matrix/index.d.ts +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/matrix/index.js +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/matrix/matrix.d.ts +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/matrix/matrix.js +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/matrix/matrix2d.d.ts +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/matrix/matrix2d.js +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/matrix/navigator.d.ts +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/matrix/navigator.js +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/matrix/vector2d.d.ts +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/matrix/vector2d.js +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/priority-queue/index.d.ts +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/priority-queue/index.js +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/priority-queue/max-priority-queue.d.ts +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/priority-queue/max-priority-queue.js +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/priority-queue/min-priority-queue.d.ts +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/priority-queue/min-priority-queue.js +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/priority-queue/priority-queue.d.ts +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/priority-queue/priority-queue.js +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/queue/deque.d.ts +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/queue/deque.js +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/queue/index.d.ts +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/queue/index.js +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/queue/queue.d.ts +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/queue/queue.js +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/stack/index.d.ts +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/stack/index.js +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/stack/stack.d.ts +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/stack/stack.js +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/tree/index.d.ts +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/tree/index.js +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/tree/tree.d.ts +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/tree/tree.js +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/trie/index.d.ts +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/trie/index.js +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/trie/trie.d.ts +0 -0
- /package/dist/mjs/{data-structures → src/data-structures}/trie/trie.js +0 -0
- /package/dist/mjs/{index.d.ts → src/index.d.ts} +0 -0
- /package/dist/mjs/{index.js → src/index.js} +0 -0
- /package/dist/mjs/{interfaces → src/interfaces}/binary-tree.d.ts +0 -0
- /package/dist/mjs/{interfaces → src/interfaces}/binary-tree.js +0 -0
- /package/dist/mjs/{interfaces → src/interfaces}/doubly-linked-list.d.ts +0 -0
- /package/dist/mjs/{interfaces → src/interfaces}/doubly-linked-list.js +0 -0
- /package/dist/mjs/{interfaces → src/interfaces}/graph.d.ts +0 -0
- /package/dist/mjs/{interfaces → src/interfaces}/graph.js +0 -0
- /package/dist/mjs/{interfaces → src/interfaces}/heap.d.ts +0 -0
- /package/dist/mjs/{interfaces → src/interfaces}/heap.js +0 -0
- /package/dist/mjs/{interfaces → src/interfaces}/index.d.ts +0 -0
- /package/dist/mjs/{interfaces → src/interfaces}/index.js +0 -0
- /package/dist/mjs/{interfaces → src/interfaces}/navigator.d.ts +0 -0
- /package/dist/mjs/{interfaces → src/interfaces}/navigator.js +0 -0
- /package/dist/mjs/{interfaces → src/interfaces}/priority-queue.d.ts +0 -0
- /package/dist/mjs/{interfaces → src/interfaces}/priority-queue.js +0 -0
- /package/dist/mjs/{interfaces → src/interfaces}/segment-tree.d.ts +0 -0
- /package/dist/mjs/{interfaces → src/interfaces}/segment-tree.js +0 -0
- /package/dist/mjs/{interfaces → src/interfaces}/singly-linked-list.d.ts +0 -0
- /package/dist/mjs/{interfaces → src/interfaces}/singly-linked-list.js +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/binary-tree/avl-tree.d.ts +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/binary-tree/avl-tree.js +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/binary-tree/binary-indexed-tree.d.ts +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/binary-tree/binary-indexed-tree.js +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/binary-tree/binary-tree.d.ts +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/binary-tree/binary-tree.js +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/binary-tree/bst.d.ts +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/binary-tree/bst.js +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/binary-tree/index.d.ts +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/binary-tree/index.js +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/binary-tree/rb-tree.d.ts +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/binary-tree/rb-tree.js +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/binary-tree/segment-tree.d.ts +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/binary-tree/segment-tree.js +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/binary-tree/tree-multiset.d.ts +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/binary-tree/tree-multiset.js +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/graph/abstract-graph.d.ts +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/graph/abstract-graph.js +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/graph/directed-graph.d.ts +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/graph/directed-graph.js +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/graph/index.d.ts +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/graph/index.js +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/graph/map-graph.d.ts +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/graph/map-graph.js +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/graph/undirected-graph.d.ts +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/graph/undirected-graph.js +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/hash/coordinate-map.d.ts +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/hash/coordinate-map.js +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/hash/coordinate-set.d.ts +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/hash/coordinate-set.js +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/hash/hash-map.d.ts +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/hash/hash-map.js +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/hash/hash-table.d.ts +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/hash/hash-table.js +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/hash/index.d.ts +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/hash/index.js +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/hash/tree-map.d.ts +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/hash/tree-map.js +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/hash/tree-set.d.ts +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/hash/tree-set.js +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/heap/heap.d.ts +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/heap/heap.js +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/heap/index.d.ts +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/heap/index.js +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/heap/max-heap.d.ts +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/heap/max-heap.js +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/heap/min-heap.d.ts +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/heap/min-heap.js +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/index.d.ts +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/index.js +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/linked-list/doubly-linked-list.d.ts +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/linked-list/doubly-linked-list.js +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/linked-list/index.d.ts +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/linked-list/index.js +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/linked-list/singly-linked-list.d.ts +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/linked-list/singly-linked-list.js +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/linked-list/skip-linked-list.d.ts +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/linked-list/skip-linked-list.js +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/matrix/index.d.ts +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/matrix/index.js +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/matrix/matrix.d.ts +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/matrix/matrix.js +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/matrix/matrix2d.d.ts +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/matrix/matrix2d.js +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/matrix/navigator.d.ts +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/matrix/navigator.js +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/matrix/vector2d.d.ts +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/matrix/vector2d.js +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/priority-queue/index.d.ts +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/priority-queue/index.js +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/priority-queue/max-priority-queue.d.ts +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/priority-queue/max-priority-queue.js +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/priority-queue/min-priority-queue.d.ts +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/priority-queue/min-priority-queue.js +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/priority-queue/priority-queue.d.ts +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/priority-queue/priority-queue.js +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/queue/deque.d.ts +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/queue/deque.js +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/queue/index.d.ts +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/queue/index.js +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/queue/queue.d.ts +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/queue/queue.js +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/stack/index.d.ts +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/stack/index.js +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/stack/stack.d.ts +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/stack/stack.js +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/tree/index.d.ts +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/tree/index.js +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/tree/tree.d.ts +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/tree/tree.js +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/trie/index.d.ts +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/trie/index.js +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/trie/trie.d.ts +0 -0
- /package/dist/mjs/{types → src/types}/data-structures/trie/trie.js +0 -0
- /package/dist/mjs/{types → src/types}/helpers.d.ts +0 -0
- /package/dist/mjs/{types → src/types}/helpers.js +0 -0
- /package/dist/mjs/{types → src/types}/index.d.ts +0 -0
- /package/dist/mjs/{types → src/types}/index.js +0 -0
- /package/dist/mjs/{types → src/types}/utils/index.d.ts +0 -0
- /package/dist/mjs/{types → src/types}/utils/index.js +0 -0
- /package/dist/mjs/{types → src/types}/utils/utils.d.ts +0 -0
- /package/dist/mjs/{types → src/types}/utils/utils.js +0 -0
- /package/dist/mjs/{types → src/types}/utils/validate-type.d.ts +0 -0
- /package/dist/mjs/{types → src/types}/utils/validate-type.js +0 -0
- /package/dist/mjs/{utils → src/utils}/index.d.ts +0 -0
- /package/dist/mjs/{utils → src/utils}/index.js +0 -0
- /package/dist/mjs/{utils → src/utils}/utils.d.ts +0 -0
- /package/dist/mjs/{utils → src/utils}/utils.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/utils/utils.ts"],"names":[],"mappings":";;;;;;;;;;;;AASO,MAAM,MAAM,GAAG;IACpB,OAAO,sCAAsC,CAAC,OAAO,CAAC,MAAM,EAAE,UAAU,CAAC;QACvE,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,EAChC,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC;QACrC,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IACxB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AANW,QAAA,MAAM,UAMjB;AAEK,MAAM,WAAW,GAAG,UAAa,KAAU,EAAE,SAA0D;IAC5G,IAAI,CAAC,GAAG,CAAC,CAAC,EACR,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IACjC,MAAM,MAAM,GAAG,EAAE,CAAC;IAElB,OAAO,EAAE,CAAC,GAAG,GAAG,EAAE;QAChB,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QACvB,IAAI,SAAS,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE;YAC9B,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACnB,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;YAC3C,GAAG,EAAE,CAAC;SACP;KACF;IAED,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAfW,QAAA,WAAW,eAetB;AAEW,QAAA,YAAY,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC;AAErC,MAAM,OAAO,GAAG,CAAC,SAAc,EAAE,EAAE;IACxC,OAAO,OAAO,SAAS,KAAK,UAAU,IAAI,SAAS,CAAC,SAAS,KAAK,oBAAY,CAAC;AACjF,CAAC,CAAC;AAFW,QAAA,OAAO,WAElB;AAEK,MAAM,OAAO,GAAG,CAAC,EAAa,EAAS,EAAE;IAC9C,MAAM,KAAK,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC;IACzB,KAAK,CAAC,SAAS,GAAG,oBAAY,CAAC;IAC/B,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAJW,QAAA,OAAO,WAIlB;AAEK,MAAM,UAAU,GAAG,CAAC,EAAS,EAAE,EAAE;IACtC,MAAM,IAAI,GAAG,CAAC,GAAG,IAA4B,EAAE,EAAE,CAAC,IAAA,eAAO,EAAC,GAAG,EAAE,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;IAE7E,OAAO,MAAM,CAAC,MAAM,CAClB,CAAC,GAAG,IAA4B,EAAE,EAAE;QAClC,IAAI,MAAM,GAAG,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC;QAEzB,OAAO,IAAA,eAAO,EAAC,MAAM,CAAC,IAAI,OAAO,MAAM,KAAK,UAAU,EAAE;YACtD,MAAM,GAAG,MAAM,EAAE,CAAC;SACnB;QAED,OAAO,MAAM,CAAC;IAChB,CAAC,EACD,EAAC,IAAI,EAAC,CACP,CAAC;AACJ,CAAC,CAAC;AAfW,QAAA,UAAU,cAerB;AAEK,MAAM,eAAe,GAAG,CAAC,EAAc,EAAE,EAAE;IAChD,MAAM,IAAI,GAAG,CAAC,GAAG,IAAiC,EAAE,EAAE,CAAC,IAAA,eAAO,EAAC,GAAG,EAAE,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;IAElF,OAAO,MAAM,CAAC,MAAM,CAClB,CAAO,GAAG,IAAiC,EAAE,EAAE;QAC7C,IAAI,MAAM,GAAG,MAAM,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC;QAE/B,OAAO,IAAA,eAAO,EAAC,MAAM,CAAC,IAAI,OAAO,MAAM,KAAK,UAAU,EAAE;YACtD,MAAM,GAAG,MAAM,MAAM,EAAE,CAAC;SACzB;QAED,OAAO,MAAM,CAAC;IAChB,CAAC,CAAA,EACD,EAAC,IAAI,EAAC,CACP,CAAC;AACJ,CAAC,CAAC;AAfW,QAAA,eAAe,mBAe1B;AAEK,MAAM,MAAM,GAAG,CAAC,KAAa,EAAU,EAAE;IAC9C,IAAI,KAAK,IAAI,CAAC,EAAE;QACd,OAAO,CAAC,CAAC;KACV;IACD,OAAO,CAAC,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;AACvC,CAAC,CAAC;AALW,QAAA,MAAM,UAKjB"}
|
|
@@ -50,7 +50,7 @@ export declare class AVLTree<V = any, N extends AVLTreeNode<V, N> = AVLTreeNode<
|
|
|
50
50
|
* @param callback - The `callback` parameter is a function that takes a node as input and returns a
|
|
51
51
|
* value. This value is compared with the `identifier` parameter to determine if the node should be
|
|
52
52
|
* included in the result. The `callback` parameter has a default value of
|
|
53
|
-
* `
|
|
53
|
+
* `this.defaultOneParamCallback`
|
|
54
54
|
* @returns The method is returning an array of `BinaryTreeDeletedResult<N>` objects.
|
|
55
55
|
*/
|
|
56
56
|
delete<C extends BTNCallback<N>>(identifier: ReturnType<C>, callback?: C): BinaryTreeDeletedResult<N>[];
|
|
@@ -63,10 +63,10 @@ class AVLTree extends bst_1.BST {
|
|
|
63
63
|
* @param callback - The `callback` parameter is a function that takes a node as input and returns a
|
|
64
64
|
* value. This value is compared with the `identifier` parameter to determine if the node should be
|
|
65
65
|
* included in the result. The `callback` parameter has a default value of
|
|
66
|
-
* `
|
|
66
|
+
* `this.defaultOneParamCallback`
|
|
67
67
|
* @returns The method is returning an array of `BinaryTreeDeletedResult<N>` objects.
|
|
68
68
|
*/
|
|
69
|
-
delete(identifier, callback =
|
|
69
|
+
delete(identifier, callback = this.defaultOneParamCallback) {
|
|
70
70
|
if (identifier instanceof AVLTreeNode)
|
|
71
71
|
callback = (node => node);
|
|
72
72
|
const deletedResults = super.delete(identifier, callback);
|
|
@@ -79,6 +79,7 @@ export declare class BinaryTree<V = any, N extends BinaryTreeNode<V, N> = Binary
|
|
|
79
79
|
* Get the number of nodes in the binary tree.
|
|
80
80
|
*/
|
|
81
81
|
get size(): number;
|
|
82
|
+
protected defaultOneParamCallback: (node: N) => number;
|
|
82
83
|
/**
|
|
83
84
|
* Creates a new instance of BinaryTreeNode with the given key and value.
|
|
84
85
|
* @param {BTNKey} key - The key for the new node.
|
|
@@ -257,7 +258,7 @@ export declare class BinaryTree<V = any, N extends BinaryTreeNode<V, N> = Binary
|
|
|
257
258
|
* function on each node according to a specified order pattern.
|
|
258
259
|
* @param callback - The `callback` parameter is a function that will be called on each node during
|
|
259
260
|
* the depth-first search traversal. It takes a node as input and returns a value. The default value
|
|
260
|
-
* is `
|
|
261
|
+
* is `this.defaultOneParamCallback`, which is a callback function defined elsewhere in the code.
|
|
261
262
|
* @param {DFSOrderPattern} [pattern=in] - The `pattern` parameter determines the order in which the
|
|
262
263
|
* nodes are visited during the depth-first search. There are three possible values for `pattern`:
|
|
263
264
|
* @param {N | null} beginRoot - The `beginRoot` parameter is the starting node for the depth-first
|
|
@@ -273,7 +274,7 @@ export declare class BinaryTree<V = any, N extends BinaryTreeNode<V, N> = Binary
|
|
|
273
274
|
* function on each node.
|
|
274
275
|
* @param callback - The `callback` parameter is a function that will be called for each node in the
|
|
275
276
|
* breadth-first search. It takes a node of type `N` as its argument and returns a value of type
|
|
276
|
-
* `ReturnType<BTNCallback<N>>`. The default value for this parameter is `
|
|
277
|
+
* `ReturnType<BTNCallback<N>>`. The default value for this parameter is `this.defaultOneParamCallback
|
|
277
278
|
* @param {N | null} beginRoot - The `beginRoot` parameter is the starting node for the breadth-first
|
|
278
279
|
* search. It determines from which node the search will begin. If `beginRoot` is `null`, the search
|
|
279
280
|
* will not be performed and an empty array will be returned.
|
|
@@ -317,7 +318,7 @@ export declare class BinaryTree<V = any, N extends BinaryTreeNode<V, N> = Binary
|
|
|
317
318
|
* algorithm and returns an array of values obtained by applying a callback function to each node.
|
|
318
319
|
* @param callback - The `callback` parameter is a function that will be called on each node in the
|
|
319
320
|
* tree. It takes a node of type `N` as input and returns a value of type `ReturnType<BTNCallback<N>>`. The
|
|
320
|
-
* default value for this parameter is `
|
|
321
|
+
* default value for this parameter is `this.defaultOneParamCallback`.
|
|
321
322
|
* @param {DFSOrderPattern} [pattern=in] - The `pattern` parameter in the `morris` function
|
|
322
323
|
* determines the order in which the nodes of a binary tree are traversed. It can have one of the
|
|
323
324
|
* following values:
|
|
@@ -121,6 +121,7 @@ class BinaryTree {
|
|
|
121
121
|
get size() {
|
|
122
122
|
return this._size;
|
|
123
123
|
}
|
|
124
|
+
defaultOneParamCallback = (node) => node.key;
|
|
124
125
|
/**
|
|
125
126
|
* Creates a new instance of BinaryTreeNode with the given key and value.
|
|
126
127
|
* @param {BTNKey} key - The key for the new node.
|
|
@@ -256,9 +257,9 @@ class BinaryTree {
|
|
|
256
257
|
* @param callback - The `callback` parameter is a function that takes a node as input and returns a
|
|
257
258
|
* value. This value is compared with the `identifier` parameter to determine if the node should be
|
|
258
259
|
* included in the result. The `callback` parameter has a default value of
|
|
259
|
-
* `
|
|
260
|
+
* `this.defaultOneParamCallback`, which
|
|
260
261
|
*/
|
|
261
|
-
delete(identifier, callback =
|
|
262
|
+
delete(identifier, callback = this.defaultOneParamCallback) {
|
|
262
263
|
const bstDeletedResult = [];
|
|
263
264
|
if (!this.root)
|
|
264
265
|
return bstDeletedResult;
|
|
@@ -448,7 +449,7 @@ class BinaryTree {
|
|
|
448
449
|
* @param callback - The `callback` parameter is a function that takes a node as input and returns a
|
|
449
450
|
* value. This value is compared with the `identifier` parameter to determine if the node should be
|
|
450
451
|
* included in the result. The `callback` parameter has a default value of
|
|
451
|
-
* `
|
|
452
|
+
* `this.defaultOneParamCallback`, which
|
|
452
453
|
* @param [onlyOne=false] - A boolean value indicating whether to stop searching after finding the
|
|
453
454
|
* first node that matches the identifier. If set to true, the function will return an array with
|
|
454
455
|
* only one element (or an empty array if no matching node is found). If set to false (default), the
|
|
@@ -460,7 +461,7 @@ class BinaryTree {
|
|
|
460
461
|
* traverse the binary tree. It can have two possible values:
|
|
461
462
|
* @returns The function `getNodes` returns an array of nodes (`N[]`).
|
|
462
463
|
*/
|
|
463
|
-
getNodes(identifier, callback =
|
|
464
|
+
getNodes(identifier, callback = this.defaultOneParamCallback, onlyOne = false, beginRoot = this.root, iterationType = this.iterationType) {
|
|
464
465
|
if (!beginRoot)
|
|
465
466
|
return [];
|
|
466
467
|
if (identifier instanceof BinaryTreeNode)
|
|
@@ -505,7 +506,7 @@ class BinaryTree {
|
|
|
505
506
|
* @param callback - The `callback` parameter is a function that is used to determine whether a node
|
|
506
507
|
* matches the desired criteria. It takes a node as input and returns a boolean value indicating
|
|
507
508
|
* whether the node matches the criteria or not. The default callback function
|
|
508
|
-
* `
|
|
509
|
+
* `this.defaultOneParamCallback` is used if no callback function is
|
|
509
510
|
* @param beginRoot - The `beginRoot` parameter is the starting point for the search. It specifies
|
|
510
511
|
* the node from which the search should begin. By default, it is set to `this.root`, which means the
|
|
511
512
|
* search will start from the root node of the binary tree. However, you can provide a different node
|
|
@@ -514,7 +515,7 @@ class BinaryTree {
|
|
|
514
515
|
* performed when searching for nodes in the binary tree. It can have one of the following values:
|
|
515
516
|
* @returns a boolean value.
|
|
516
517
|
*/
|
|
517
|
-
has(identifier, callback =
|
|
518
|
+
has(identifier, callback = this.defaultOneParamCallback, beginRoot = this.root, iterationType = this.iterationType) {
|
|
518
519
|
if (identifier instanceof BinaryTreeNode)
|
|
519
520
|
callback = (node => node);
|
|
520
521
|
return this.getNodes(identifier, callback, true, beginRoot, iterationType).length > 0;
|
|
@@ -527,14 +528,14 @@ class BinaryTree {
|
|
|
527
528
|
* @param callback - The `callback` parameter is a function that is used to determine whether a node
|
|
528
529
|
* matches the desired criteria. It takes a node as input and returns a boolean value indicating
|
|
529
530
|
* whether the node matches the criteria or not. The default callback function
|
|
530
|
-
* (`
|
|
531
|
+
* (`this.defaultOneParamCallback`) is used if no callback function is
|
|
531
532
|
* @param beginRoot - The `beginRoot` parameter is the starting point for the search. It specifies
|
|
532
533
|
* the root node from which the search should begin.
|
|
533
534
|
* @param iterationType - The `iterationType` parameter specifies the type of iteration to be
|
|
534
535
|
* performed when searching for a node in the binary tree. It can have one of the following values:
|
|
535
536
|
* @returns either the found node (of type N) or null if no node is found.
|
|
536
537
|
*/
|
|
537
|
-
getNode(identifier, callback =
|
|
538
|
+
getNode(identifier, callback = this.defaultOneParamCallback, beginRoot = this.root, iterationType = this.iterationType) {
|
|
538
539
|
if (identifier instanceof BinaryTreeNode)
|
|
539
540
|
callback = (node => node);
|
|
540
541
|
return this.getNodes(identifier, callback, true, beginRoot, iterationType)[0] ?? null;
|
|
@@ -547,14 +548,14 @@ class BinaryTree {
|
|
|
547
548
|
* @param callback - The `callback` parameter is a function that is used to determine whether a node
|
|
548
549
|
* matches the desired criteria. It takes a node as input and returns a boolean value indicating
|
|
549
550
|
* whether the node matches the criteria or not. The default callback function
|
|
550
|
-
* (`
|
|
551
|
+
* (`this.defaultOneParamCallback`) is used if no callback function is
|
|
551
552
|
* @param beginRoot - The `beginRoot` parameter is the starting point for the search. It specifies
|
|
552
553
|
* the root node from which the search should begin.
|
|
553
554
|
* @param iterationType - The `iterationType` parameter specifies the type of iteration to be
|
|
554
555
|
* performed when searching for a node in the binary tree. It can have one of the following values:
|
|
555
556
|
* @returns either the found value (of type V) or undefined if no node value is found.
|
|
556
557
|
*/
|
|
557
|
-
get(identifier, callback =
|
|
558
|
+
get(identifier, callback = this.defaultOneParamCallback, beginRoot = this.root, iterationType = this.iterationType) {
|
|
558
559
|
if (identifier instanceof BinaryTreeNode)
|
|
559
560
|
callback = (node => node);
|
|
560
561
|
return this.getNode(identifier, callback, beginRoot, iterationType)?.value ?? undefined;
|
|
@@ -715,7 +716,7 @@ class BinaryTree {
|
|
|
715
716
|
* performed on the binary tree. It can have two possible values:
|
|
716
717
|
* @returns The function `subTreeTraverse` returns an array of `ReturnType<BTNCallback<N>>`.
|
|
717
718
|
*/
|
|
718
|
-
subTreeTraverse(callback =
|
|
719
|
+
subTreeTraverse(callback = this.defaultOneParamCallback, beginRoot = this.root, iterationType = this.iterationType) {
|
|
719
720
|
if (typeof beginRoot === 'number')
|
|
720
721
|
beginRoot = this.getNode(beginRoot);
|
|
721
722
|
const ans = [];
|
|
@@ -745,7 +746,7 @@ class BinaryTree {
|
|
|
745
746
|
* function on each node according to a specified order pattern.
|
|
746
747
|
* @param callback - The `callback` parameter is a function that will be called on each node during
|
|
747
748
|
* the depth-first search traversal. It takes a node as input and returns a value. The default value
|
|
748
|
-
* is `
|
|
749
|
+
* is `this.defaultOneParamCallback`, which is a callback function defined elsewhere in the code.
|
|
749
750
|
* @param {DFSOrderPattern} [pattern=in] - The `pattern` parameter determines the order in which the
|
|
750
751
|
* nodes are visited during the depth-first search. There are three possible values for `pattern`:
|
|
751
752
|
* @param {N | null} beginRoot - The `beginRoot` parameter is the starting node for the depth-first
|
|
@@ -755,7 +756,7 @@ class BinaryTree {
|
|
|
755
756
|
* iteration used in the depth-first search algorithm. It can have two possible values:
|
|
756
757
|
* @returns The function `dfs` returns an array of `ReturnType<BTNCallback<N>>` values.
|
|
757
758
|
*/
|
|
758
|
-
dfs(callback =
|
|
759
|
+
dfs(callback = this.defaultOneParamCallback, pattern = 'in', beginRoot = this.root, iterationType = types_1.IterationType.ITERATIVE) {
|
|
759
760
|
if (!beginRoot)
|
|
760
761
|
return [];
|
|
761
762
|
const ans = [];
|
|
@@ -830,7 +831,7 @@ class BinaryTree {
|
|
|
830
831
|
* function on each node.
|
|
831
832
|
* @param callback - The `callback` parameter is a function that will be called for each node in the
|
|
832
833
|
* breadth-first search. It takes a node of type `N` as its argument and returns a value of type
|
|
833
|
-
* `ReturnType<BTNCallback<N>>`. The default value for this parameter is `
|
|
834
|
+
* `ReturnType<BTNCallback<N>>`. The default value for this parameter is `this.defaultOneParamCallback
|
|
834
835
|
* @param {N | null} beginRoot - The `beginRoot` parameter is the starting node for the breadth-first
|
|
835
836
|
* search. It determines from which node the search will begin. If `beginRoot` is `null`, the search
|
|
836
837
|
* will not be performed and an empty array will be returned.
|
|
@@ -838,7 +839,7 @@ class BinaryTree {
|
|
|
838
839
|
* in the breadth-first search (BFS) algorithm. It can have two possible values:
|
|
839
840
|
* @returns The function `bfs` returns an array of `ReturnType<BTNCallback<N>>[]`.
|
|
840
841
|
*/
|
|
841
|
-
bfs(callback =
|
|
842
|
+
bfs(callback = this.defaultOneParamCallback, beginRoot = this.root, iterationType = this.iterationType) {
|
|
842
843
|
if (!beginRoot)
|
|
843
844
|
return [];
|
|
844
845
|
const ans = [];
|
|
@@ -888,7 +889,7 @@ class BinaryTree {
|
|
|
888
889
|
* level in a binary tree. Each inner array contains the return type of the provided callback
|
|
889
890
|
* function `C` applied to the nodes at that level.
|
|
890
891
|
*/
|
|
891
|
-
listLevels(callback =
|
|
892
|
+
listLevels(callback = this.defaultOneParamCallback, beginRoot = this.root, iterationType = this.iterationType) {
|
|
892
893
|
if (!beginRoot)
|
|
893
894
|
return [];
|
|
894
895
|
const levelsNodes = [];
|
|
@@ -963,7 +964,7 @@ class BinaryTree {
|
|
|
963
964
|
* algorithm and returns an array of values obtained by applying a callback function to each node.
|
|
964
965
|
* @param callback - The `callback` parameter is a function that will be called on each node in the
|
|
965
966
|
* tree. It takes a node of type `N` as input and returns a value of type `ReturnType<BTNCallback<N>>`. The
|
|
966
|
-
* default value for this parameter is `
|
|
967
|
+
* default value for this parameter is `this.defaultOneParamCallback`.
|
|
967
968
|
* @param {DFSOrderPattern} [pattern=in] - The `pattern` parameter in the `morris` function
|
|
968
969
|
* determines the order in which the nodes of a binary tree are traversed. It can have one of the
|
|
969
970
|
* following values:
|
|
@@ -972,7 +973,7 @@ class BinaryTree {
|
|
|
972
973
|
* `beginRoot` is `null`, an empty array will be returned.
|
|
973
974
|
* @returns The `morris` function returns an array of `ReturnType<BTNCallback<N>>` values.
|
|
974
975
|
*/
|
|
975
|
-
morris(callback =
|
|
976
|
+
morris(callback = this.defaultOneParamCallback, pattern = 'in', beginRoot = this.root) {
|
|
976
977
|
if (beginRoot === null)
|
|
977
978
|
return [];
|
|
978
979
|
const ans = [];
|
|
@@ -54,25 +54,6 @@ export declare class BST<V = any, N extends BSTNode<V, N> = BSTNode<V, BSTNodeNe
|
|
|
54
54
|
* @returns The `addMany` function returns an array of `N`, `null`, or `undefined` values.
|
|
55
55
|
*/
|
|
56
56
|
addMany(keysOrNodes: (BTNKey | null)[] | (N | null)[], data?: V[], isBalanceAdd?: boolean, iterationType?: IterationType): (N | null | undefined)[];
|
|
57
|
-
/**
|
|
58
|
-
* The function returns the first node in the binary tree that matches the given node property and
|
|
59
|
-
* callback.
|
|
60
|
-
* @param {ReturnType<C> | N} identifier - The `nodeProperty` parameter is used to specify the
|
|
61
|
-
* property of the binary tree node that you want to search for. It can be either a specific key
|
|
62
|
-
* value (`BTNKey`) or a custom callback function (`BTNCallback<N>`) that determines
|
|
63
|
-
* whether a node matches the desired property.
|
|
64
|
-
* @param callback - The `callback` parameter is a function that is used to determine whether a node
|
|
65
|
-
* matches the desired property. It takes a node as input and returns a boolean value indicating
|
|
66
|
-
* whether the node matches the property or not. If no callback function is provided, the default
|
|
67
|
-
* callback function `_defaultCallbackByKey` is used
|
|
68
|
-
* @param beginRoot - The `beginRoot` parameter is the starting point for the search. It specifies
|
|
69
|
-
* the root node from which the search should begin.
|
|
70
|
-
* @param iterationType - The `iterationType` parameter is used to specify the type of iteration to
|
|
71
|
-
* be performed when searching for nodes in the binary tree. It can have one of the following values:
|
|
72
|
-
* @returns either the first node that matches the given nodeProperty and callback, or null if no
|
|
73
|
-
* matching node is found.
|
|
74
|
-
*/
|
|
75
|
-
getNode<C extends BTNCallback<N>>(identifier: ReturnType<C> | null, callback?: C, beginRoot?: N | null, iterationType?: IterationType): N | null;
|
|
76
57
|
/**
|
|
77
58
|
* The function `lastKey` returns the key of the rightmost node if the comparison result is less
|
|
78
59
|
* than, the key of the leftmost node if the comparison result is greater than, and the key of the
|
|
@@ -97,7 +78,7 @@ export declare class BST<V = any, N extends BSTNode<V, N> = BSTNode<V, BSTNodeNe
|
|
|
97
78
|
* generic type `N`.
|
|
98
79
|
* @param callback - The `callback` parameter is a function that takes a node as input and returns a
|
|
99
80
|
* value. This value is compared with the `nodeProperty` parameter to determine if the node should be
|
|
100
|
-
* included in the result. The default value for `callback` is `
|
|
81
|
+
* included in the result. The default value for `callback` is `this.defaultOneParamCallback`, which is
|
|
101
82
|
* a
|
|
102
83
|
* @param [onlyOne=false] - A boolean value indicating whether to stop the traversal after finding
|
|
103
84
|
* the first node that matches the nodeProperty. If set to true, the function will return an array
|
|
@@ -204,27 +204,6 @@ class BST extends binary_tree_1.BinaryTree {
|
|
|
204
204
|
}
|
|
205
205
|
return inserted;
|
|
206
206
|
}
|
|
207
|
-
/**
|
|
208
|
-
* The function returns the first node in the binary tree that matches the given node property and
|
|
209
|
-
* callback.
|
|
210
|
-
* @param {ReturnType<C> | N} identifier - The `nodeProperty` parameter is used to specify the
|
|
211
|
-
* property of the binary tree node that you want to search for. It can be either a specific key
|
|
212
|
-
* value (`BTNKey`) or a custom callback function (`BTNCallback<N>`) that determines
|
|
213
|
-
* whether a node matches the desired property.
|
|
214
|
-
* @param callback - The `callback` parameter is a function that is used to determine whether a node
|
|
215
|
-
* matches the desired property. It takes a node as input and returns a boolean value indicating
|
|
216
|
-
* whether the node matches the property or not. If no callback function is provided, the default
|
|
217
|
-
* callback function `_defaultCallbackByKey` is used
|
|
218
|
-
* @param beginRoot - The `beginRoot` parameter is the starting point for the search. It specifies
|
|
219
|
-
* the root node from which the search should begin.
|
|
220
|
-
* @param iterationType - The `iterationType` parameter is used to specify the type of iteration to
|
|
221
|
-
* be performed when searching for nodes in the binary tree. It can have one of the following values:
|
|
222
|
-
* @returns either the first node that matches the given nodeProperty and callback, or null if no
|
|
223
|
-
* matching node is found.
|
|
224
|
-
*/
|
|
225
|
-
getNode(identifier, callback = ((node) => node.key), beginRoot = this.root, iterationType = this.iterationType) {
|
|
226
|
-
return this.getNodes(identifier, callback, true, beginRoot, iterationType)[0] ?? null;
|
|
227
|
-
}
|
|
228
207
|
/**
|
|
229
208
|
* The function `lastKey` returns the key of the rightmost node if the comparison result is less
|
|
230
209
|
* than, the key of the leftmost node if the comparison result is greater than, and the key of the
|
|
@@ -256,7 +235,7 @@ class BST extends binary_tree_1.BinaryTree {
|
|
|
256
235
|
* generic type `N`.
|
|
257
236
|
* @param callback - The `callback` parameter is a function that takes a node as input and returns a
|
|
258
237
|
* value. This value is compared with the `nodeProperty` parameter to determine if the node should be
|
|
259
|
-
* included in the result. The default value for `callback` is `
|
|
238
|
+
* included in the result. The default value for `callback` is `this.defaultOneParamCallback`, which is
|
|
260
239
|
* a
|
|
261
240
|
* @param [onlyOne=false] - A boolean value indicating whether to stop the traversal after finding
|
|
262
241
|
* the first node that matches the nodeProperty. If set to true, the function will return an array
|
|
@@ -269,7 +248,7 @@ class BST extends binary_tree_1.BinaryTree {
|
|
|
269
248
|
* traverse the binary tree. It can have one of the following values:
|
|
270
249
|
* @returns an array of nodes (N[]).
|
|
271
250
|
*/
|
|
272
|
-
getNodes(identifier, callback =
|
|
251
|
+
getNodes(identifier, callback = this.defaultOneParamCallback, onlyOne = false, beginRoot = this.root, iterationType = this.iterationType) {
|
|
273
252
|
if (!beginRoot)
|
|
274
253
|
return [];
|
|
275
254
|
const ans = [];
|
|
@@ -284,7 +263,7 @@ class BST extends binary_tree_1.BinaryTree {
|
|
|
284
263
|
if (!cur.left && !cur.right)
|
|
285
264
|
return;
|
|
286
265
|
// TODO potential bug
|
|
287
|
-
if (callback ===
|
|
266
|
+
if (callback === this.defaultOneParamCallback) {
|
|
288
267
|
if (this._compare(cur.key, identifier) === types_1.CP.gt)
|
|
289
268
|
cur.left && _traverse(cur.left);
|
|
290
269
|
if (this._compare(cur.key, identifier) === types_1.CP.lt)
|
|
@@ -309,7 +288,7 @@ class BST extends binary_tree_1.BinaryTree {
|
|
|
309
288
|
return ans;
|
|
310
289
|
}
|
|
311
290
|
// TODO potential bug
|
|
312
|
-
if (callback ===
|
|
291
|
+
if (callback === this.defaultOneParamCallback) {
|
|
313
292
|
if (this._compare(cur.key, identifier) === types_1.CP.gt)
|
|
314
293
|
cur.left && queue.push(cur.left);
|
|
315
294
|
if (this._compare(cur.key, identifier) === types_1.CP.lt)
|
|
@@ -342,7 +321,7 @@ class BST extends binary_tree_1.BinaryTree {
|
|
|
342
321
|
* done recursively or iteratively. It can have two possible values:
|
|
343
322
|
* @returns The function `lesserOrGreaterTraverse` returns an array of `ReturnType<BTNCallback<N>>`.
|
|
344
323
|
*/
|
|
345
|
-
lesserOrGreaterTraverse(callback =
|
|
324
|
+
lesserOrGreaterTraverse(callback = this.defaultOneParamCallback, lesserOrGreater = types_1.CP.lt, targetNode = this.root, iterationType = this.iterationType) {
|
|
346
325
|
if (typeof targetNode === 'number')
|
|
347
326
|
targetNode = this.getNode(targetNode);
|
|
348
327
|
const ans = [];
|
|
@@ -98,7 +98,7 @@ export declare class TreeMultiset<V = any, N extends TreeMultisetNode<V, N> = Tr
|
|
|
98
98
|
* @param callback - The `callback` parameter is a function that takes a node as input and returns a
|
|
99
99
|
* value. This value is compared with the `identifier` parameter to determine if the node should be
|
|
100
100
|
* included in the result. The `callback` parameter has a default value of
|
|
101
|
-
* `
|
|
101
|
+
* `this.defaultOneParamCallback`
|
|
102
102
|
* @param [ignoreCount=false] - A boolean flag indicating whether to ignore the count of the node
|
|
103
103
|
* being deleted. If set to true, the count of the node will not be considered and the node will be
|
|
104
104
|
* deleted regardless of its count. If set to false (default), the count of the node will be
|
|
@@ -252,14 +252,14 @@ class TreeMultiset extends avl_tree_1.AVLTree {
|
|
|
252
252
|
* @param callback - The `callback` parameter is a function that takes a node as input and returns a
|
|
253
253
|
* value. This value is compared with the `identifier` parameter to determine if the node should be
|
|
254
254
|
* included in the result. The `callback` parameter has a default value of
|
|
255
|
-
* `
|
|
255
|
+
* `this.defaultOneParamCallback`
|
|
256
256
|
* @param [ignoreCount=false] - A boolean flag indicating whether to ignore the count of the node
|
|
257
257
|
* being deleted. If set to true, the count of the node will not be considered and the node will be
|
|
258
258
|
* deleted regardless of its count. If set to false (default), the count of the node will be
|
|
259
259
|
* decremented by 1 and
|
|
260
260
|
* @returns The method `delete` returns an array of `BinaryTreeDeletedResult<N>` objects.
|
|
261
261
|
*/
|
|
262
|
-
delete(identifier, callback =
|
|
262
|
+
delete(identifier, callback = this.defaultOneParamCallback, ignoreCount = false) {
|
|
263
263
|
const bstDeletedResult = [];
|
|
264
264
|
if (!this.root)
|
|
265
265
|
return bstDeletedResult;
|
|
@@ -175,21 +175,21 @@ class AbstractGraph {
|
|
|
175
175
|
return [];
|
|
176
176
|
}
|
|
177
177
|
const dfs = (cur, dest, visiting, path) => {
|
|
178
|
-
visiting.
|
|
178
|
+
visiting.add(cur);
|
|
179
179
|
if (cur === dest) {
|
|
180
180
|
paths.push([vertex1, ...path]);
|
|
181
181
|
}
|
|
182
182
|
const neighbors = this.getNeighbors(cur);
|
|
183
183
|
for (const neighbor of neighbors) {
|
|
184
|
-
if (!visiting.
|
|
184
|
+
if (!visiting.has(neighbor)) {
|
|
185
185
|
path.push(neighbor);
|
|
186
186
|
dfs(neighbor, dest, visiting, path);
|
|
187
|
-
|
|
187
|
+
path.pop();
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
|
-
visiting.
|
|
190
|
+
visiting.delete(cur);
|
|
191
191
|
};
|
|
192
|
-
dfs(vertex1, vertex2, new
|
|
192
|
+
dfs(vertex1, vertex2, new Set(), []);
|
|
193
193
|
return paths;
|
|
194
194
|
}
|
|
195
195
|
/**
|