data-structure-typed 1.18.0 → 1.18.6
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/README.md +193 -66
- package/backup/recursive-type/src/assets/complexities-diff.jpg +0 -0
- package/backup/recursive-type/src/assets/data-structure-complexities.jpg +0 -0
- package/backup/recursive-type/src/assets/logo.png +0 -0
- package/backup/recursive-type/src/assets/overview-diagram-of-data-structures.png +0 -0
- package/backup/recursive-type/src/data-structures/binary-tree/aa-tree.ts +3 -0
- package/backup/recursive-type/src/data-structures/binary-tree/avl-tree.ts +288 -0
- package/backup/recursive-type/src/data-structures/binary-tree/b-tree.ts +3 -0
- package/backup/recursive-type/src/data-structures/binary-tree/binary-indexed-tree.ts +78 -0
- package/backup/recursive-type/src/data-structures/binary-tree/binary-tree.ts +1502 -0
- package/backup/recursive-type/src/data-structures/binary-tree/bst.ts +503 -0
- package/backup/recursive-type/src/data-structures/binary-tree/diagrams/avl-tree-inserting.gif +0 -0
- package/backup/recursive-type/src/data-structures/binary-tree/diagrams/bst-rotation.gif +0 -0
- package/backup/recursive-type/src/data-structures/binary-tree/diagrams/segment-tree.png +0 -0
- package/backup/recursive-type/src/data-structures/binary-tree/index.ts +11 -0
- package/backup/recursive-type/src/data-structures/binary-tree/rb-tree.ts +110 -0
- package/backup/recursive-type/src/data-structures/binary-tree/segment-tree.ts +243 -0
- package/backup/recursive-type/src/data-structures/binary-tree/splay-tree.ts +3 -0
- package/backup/recursive-type/src/data-structures/binary-tree/tree-multiset.ts +55 -0
- package/backup/recursive-type/src/data-structures/binary-tree/two-three-tree.ts +3 -0
- package/backup/recursive-type/src/data-structures/diagrams/README.md +5 -0
- package/backup/recursive-type/src/data-structures/graph/abstract-graph.ts +985 -0
- package/backup/recursive-type/src/data-structures/graph/diagrams/adjacency-list-pros-cons.jpg +0 -0
- package/backup/recursive-type/src/data-structures/graph/diagrams/adjacency-list.jpg +0 -0
- package/backup/recursive-type/src/data-structures/graph/diagrams/adjacency-matrix-pros-cons.jpg +0 -0
- package/backup/recursive-type/src/data-structures/graph/diagrams/adjacency-matrix.jpg +0 -0
- package/backup/recursive-type/src/data-structures/graph/diagrams/dfs-can-do.jpg +0 -0
- package/backup/recursive-type/src/data-structures/graph/diagrams/edge-list-pros-cons.jpg +0 -0
- package/backup/recursive-type/src/data-structures/graph/diagrams/edge-list.jpg +0 -0
- package/backup/recursive-type/src/data-structures/graph/diagrams/max-flow.jpg +0 -0
- package/backup/recursive-type/src/data-structures/graph/diagrams/mst.jpg +0 -0
- package/backup/recursive-type/src/data-structures/graph/diagrams/tarjan-articulation-point-bridge.png +0 -0
- package/backup/recursive-type/src/data-structures/graph/diagrams/tarjan-complicate-simple.png +0 -0
- package/backup/recursive-type/src/data-structures/graph/diagrams/tarjan-strongly-connected-component.png +0 -0
- package/backup/recursive-type/src/data-structures/graph/diagrams/tarjan.mp4 +0 -0
- package/backup/recursive-type/src/data-structures/graph/diagrams/tarjan.webp +0 -0
- package/backup/recursive-type/src/data-structures/graph/directed-graph.ts +478 -0
- package/backup/recursive-type/src/data-structures/graph/index.ts +3 -0
- package/backup/recursive-type/src/data-structures/graph/undirected-graph.ts +293 -0
- package/backup/recursive-type/src/data-structures/hash/coordinate-map.ts +67 -0
- package/backup/recursive-type/src/data-structures/hash/coordinate-set.ts +56 -0
- package/backup/recursive-type/src/data-structures/hash/hash-table.ts +3 -0
- package/backup/recursive-type/src/data-structures/hash/index.ts +6 -0
- package/backup/recursive-type/src/data-structures/hash/pair.ts +3 -0
- package/backup/recursive-type/src/data-structures/hash/tree-map.ts +3 -0
- package/backup/recursive-type/src/data-structures/hash/tree-set.ts +3 -0
- package/backup/recursive-type/src/data-structures/heap/heap.ts +176 -0
- package/backup/recursive-type/src/data-structures/heap/index.ts +3 -0
- package/backup/recursive-type/src/data-structures/heap/max-heap.ts +31 -0
- package/backup/recursive-type/src/data-structures/heap/min-heap.ts +34 -0
- package/backup/recursive-type/src/data-structures/index.ts +15 -0
- package/backup/recursive-type/src/data-structures/interfaces/abstract-graph.ts +42 -0
- package/backup/recursive-type/src/data-structures/interfaces/avl-tree.ts +1 -0
- package/backup/recursive-type/src/data-structures/interfaces/binary-tree.ts +56 -0
- package/backup/recursive-type/src/data-structures/interfaces/bst.ts +1 -0
- package/backup/recursive-type/src/data-structures/interfaces/directed-graph.ts +15 -0
- package/backup/recursive-type/src/data-structures/interfaces/doubly-linked-list.ts +1 -0
- package/backup/recursive-type/src/data-structures/interfaces/heap.ts +1 -0
- package/backup/recursive-type/src/data-structures/interfaces/index.ts +13 -0
- package/backup/recursive-type/src/data-structures/interfaces/navigator.ts +1 -0
- package/backup/recursive-type/src/data-structures/interfaces/priority-queue.ts +1 -0
- package/backup/recursive-type/src/data-structures/interfaces/segment-tree.ts +1 -0
- package/backup/recursive-type/src/data-structures/interfaces/singly-linked-list.ts +1 -0
- package/backup/recursive-type/src/data-structures/interfaces/tree-multiset.ts +1 -0
- package/backup/recursive-type/src/data-structures/interfaces/undirected-graph.ts +3 -0
- package/backup/recursive-type/src/data-structures/linked-list/doubly-linked-list.ts +573 -0
- package/backup/recursive-type/src/data-structures/linked-list/index.ts +3 -0
- package/backup/recursive-type/src/data-structures/linked-list/singly-linked-list.ts +490 -0
- package/backup/recursive-type/src/data-structures/linked-list/skip-linked-list.ts +3 -0
- package/backup/recursive-type/src/data-structures/matrix/index.ts +4 -0
- package/backup/recursive-type/src/data-structures/matrix/matrix.ts +27 -0
- package/backup/recursive-type/src/data-structures/matrix/matrix2d.ts +208 -0
- package/backup/recursive-type/src/data-structures/matrix/navigator.ts +122 -0
- package/backup/recursive-type/src/data-structures/matrix/vector2d.ts +316 -0
- package/backup/recursive-type/src/data-structures/priority-queue/index.ts +3 -0
- package/backup/recursive-type/src/data-structures/priority-queue/max-priority-queue.ts +49 -0
- package/backup/recursive-type/src/data-structures/priority-queue/min-priority-queue.ts +50 -0
- package/backup/recursive-type/src/data-structures/priority-queue/priority-queue.ts +354 -0
- package/backup/recursive-type/src/data-structures/queue/deque.ts +251 -0
- package/backup/recursive-type/src/data-structures/queue/index.ts +2 -0
- package/backup/recursive-type/src/data-structures/queue/queue.ts +120 -0
- package/backup/recursive-type/src/data-structures/stack/index.ts +1 -0
- package/backup/recursive-type/src/data-structures/stack/stack.ts +98 -0
- package/backup/recursive-type/src/data-structures/tree/index.ts +1 -0
- package/backup/recursive-type/src/data-structures/tree/tree.ts +80 -0
- package/backup/recursive-type/src/data-structures/trie/index.ts +1 -0
- package/backup/recursive-type/src/data-structures/trie/trie.ts +227 -0
- package/backup/recursive-type/src/data-structures/types/abstract-graph.ts +5 -0
- package/backup/recursive-type/src/data-structures/types/avl-tree.ts +8 -0
- package/backup/recursive-type/src/data-structures/types/binary-tree.ts +10 -0
- package/backup/recursive-type/src/data-structures/types/bst.ts +6 -0
- package/backup/recursive-type/src/data-structures/types/directed-graph.ts +8 -0
- package/backup/recursive-type/src/data-structures/types/doubly-linked-list.ts +1 -0
- package/backup/recursive-type/src/data-structures/types/heap.ts +5 -0
- package/backup/recursive-type/src/data-structures/types/index.ts +12 -0
- package/backup/recursive-type/src/data-structures/types/navigator.ts +13 -0
- package/backup/recursive-type/src/data-structures/types/priority-queue.ts +9 -0
- package/backup/recursive-type/src/data-structures/types/segment-tree.ts +1 -0
- package/backup/recursive-type/src/data-structures/types/singly-linked-list.ts +1 -0
- package/backup/recursive-type/src/data-structures/types/tree-multiset.ts +1 -0
- package/backup/recursive-type/src/index.ts +1 -0
- package/backup/recursive-type/src/utils/index.ts +2 -0
- package/backup/recursive-type/src/utils/types/index.ts +1 -0
- package/backup/recursive-type/src/utils/types/utils.ts +6 -0
- package/backup/recursive-type/src/utils/utils.ts +78 -0
- package/dist/data-structures/binary-tree/abstract-binary-tree.d.ts +333 -0
- package/dist/data-structures/binary-tree/abstract-binary-tree.js +1455 -0
- package/dist/data-structures/binary-tree/avl-tree.d.ts +20 -25
- package/dist/data-structures/binary-tree/avl-tree.js +10 -18
- package/dist/data-structures/binary-tree/binary-tree.d.ts +18 -345
- package/dist/data-structures/binary-tree/binary-tree.js +39 -1444
- package/dist/data-structures/binary-tree/bst.d.ts +24 -31
- package/dist/data-structures/binary-tree/bst.js +46 -53
- package/dist/data-structures/binary-tree/index.d.ts +1 -0
- package/dist/data-structures/binary-tree/index.js +1 -0
- package/dist/data-structures/binary-tree/rb-tree.d.ts +1 -2
- package/dist/data-structures/binary-tree/rb-tree.js +64 -5
- package/dist/data-structures/binary-tree/tree-multiset.d.ts +11 -25
- package/dist/data-structures/binary-tree/tree-multiset.js +29 -31
- package/dist/data-structures/graph/abstract-graph.d.ts +56 -58
- package/dist/data-structures/graph/abstract-graph.js +84 -68
- package/dist/data-structures/graph/directed-graph.d.ts +124 -95
- package/dist/data-structures/graph/directed-graph.js +156 -108
- package/dist/data-structures/graph/undirected-graph.d.ts +83 -58
- package/dist/data-structures/graph/undirected-graph.js +98 -71
- package/dist/data-structures/hash/coordinate-set.d.ts +1 -1
- package/dist/data-structures/index.d.ts +1 -0
- package/dist/data-structures/index.js +1 -0
- package/dist/data-structures/interfaces/abstract-graph.d.ts +22 -0
- package/dist/data-structures/interfaces/abstract-graph.js +2 -0
- package/dist/data-structures/interfaces/avl-tree.d.ts +1 -0
- package/dist/data-structures/interfaces/avl-tree.js +2 -0
- package/dist/data-structures/interfaces/binary-tree.d.ts +26 -0
- package/dist/data-structures/interfaces/binary-tree.js +2 -0
- package/dist/data-structures/interfaces/bst.d.ts +1 -0
- package/dist/data-structures/interfaces/bst.js +2 -0
- package/dist/data-structures/interfaces/directed-graph.d.ts +9 -0
- package/dist/data-structures/interfaces/directed-graph.js +2 -0
- package/dist/data-structures/interfaces/doubly-linked-list.d.ts +1 -0
- package/dist/data-structures/interfaces/doubly-linked-list.js +2 -0
- package/dist/data-structures/interfaces/heap.d.ts +1 -0
- package/dist/data-structures/interfaces/heap.js +2 -0
- package/dist/data-structures/interfaces/index.d.ts +13 -0
- package/dist/data-structures/interfaces/index.js +29 -0
- package/dist/data-structures/interfaces/navigator.d.ts +1 -0
- package/dist/data-structures/interfaces/navigator.js +2 -0
- package/dist/data-structures/interfaces/priority-queue.d.ts +1 -0
- package/dist/data-structures/interfaces/priority-queue.js +2 -0
- package/dist/data-structures/interfaces/segment-tree.d.ts +1 -0
- package/dist/data-structures/interfaces/segment-tree.js +2 -0
- package/dist/data-structures/interfaces/singly-linked-list.d.ts +1 -0
- package/dist/data-structures/interfaces/singly-linked-list.js +2 -0
- package/dist/data-structures/interfaces/tree-multiset.d.ts +1 -0
- package/dist/data-structures/interfaces/tree-multiset.js +2 -0
- package/dist/data-structures/interfaces/undirected-graph.d.ts +2 -0
- package/dist/data-structures/interfaces/undirected-graph.js +2 -0
- package/dist/data-structures/linked-list/doubly-linked-list.d.ts +1 -1
- package/dist/data-structures/linked-list/singly-linked-list.d.ts +1 -1
- package/dist/data-structures/priority-queue/priority-queue.d.ts +1 -1
- package/dist/data-structures/priority-queue/priority-queue.js +4 -4
- package/dist/data-structures/queue/deque.d.ts +5 -5
- package/dist/data-structures/queue/deque.js +6 -6
- package/dist/data-structures/queue/queue.d.ts +1 -1
- package/dist/data-structures/stack/stack.d.ts +1 -1
- package/dist/data-structures/types/abstract-binary-tree.d.ts +32 -0
- package/dist/data-structures/types/abstract-binary-tree.js +21 -0
- package/dist/data-structures/types/abstract-graph.d.ts +1 -20
- package/dist/data-structures/types/avl-tree.d.ts +3 -4
- package/dist/data-structures/types/binary-tree.d.ts +3 -10
- package/dist/data-structures/types/bst.d.ts +10 -4
- package/dist/data-structures/types/bst.js +7 -0
- package/dist/data-structures/types/directed-graph.d.ts +5 -9
- package/dist/data-structures/types/directed-graph.js +7 -0
- package/dist/data-structures/types/heap.d.ts +2 -2
- package/dist/data-structures/types/helpers.d.ts +8 -0
- package/dist/data-structures/types/helpers.js +2 -0
- package/dist/data-structures/types/index.d.ts +3 -1
- package/dist/data-structures/types/index.js +3 -1
- package/dist/data-structures/types/navigator.d.ts +2 -2
- package/dist/data-structures/types/priority-queue.d.ts +2 -2
- package/dist/data-structures/types/rb-tree.d.ts +6 -0
- package/dist/data-structures/types/rb-tree.js +8 -0
- package/dist/data-structures/types/tree-multiset.d.ts +5 -4
- package/docs/assets/search.js +1 -1
- package/docs/classes/AVLTree.html +310 -309
- package/docs/classes/AVLTreeNode.html +122 -68
- package/docs/classes/AaTree.html +30 -17
- package/docs/classes/AbstractBinaryTree.html +2023 -0
- package/docs/classes/AbstractBinaryTreeNode.html +491 -0
- package/docs/classes/AbstractEdge.html +84 -39
- package/docs/classes/AbstractGraph.html +235 -119
- package/docs/classes/AbstractVertex.html +87 -35
- package/docs/classes/ArrayDeque.html +43 -30
- package/docs/classes/BST.html +297 -285
- package/docs/classes/BSTNode.html +123 -62
- package/docs/classes/BTree.html +30 -17
- package/docs/classes/BinaryIndexedTree.html +38 -25
- package/docs/classes/BinaryTree.html +596 -589
- package/docs/classes/BinaryTreeNode.html +181 -161
- package/docs/classes/Character.html +33 -20
- package/docs/classes/CoordinateMap.html +38 -25
- package/docs/classes/CoordinateSet.html +39 -26
- package/docs/classes/Deque.html +63 -50
- package/docs/classes/DirectedEdge.html +90 -46
- package/docs/classes/DirectedGraph.html +374 -212
- package/docs/classes/DirectedVertex.html +79 -41
- package/docs/classes/DoublyLinkedList.html +68 -55
- package/docs/classes/DoublyLinkedListNode.html +40 -27
- package/docs/classes/HashTable.html +30 -17
- package/docs/classes/Heap.html +45 -32
- package/docs/classes/HeapItem.html +37 -24
- package/docs/classes/Matrix2D.html +45 -32
- package/docs/classes/MatrixNTI2D.html +33 -20
- package/docs/classes/MaxHeap.html +45 -32
- package/docs/classes/MaxPriorityQueue.html +83 -65
- package/docs/classes/MinHeap.html +45 -32
- package/docs/classes/MinPriorityQueue.html +83 -65
- package/docs/classes/Navigator.html +40 -27
- package/docs/classes/ObjectDeque.html +78 -55
- package/docs/classes/Pair.html +30 -17
- package/docs/classes/PriorityQueue.html +78 -60
- package/docs/classes/Queue.html +45 -32
- package/docs/classes/SegmentTree.html +46 -33
- package/docs/classes/SegmentTreeNode.html +49 -36
- package/docs/classes/SinglyLinkedList.html +65 -52
- package/docs/classes/SinglyLinkedListNode.html +37 -24
- package/docs/classes/SkipLinkedList.html +30 -17
- package/docs/classes/SplayTree.html +30 -17
- package/docs/classes/Stack.html +43 -30
- package/docs/classes/TreeMap.html +30 -17
- package/docs/classes/TreeMultiSet.html +330 -316
- package/docs/classes/TreeMultiSetNode.html +450 -0
- package/docs/classes/TreeNode.html +45 -32
- package/docs/classes/TreeSet.html +30 -17
- package/docs/classes/Trie.html +42 -29
- package/docs/classes/TrieNode.html +40 -27
- package/docs/classes/TwoThreeTree.html +30 -17
- package/docs/classes/UndirectedEdge.html +86 -56
- package/docs/classes/UndirectedGraph.html +286 -165
- package/docs/classes/UndirectedVertex.html +79 -41
- package/docs/classes/Vector2D.html +57 -44
- package/docs/enums/CP.html +36 -23
- package/docs/enums/FamilyPosition.html +48 -35
- package/docs/enums/LoopType.html +42 -29
- package/docs/{interfaces/PriorityQueueOptions.html → enums/RBColor.html} +52 -55
- package/docs/{interfaces/AVLTreeDeleted.html → enums/TopologicalProperty.html} +59 -48
- package/docs/index.html +211 -73
- package/docs/interfaces/{NavigatorParams.html → IBinaryTree.html} +56 -67
- package/docs/interfaces/IBinaryTreeNode.html +396 -0
- package/docs/interfaces/IDirectedGraph.html +36 -23
- package/docs/interfaces/IGraph.html +134 -93
- package/docs/interfaces/{HeapOptions.html → IUNDirectedGraph.html} +38 -57
- package/docs/modules.html +57 -31
- package/docs/types/{ToThunkFn.html → AVLTreeOptions.html} +35 -27
- package/docs/types/AbstractBinaryTreeOptions.html +150 -0
- package/docs/types/AbstractRecursiveBinaryTreeNode.html +146 -0
- package/docs/types/{ResultsByProperty.html → AbstractResultByProperty.html} +35 -22
- package/docs/types/{TreeMultiSetDeletedResult.html → AbstractResultsByProperty.html} +35 -29
- package/docs/types/BSTComparator.html +30 -17
- package/docs/types/{TrlAsyncFn.html → BSTOptions.html} +36 -31
- package/docs/types/BinaryTreeDeletedResult.html +153 -0
- package/docs/types/BinaryTreeNodeId.html +30 -17
- package/docs/types/BinaryTreeNodePropertyName.html +30 -17
- package/docs/types/{BinaryTreeDeleted.html → BinaryTreeOptions.html} +35 -31
- package/docs/types/DFSOrderPattern.html +30 -17
- package/docs/types/DijkstraResult.html +30 -17
- package/docs/types/Direction.html +30 -17
- package/docs/types/{SpecifyOptional.html → EdgeId.html} +34 -28
- package/docs/types/{TrlFn.html → HeapOptions.html} +45 -24
- package/docs/types/IdObject.html +151 -0
- package/docs/types/{BSTDeletedResult.html → KeyValObject.html} +36 -30
- package/docs/types/NavigatorParams.html +175 -0
- package/docs/types/NodeOrPropertyName.html +30 -17
- package/docs/types/PriorityQueueComparator.html +30 -17
- package/docs/types/PriorityQueueDFSOrderPattern.html +30 -17
- package/docs/types/PriorityQueueOptions.html +155 -0
- package/docs/types/{Thunk.html → RBTreeOptions.html} +35 -27
- package/docs/types/RecursiveAVLTreeNode.html +146 -0
- package/docs/types/RecursiveBSTNode.html +146 -0
- package/docs/types/RecursiveBinaryTreeNode.html +146 -0
- package/docs/types/RecursiveTreeMultiSetNode.html +146 -0
- package/docs/types/SegmentTreeNodeVal.html +30 -17
- package/docs/types/TopologicalStatus.html +30 -17
- package/docs/types/TreeMultiSetOptions.html +146 -0
- package/docs/types/Turning.html +30 -17
- package/docs/types/VertexId.html +30 -17
- package/notes/note.md +8 -1
- package/package.json +10 -2
- package/docs/classes/RBTree.html +0 -153
- package/docs/types/ResultByProperty.html +0 -133
|
@@ -14,20 +14,20 @@
|
|
|
14
14
|
<ul class="tsd-breadcrumb">
|
|
15
15
|
<li><a href="../modules.html">data-structure-typed</a></li>
|
|
16
16
|
<li><a href="AVLTree.html">AVLTree</a></li></ul>
|
|
17
|
-
<h1>Class AVLTree<
|
|
17
|
+
<h1>Class AVLTree<N></h1></div>
|
|
18
18
|
<section class="tsd-panel">
|
|
19
19
|
<h4>Type Parameters</h4>
|
|
20
20
|
<ul class="tsd-type-parameter-list">
|
|
21
21
|
<li>
|
|
22
|
-
<h4><span class="tsd-kind-type-parameter">
|
|
22
|
+
<h4><span class="tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol"> extends </span><a href="AVLTreeNode.html" class="tsd-signature-type tsd-kind-class">AVLTreeNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">></span> = <a href="AVLTreeNode.html" class="tsd-signature-type tsd-kind-class">AVLTreeNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span></h4></li></ul></section>
|
|
23
23
|
<section class="tsd-panel tsd-hierarchy">
|
|
24
24
|
<h4>Hierarchy</h4>
|
|
25
25
|
<ul class="tsd-hierarchy">
|
|
26
|
-
<li><a href="BST.html" class="tsd-signature-type tsd-kind-class">BST</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
26
|
+
<li><a href="BST.html" class="tsd-signature-type tsd-kind-class">BST</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">></span>
|
|
27
27
|
<ul class="tsd-hierarchy">
|
|
28
28
|
<li><span class="target">AVLTree</span></li></ul></li></ul></section><aside class="tsd-sources">
|
|
29
29
|
<ul>
|
|
30
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
30
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/avl-tree.ts#L16">src/data-structures/binary-tree/avl-tree.ts:16</a></li></ul></aside>
|
|
31
31
|
<section class="tsd-panel-group tsd-index-group">
|
|
32
32
|
<section class="tsd-panel tsd-index-panel">
|
|
33
33
|
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
<div class="tsd-accordion-details">
|
|
36
36
|
<section class="tsd-index-section">
|
|
37
37
|
<h3 class="tsd-index-heading">Constructors</h3>
|
|
38
|
-
<div class="tsd-index-list"><a href="AVLTree.html#constructor" class="tsd-index-link
|
|
38
|
+
<div class="tsd-index-list"><a href="AVLTree.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-512"><rect fill="var(--color-icon-background)" stroke="#4D7FFF" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)"></path></g></svg><span>constructor</span></a>
|
|
39
39
|
</div></section>
|
|
40
40
|
<section class="tsd-index-section">
|
|
41
41
|
<h3 class="tsd-index-heading">Properties</h3>
|
|
@@ -63,6 +63,7 @@
|
|
|
63
63
|
<a href="AVLTree.html#DFSIterative" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>DFSIterative</span></a>
|
|
64
64
|
<a href="AVLTree.html#_accumulatedByPropertyName" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_accumulated<wbr/>By<wbr/>Property<wbr/>Name</span></a>
|
|
65
65
|
<a href="AVLTree.html#_compare" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_compare</span></a>
|
|
66
|
+
<a href="AVLTree.html#_createNode" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_create<wbr/>Node</span></a>
|
|
66
67
|
<a href="AVLTree.html#_getResultByPropertyName" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_get<wbr/>Result<wbr/>By<wbr/>Property<wbr/>Name</span></a>
|
|
67
68
|
<a href="AVLTree.html#_pushByPropertyNameStopOrNot" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_push<wbr/>By<wbr/>Property<wbr/>Name<wbr/>Stop<wbr/>Or<wbr/>Not</span></a>
|
|
68
69
|
<a href="AVLTree.html#_resetResults" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_reset<wbr/>Results</span></a>
|
|
@@ -89,7 +90,6 @@
|
|
|
89
90
|
<a href="AVLTree.html#balanceRL" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>balanceRL</span></a>
|
|
90
91
|
<a href="AVLTree.html#balanceRR" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>balanceRR</span></a>
|
|
91
92
|
<a href="AVLTree.html#clear" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>clear</span></a>
|
|
92
|
-
<a href="AVLTree.html#createNode" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>create<wbr/>Node</span></a>
|
|
93
93
|
<a href="AVLTree.html#fill" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>fill</span></a>
|
|
94
94
|
<a href="AVLTree.html#get" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get</span></a>
|
|
95
95
|
<a href="AVLTree.html#getDepth" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Depth</span></a>
|
|
@@ -119,36 +119,25 @@
|
|
|
119
119
|
</div></section></div></details></section></section>
|
|
120
120
|
<section class="tsd-panel-group tsd-member-group">
|
|
121
121
|
<h2>Constructors</h2>
|
|
122
|
-
<section class="tsd-panel tsd-member
|
|
122
|
+
<section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a>
|
|
123
123
|
<h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><g stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" id="icon-anchor"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></g></svg></a></h3>
|
|
124
|
-
<ul class="tsd-signatures
|
|
125
|
-
<li class="tsd-signature tsd-anchor-link" id="constructor.new_AVLTree"><span class="tsd-kind-constructor-signature">new AVLTree</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
124
|
+
<ul class="tsd-signatures">
|
|
125
|
+
<li class="tsd-signature tsd-anchor-link" id="constructor.new_AVLTree"><span class="tsd-kind-constructor-signature">new AVLTree</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="AVLTree.html" class="tsd-signature-type tsd-kind-class">AVLTree</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">></span><a href="#constructor.new_AVLTree" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
126
126
|
<li class="tsd-description">
|
|
127
|
-
<div class="tsd-comment tsd-typography"><p>The constructor function accepts an optional options object and sets the comparator property if provided.</p>
|
|
128
|
-
</div>
|
|
129
127
|
<section class="tsd-panel">
|
|
130
128
|
<h4>Type Parameters</h4>
|
|
131
129
|
<ul class="tsd-type-parameter-list">
|
|
132
130
|
<li>
|
|
133
|
-
<h4><span class="tsd-kind-type-parameter">
|
|
131
|
+
<h4><span class="tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol"> extends </span><a href="AVLTreeNode.html" class="tsd-signature-type tsd-kind-class">AVLTreeNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">></span> = <a href="AVLTreeNode.html" class="tsd-signature-type tsd-kind-class">AVLTreeNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span><a href="../types/RecursiveAVLTreeNode.html" class="tsd-signature-type tsd-kind-type-alias">RecursiveAVLTreeNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span></h4></li></ul></section>
|
|
134
132
|
<div class="tsd-parameters">
|
|
135
133
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
136
134
|
<ul class="tsd-parameter-list">
|
|
137
135
|
<li>
|
|
138
|
-
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <
|
|
139
|
-
<
|
|
140
|
-
</
|
|
141
|
-
<div class="tsd-comment tsd-typography"></div>
|
|
142
|
-
<ul class="tsd-parameters">
|
|
143
|
-
<li class="tsd-parameter">
|
|
144
|
-
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-property">comparator</span><span class="tsd-signature-symbol">?: </span><a href="../types/BSTComparator.html" class="tsd-signature-type tsd-kind-type-alias">BSTComparator</a></h5></li>
|
|
145
|
-
<li class="tsd-parameter">
|
|
146
|
-
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-property">loop<wbr/>Type</span><span class="tsd-signature-symbol">?: </span><a href="../enums/LoopType.html" class="tsd-signature-type tsd-kind-enum">LoopType</a></h5></li></ul></li></ul></div>
|
|
147
|
-
<h4 class="tsd-returns-title">Returns <a href="AVLTree.html" class="tsd-signature-type tsd-kind-class">AVLTree</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">></span></h4>
|
|
148
|
-
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
149
|
-
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#constructor">constructor</a></p>
|
|
136
|
+
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <a href="../types/AVLTreeOptions.html" class="tsd-signature-type tsd-kind-type-alias">AVLTreeOptions</a></h5></li></ul></div>
|
|
137
|
+
<h4 class="tsd-returns-title">Returns <a href="AVLTree.html" class="tsd-signature-type tsd-kind-class">AVLTree</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">></span></h4><aside class="tsd-sources">
|
|
138
|
+
<p>Overrides <a href="BST.html">BST</a>.<a href="BST.html#constructor">constructor</a></p>
|
|
150
139
|
<ul>
|
|
151
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
140
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/avl-tree.ts#L17">src/data-structures/binary-tree/avl-tree.ts:17</a></li></ul></aside></li></ul></section></section>
|
|
152
141
|
<section class="tsd-panel-group tsd-member-group">
|
|
153
142
|
<h2>Properties</h2>
|
|
154
143
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_comparator" class="tsd-anchor"></a>
|
|
@@ -156,7 +145,7 @@
|
|
|
156
145
|
<div class="tsd-signature"><span class="tsd-kind-property">_comparator</span><span class="tsd-signature-symbol">:</span> <a href="../types/BSTComparator.html" class="tsd-signature-type tsd-kind-type-alias">BSTComparator</a><span class="tsd-signature-symbol"> = ...</span></div><aside class="tsd-sources">
|
|
157
146
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_comparator">_comparator</a></p>
|
|
158
147
|
<ul>
|
|
159
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
148
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/bst.ts#L475">src/data-structures/binary-tree/bst.ts:475</a></li></ul></aside></section></section>
|
|
160
149
|
<section class="tsd-panel-group tsd-member-group">
|
|
161
150
|
<h2>Accessors</h2>
|
|
162
151
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="autoIncrementId" class="tsd-anchor"></a>
|
|
@@ -167,7 +156,7 @@
|
|
|
167
156
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources">
|
|
168
157
|
<p>Inherited from BST.autoIncrementId</p>
|
|
169
158
|
<ul>
|
|
170
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
159
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L207">src/data-structures/binary-tree/abstract-binary-tree.ts:207</a></li></ul></aside></li></ul></section>
|
|
171
160
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="count" class="tsd-anchor"></a>
|
|
172
161
|
<h3 class="tsd-anchor-link"><span>count</span><a href="#count" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
173
162
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -176,7 +165,7 @@
|
|
|
176
165
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
|
|
177
166
|
<p>Inherited from BST.count</p>
|
|
178
167
|
<ul>
|
|
179
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
168
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L237">src/data-structures/binary-tree/abstract-binary-tree.ts:237</a></li></ul></aside></li></ul></section>
|
|
180
169
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="isDuplicatedVal" class="tsd-anchor"></a>
|
|
181
170
|
<h3 class="tsd-anchor-link"><span>is<wbr/>Duplicated<wbr/>Val</span><a href="#isDuplicatedVal" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
182
171
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -185,7 +174,7 @@
|
|
|
185
174
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources">
|
|
186
175
|
<p>Inherited from BST.isDuplicatedVal</p>
|
|
187
176
|
<ul>
|
|
188
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
177
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L219">src/data-structures/binary-tree/abstract-binary-tree.ts:219</a></li></ul></aside></li></ul></section>
|
|
189
178
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="loopType" class="tsd-anchor"></a>
|
|
190
179
|
<h3 class="tsd-anchor-link"><span>loop<wbr/>Type</span><a href="#loopType" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
191
180
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -194,7 +183,7 @@
|
|
|
194
183
|
<h4 class="tsd-returns-title">Returns <a href="../enums/LoopType.html" class="tsd-signature-type tsd-kind-enum">LoopType</a></h4><aside class="tsd-sources">
|
|
195
184
|
<p>Inherited from BST.loopType</p>
|
|
196
185
|
<ul>
|
|
197
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
186
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L172">src/data-structures/binary-tree/abstract-binary-tree.ts:172</a></li></ul></aside></li></ul></section>
|
|
198
187
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="maxId" class="tsd-anchor"></a>
|
|
199
188
|
<h3 class="tsd-anchor-link"><span>max<wbr/>Id</span><a href="#maxId" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
200
189
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -203,16 +192,16 @@
|
|
|
203
192
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
|
|
204
193
|
<p>Inherited from BST.maxId</p>
|
|
205
194
|
<ul>
|
|
206
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
195
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L213">src/data-structures/binary-tree/abstract-binary-tree.ts:213</a></li></ul></aside></li></ul></section>
|
|
207
196
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="root" class="tsd-anchor"></a>
|
|
208
197
|
<h3 class="tsd-anchor-link"><span>root</span><a href="#root" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
209
198
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
210
|
-
<li class="tsd-signature" id="root.root-1"><span class="tsd-signature-symbol">get</span> root<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
199
|
+
<li class="tsd-signature" id="root.root-1"><span class="tsd-signature-symbol">get</span> root<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></li>
|
|
211
200
|
<li class="tsd-description">
|
|
212
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
201
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h4><aside class="tsd-sources">
|
|
213
202
|
<p>Inherited from BST.root</p>
|
|
214
203
|
<ul>
|
|
215
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
204
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L225">src/data-structures/binary-tree/abstract-binary-tree.ts:225</a></li></ul></aside></li></ul></section>
|
|
216
205
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="size" class="tsd-anchor"></a>
|
|
217
206
|
<h3 class="tsd-anchor-link"><span>size</span><a href="#size" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
218
207
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -221,7 +210,7 @@
|
|
|
221
210
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
|
|
222
211
|
<p>Inherited from BST.size</p>
|
|
223
212
|
<ul>
|
|
224
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
213
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L231">src/data-structures/binary-tree/abstract-binary-tree.ts:231</a></li></ul></aside></li></ul></section>
|
|
225
214
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="visitedCount" class="tsd-anchor"></a>
|
|
226
215
|
<h3 class="tsd-anchor-link"><span>visited<wbr/>Count</span><a href="#visitedCount" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
227
216
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -230,7 +219,7 @@
|
|
|
230
219
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources">
|
|
231
220
|
<p>Inherited from BST.visitedCount</p>
|
|
232
221
|
<ul>
|
|
233
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
222
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L195">src/data-structures/binary-tree/abstract-binary-tree.ts:195</a></li></ul></aside></li></ul></section>
|
|
234
223
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="visitedId" class="tsd-anchor"></a>
|
|
235
224
|
<h3 class="tsd-anchor-link"><span>visited<wbr/>Id</span><a href="#visitedId" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
236
225
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -239,7 +228,7 @@
|
|
|
239
228
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources">
|
|
240
229
|
<p>Inherited from BST.visitedId</p>
|
|
241
230
|
<ul>
|
|
242
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
231
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L177">src/data-structures/binary-tree/abstract-binary-tree.ts:177</a></li></ul></aside></li></ul></section>
|
|
243
232
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="visitedLeftSum" class="tsd-anchor"></a>
|
|
244
233
|
<h3 class="tsd-anchor-link"><span>visited<wbr/>Left<wbr/>Sum</span><a href="#visitedLeftSum" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
245
234
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -248,25 +237,25 @@
|
|
|
248
237
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources">
|
|
249
238
|
<p>Inherited from BST.visitedLeftSum</p>
|
|
250
239
|
<ul>
|
|
251
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
240
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L201">src/data-structures/binary-tree/abstract-binary-tree.ts:201</a></li></ul></aside></li></ul></section>
|
|
252
241
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="visitedNode" class="tsd-anchor"></a>
|
|
253
242
|
<h3 class="tsd-anchor-link"><span>visited<wbr/>Node</span><a href="#visitedNode" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
254
243
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
255
|
-
<li class="tsd-signature" id="visitedNode.visitedNode-1"><span class="tsd-signature-symbol">get</span> visitedNode<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><
|
|
244
|
+
<li class="tsd-signature" id="visitedNode.visitedNode-1"><span class="tsd-signature-symbol">get</span> visitedNode<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></li>
|
|
256
245
|
<li class="tsd-description">
|
|
257
|
-
<h4 class="tsd-returns-title">Returns <
|
|
246
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources">
|
|
258
247
|
<p>Inherited from BST.visitedNode</p>
|
|
259
248
|
<ul>
|
|
260
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
249
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L189">src/data-structures/binary-tree/abstract-binary-tree.ts:189</a></li></ul></aside></li></ul></section>
|
|
261
250
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="visitedVal" class="tsd-anchor"></a>
|
|
262
251
|
<h3 class="tsd-anchor-link"><span>visited<wbr/>Val</span><a href="#visitedVal" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
263
252
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
264
|
-
<li class="tsd-signature" id="visitedVal.visitedVal-1"><span class="tsd-signature-symbol">get</span> visitedVal<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
253
|
+
<li class="tsd-signature" id="visitedVal.visitedVal-1"><span class="tsd-signature-symbol">get</span> visitedVal<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[]</span></li>
|
|
265
254
|
<li class="tsd-description">
|
|
266
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">
|
|
255
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources">
|
|
267
256
|
<p>Inherited from BST.visitedVal</p>
|
|
268
257
|
<ul>
|
|
269
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
258
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L183">src/data-structures/binary-tree/abstract-binary-tree.ts:183</a></li></ul></aside></li></ul></section></section>
|
|
270
259
|
<section class="tsd-panel-group tsd-member-group">
|
|
271
260
|
<h2>Methods</h2>
|
|
272
261
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="BFS" class="tsd-anchor"></a>
|
|
@@ -277,12 +266,12 @@
|
|
|
277
266
|
<div class="tsd-comment tsd-typography"><p>The BFS function performs a breadth-first search on a binary tree and returns the results based on a specified node
|
|
278
267
|
or property name.</p>
|
|
279
268
|
</div>
|
|
280
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>
|
|
269
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>AbstractResultsByProperty<N></code>.</p>
|
|
281
270
|
|
|
282
271
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
283
272
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#BFS">BFS</a></p>
|
|
284
273
|
<ul>
|
|
285
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
274
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L937">src/data-structures/binary-tree/abstract-binary-tree.ts:937</a></li></ul></aside></li>
|
|
286
275
|
<li class="tsd-signature tsd-anchor-link" id="BFS.BFS-2"><span class="tsd-kind-call-signature">BFS</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><a href="#BFS.BFS-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
287
276
|
<li class="tsd-description">
|
|
288
277
|
<div class="tsd-comment tsd-typography"><p>The BFS function performs a breadth-first search on a binary tree and returns the results based on a specified node
|
|
@@ -299,13 +288,13 @@ performed starting from that node. If a property name is provided, the breadth-f
|
|
|
299
288
|
performed starting from the root node</p>
|
|
300
289
|
</div>
|
|
301
290
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
302
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>
|
|
291
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>AbstractResultsByProperty<N></code>.</p>
|
|
303
292
|
|
|
304
293
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
305
294
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#BFS">BFS</a></p>
|
|
306
295
|
<ul>
|
|
307
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
308
|
-
<li class="tsd-signature tsd-anchor-link" id="BFS.BFS-3"><span class="tsd-kind-call-signature">BFS</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
296
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L939">src/data-structures/binary-tree/abstract-binary-tree.ts:939</a></li></ul></aside></li>
|
|
297
|
+
<li class="tsd-signature tsd-anchor-link" id="BFS.BFS-3"><span class="tsd-kind-call-signature">BFS</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[]</span><a href="#BFS.BFS-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
309
298
|
<li class="tsd-description">
|
|
310
299
|
<div class="tsd-comment tsd-typography"><p>The BFS function performs a breadth-first search on a binary tree and returns the results based on a specified node
|
|
311
300
|
or property name.</p>
|
|
@@ -321,13 +310,13 @@ performed starting from that node. If a property name is provided, the breadth-f
|
|
|
321
310
|
performed starting from the root node</p>
|
|
322
311
|
</div>
|
|
323
312
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
324
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">
|
|
313
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>AbstractResultsByProperty<N></code>.</p>
|
|
325
314
|
|
|
326
315
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
327
316
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#BFS">BFS</a></p>
|
|
328
317
|
<ul>
|
|
329
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
330
|
-
<li class="tsd-signature tsd-anchor-link" id="BFS.BFS-4"><span class="tsd-kind-call-signature">BFS</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><
|
|
318
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L941">src/data-structures/binary-tree/abstract-binary-tree.ts:941</a></li></ul></aside></li>
|
|
319
|
+
<li class="tsd-signature tsd-anchor-link" id="BFS.BFS-4"><span class="tsd-kind-call-signature">BFS</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span><a href="#BFS.BFS-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
331
320
|
<li class="tsd-description">
|
|
332
321
|
<div class="tsd-comment tsd-typography"><p>The BFS function performs a breadth-first search on a binary tree and returns the results based on a specified node
|
|
333
322
|
or property name.</p>
|
|
@@ -343,12 +332,12 @@ performed starting from that node. If a property name is provided, the breadth-f
|
|
|
343
332
|
performed starting from the root node</p>
|
|
344
333
|
</div>
|
|
345
334
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
346
|
-
<h4 class="tsd-returns-title">Returns <
|
|
335
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>AbstractResultsByProperty<N></code>.</p>
|
|
347
336
|
|
|
348
337
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
349
338
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#BFS">BFS</a></p>
|
|
350
339
|
<ul>
|
|
351
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
340
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L943">src/data-structures/binary-tree/abstract-binary-tree.ts:943</a></li></ul></aside></li>
|
|
352
341
|
<li class="tsd-signature tsd-anchor-link" id="BFS.BFS-5"><span class="tsd-kind-call-signature">BFS</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><a href="#BFS.BFS-5" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
353
342
|
<li class="tsd-description">
|
|
354
343
|
<div class="tsd-comment tsd-typography"><p>The BFS function performs a breadth-first search on a binary tree and returns the results based on a specified node
|
|
@@ -365,12 +354,12 @@ performed starting from that node. If a property name is provided, the breadth-f
|
|
|
365
354
|
performed starting from the root node</p>
|
|
366
355
|
</div>
|
|
367
356
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
368
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>
|
|
357
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>AbstractResultsByProperty<N></code>.</p>
|
|
369
358
|
|
|
370
359
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
371
360
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#BFS">BFS</a></p>
|
|
372
361
|
<ul>
|
|
373
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
362
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L945">src/data-structures/binary-tree/abstract-binary-tree.ts:945</a></li></ul></aside></li></ul></section>
|
|
374
363
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="DFS" class="tsd-anchor"></a>
|
|
375
364
|
<h3 class="tsd-anchor-link"><span>DFS</span><a href="#DFS" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
376
365
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -379,12 +368,12 @@ performed starting from the root node</p>
|
|
|
379
368
|
<div class="tsd-comment tsd-typography"><p>The DFS function performs a depth-first search traversal on a binary tree and returns the results based on the
|
|
380
369
|
specified pattern and node or property name.</p>
|
|
381
370
|
</div>
|
|
382
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>
|
|
371
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>AbstractResultsByProperty<N></code>.</p>
|
|
383
372
|
|
|
384
373
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
385
374
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#DFS">DFS</a></p>
|
|
386
375
|
<ul>
|
|
387
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
376
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L973">src/data-structures/binary-tree/abstract-binary-tree.ts:973</a></li></ul></aside></li>
|
|
388
377
|
<li class="tsd-signature tsd-anchor-link" id="DFS.DFS-2"><span class="tsd-kind-call-signature">DFS</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><a href="#DFS.DFS-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
389
378
|
<li class="tsd-description">
|
|
390
379
|
<div class="tsd-comment tsd-typography"><p>The DFS function performs a depth-first search traversal on a binary tree and returns the results based on the
|
|
@@ -408,13 +397,13 @@ either the name of a property in the <code>BinaryTreeNode</code> object or the v
|
|
|
408
397
|
no value</p>
|
|
409
398
|
</div>
|
|
410
399
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
411
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>
|
|
400
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>AbstractResultsByProperty<N></code>.</p>
|
|
412
401
|
|
|
413
402
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
414
403
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#DFS">DFS</a></p>
|
|
415
404
|
<ul>
|
|
416
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
417
|
-
<li class="tsd-signature tsd-anchor-link" id="DFS.DFS-3"><span class="tsd-kind-call-signature">DFS</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
405
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L975">src/data-structures/binary-tree/abstract-binary-tree.ts:975</a></li></ul></aside></li>
|
|
406
|
+
<li class="tsd-signature tsd-anchor-link" id="DFS.DFS-3"><span class="tsd-kind-call-signature">DFS</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span><a href="#DFS.DFS-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
418
407
|
<li class="tsd-description">
|
|
419
408
|
<div class="tsd-comment tsd-typography"><p>The DFS function performs a depth-first search traversal on a binary tree and returns the results based on the
|
|
420
409
|
specified pattern and node or property name.</p>
|
|
@@ -437,13 +426,13 @@ either the name of a property in the <code>BinaryTreeNode</code> object or the v
|
|
|
437
426
|
no value</p>
|
|
438
427
|
</div>
|
|
439
428
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
440
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">
|
|
429
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>AbstractResultsByProperty<N></code>.</p>
|
|
441
430
|
|
|
442
431
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
443
432
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#DFS">DFS</a></p>
|
|
444
433
|
<ul>
|
|
445
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
446
|
-
<li class="tsd-signature tsd-anchor-link" id="DFS.DFS-4"><span class="tsd-kind-call-signature">DFS</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><
|
|
434
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L977">src/data-structures/binary-tree/abstract-binary-tree.ts:977</a></li></ul></aside></li>
|
|
435
|
+
<li class="tsd-signature tsd-anchor-link" id="DFS.DFS-4"><span class="tsd-kind-call-signature">DFS</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span><a href="#DFS.DFS-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
447
436
|
<li class="tsd-description">
|
|
448
437
|
<div class="tsd-comment tsd-typography"><p>The DFS function performs a depth-first search traversal on a binary tree and returns the results based on the
|
|
449
438
|
specified pattern and node or property name.</p>
|
|
@@ -466,12 +455,12 @@ either the name of a property in the <code>BinaryTreeNode</code> object or the v
|
|
|
466
455
|
no value</p>
|
|
467
456
|
</div>
|
|
468
457
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
469
|
-
<h4 class="tsd-returns-title">Returns <
|
|
458
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>AbstractResultsByProperty<N></code>.</p>
|
|
470
459
|
|
|
471
460
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
472
461
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#DFS">DFS</a></p>
|
|
473
462
|
<ul>
|
|
474
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
463
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L979">src/data-structures/binary-tree/abstract-binary-tree.ts:979</a></li></ul></aside></li>
|
|
475
464
|
<li class="tsd-signature tsd-anchor-link" id="DFS.DFS-5"><span class="tsd-kind-call-signature">DFS</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><a href="#DFS.DFS-5" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
476
465
|
<li class="tsd-description">
|
|
477
466
|
<div class="tsd-comment tsd-typography"><p>The DFS function performs a depth-first search traversal on a binary tree and returns the results based on the
|
|
@@ -495,12 +484,12 @@ either the name of a property in the <code>BinaryTreeNode</code> object or the v
|
|
|
495
484
|
no value</p>
|
|
496
485
|
</div>
|
|
497
486
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
498
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>
|
|
487
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>AbstractResultsByProperty<N></code>.</p>
|
|
499
488
|
|
|
500
489
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
501
490
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#DFS">DFS</a></p>
|
|
502
491
|
<ul>
|
|
503
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
492
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L981">src/data-structures/binary-tree/abstract-binary-tree.ts:981</a></li></ul></aside></li></ul></section>
|
|
504
493
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="DFSIterative" class="tsd-anchor"></a>
|
|
505
494
|
<h3 class="tsd-anchor-link"><span>DFSIterative</span><a href="#DFSIterative" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
506
495
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -513,7 +502,7 @@ Space complexity of Iterative DFS equals to recursive DFS which is O(n) because
|
|
|
513
502
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
514
503
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#DFSIterative">DFSIterative</a></p>
|
|
515
504
|
<ul>
|
|
516
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
505
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1023">src/data-structures/binary-tree/abstract-binary-tree.ts:1023</a></li></ul></aside></li>
|
|
517
506
|
<li class="tsd-signature tsd-anchor-link" id="DFSIterative.DFSIterative-2"><span class="tsd-kind-call-signature">DFSIterative</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><a href="#DFSIterative.DFSIterative-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
518
507
|
<li class="tsd-description">
|
|
519
508
|
<div class="tsd-comment tsd-typography"><p>Time complexity is O(n)
|
|
@@ -532,8 +521,8 @@ Space complexity of Iterative DFS equals to recursive DFS which is O(n) because
|
|
|
532
521
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
533
522
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#DFSIterative">DFSIterative</a></p>
|
|
534
523
|
<ul>
|
|
535
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
536
|
-
<li class="tsd-signature tsd-anchor-link" id="DFSIterative.DFSIterative-3"><span class="tsd-kind-call-signature">DFSIterative</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
524
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1025">src/data-structures/binary-tree/abstract-binary-tree.ts:1025</a></li></ul></aside></li>
|
|
525
|
+
<li class="tsd-signature tsd-anchor-link" id="DFSIterative.DFSIterative-3"><span class="tsd-kind-call-signature">DFSIterative</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span><a href="#DFSIterative.DFSIterative-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
537
526
|
<li class="tsd-description">
|
|
538
527
|
<div class="tsd-comment tsd-typography"><p>Time complexity is O(n)
|
|
539
528
|
Space complexity of Iterative DFS equals to recursive DFS which is O(n) because of the stack</p>
|
|
@@ -547,12 +536,12 @@ Space complexity of Iterative DFS equals to recursive DFS which is O(n) because
|
|
|
547
536
|
<li>
|
|
548
537
|
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">nodeOrPropertyName</span>: <span class="tsd-signature-type">"val"</span></h5>
|
|
549
538
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
550
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">
|
|
539
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4>
|
|
551
540
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
552
541
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#DFSIterative">DFSIterative</a></p>
|
|
553
542
|
<ul>
|
|
554
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
555
|
-
<li class="tsd-signature tsd-anchor-link" id="DFSIterative.DFSIterative-4"><span class="tsd-kind-call-signature">DFSIterative</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><
|
|
543
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1027">src/data-structures/binary-tree/abstract-binary-tree.ts:1027</a></li></ul></aside></li>
|
|
544
|
+
<li class="tsd-signature tsd-anchor-link" id="DFSIterative.DFSIterative-4"><span class="tsd-kind-call-signature">DFSIterative</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span><a href="#DFSIterative.DFSIterative-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
556
545
|
<li class="tsd-description">
|
|
557
546
|
<div class="tsd-comment tsd-typography"><p>Time complexity is O(n)
|
|
558
547
|
Space complexity of Iterative DFS equals to recursive DFS which is O(n) because of the stack</p>
|
|
@@ -566,11 +555,11 @@ Space complexity of Iterative DFS equals to recursive DFS which is O(n) because
|
|
|
566
555
|
<li>
|
|
567
556
|
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">nodeOrPropertyName</span>: <span class="tsd-signature-type">"node"</span></h5>
|
|
568
557
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
569
|
-
<h4 class="tsd-returns-title">Returns <
|
|
558
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4>
|
|
570
559
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
571
560
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#DFSIterative">DFSIterative</a></p>
|
|
572
561
|
<ul>
|
|
573
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
562
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1029">src/data-structures/binary-tree/abstract-binary-tree.ts:1029</a></li></ul></aside></li>
|
|
574
563
|
<li class="tsd-signature tsd-anchor-link" id="DFSIterative.DFSIterative-5"><span class="tsd-kind-call-signature">DFSIterative</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><a href="#DFSIterative.DFSIterative-5" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
575
564
|
<li class="tsd-description">
|
|
576
565
|
<div class="tsd-comment tsd-typography"><p>Time complexity is O(n)
|
|
@@ -589,7 +578,7 @@ Space complexity of Iterative DFS equals to recursive DFS which is O(n) because
|
|
|
589
578
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
590
579
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#DFSIterative">DFSIterative</a></p>
|
|
591
580
|
<ul>
|
|
592
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
581
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1031">src/data-structures/binary-tree/abstract-binary-tree.ts:1031</a></li></ul></aside></li></ul></section>
|
|
593
582
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_accumulatedByPropertyName" class="tsd-anchor"></a>
|
|
594
583
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_accumulated<wbr/>By<wbr/>Property<wbr/>Name</span><a href="#_accumulatedByPropertyName" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
595
584
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -602,8 +591,8 @@ provided property name or a default property name.</p>
|
|
|
602
591
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
603
592
|
<ul class="tsd-parameter-list">
|
|
604
593
|
<li>
|
|
605
|
-
<h5><span class="tsd-kind-parameter">node</span>: <
|
|
606
|
-
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is of type <code>
|
|
594
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
595
|
+
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is of type <code>N</code>, which represents a node in a binary tree.</p>
|
|
607
596
|
</div>
|
|
608
597
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
609
598
|
<li>
|
|
@@ -617,7 +606,7 @@ the property name of the node that should be accumulated. If it is a node object
|
|
|
617
606
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
618
607
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_accumulatedByPropertyName">_accumulatedByPropertyName</a></p>
|
|
619
608
|
<ul>
|
|
620
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
609
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1443">src/data-structures/binary-tree/abstract-binary-tree.ts:1443</a></li></ul></aside></li></ul></section>
|
|
621
610
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_compare" class="tsd-anchor"></a>
|
|
622
611
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_compare</span><a href="#_compare" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
623
612
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -645,11 +634,46 @@ than), or CP.eq (equal).</p>
|
|
|
645
634
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
646
635
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_compare">_compare</a></p>
|
|
647
636
|
<ul>
|
|
648
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
637
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/bst.ts#L485">src/data-structures/binary-tree/bst.ts:485</a></li></ul></aside></li></ul></section>
|
|
638
|
+
<section class="tsd-panel tsd-member"><a id="_createNode" class="tsd-anchor"></a>
|
|
639
|
+
<h3 class="tsd-anchor-link"><span>_create<wbr/>Node</span><a href="#_createNode" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
640
|
+
<ul class="tsd-signatures">
|
|
641
|
+
<li class="tsd-signature tsd-anchor-link" id="_createNode._createNode-1"><span class="tsd-kind-call-signature">_create<wbr/>Node</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">id</span>, <span class="tsd-kind-parameter">val</span>, <span class="tsd-kind-parameter">count</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><a href="#_createNode._createNode-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
642
|
+
<li class="tsd-description">
|
|
643
|
+
<div class="tsd-comment tsd-typography"><p>The function creates a new binary tree node with the given id, value, and count if the value is not null, otherwise
|
|
644
|
+
it returns null.</p>
|
|
645
|
+
</div>
|
|
646
|
+
<div class="tsd-parameters">
|
|
647
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
648
|
+
<ul class="tsd-parameter-list">
|
|
649
|
+
<li>
|
|
650
|
+
<h5><span class="tsd-kind-parameter">id</span>: <span class="tsd-signature-type">number</span></h5>
|
|
651
|
+
<div class="tsd-comment tsd-typography"><p>The <code>id</code> parameter is the identifier for the binary tree node. It is of type
|
|
652
|
+
<code>BinaryTreeNodeId</code>.</p>
|
|
653
|
+
</div>
|
|
654
|
+
<div class="tsd-comment tsd-typography"></div></li>
|
|
655
|
+
<li>
|
|
656
|
+
<h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span></h5>
|
|
657
|
+
<div class="tsd-comment tsd-typography"><p>The <code>val</code> parameter represents the value of the node. It can be of type <code>N</code> (generic type)
|
|
658
|
+
or <code>null</code>.</p>
|
|
659
|
+
</div>
|
|
660
|
+
<div class="tsd-comment tsd-typography"></div></li>
|
|
661
|
+
<li>
|
|
662
|
+
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">count</span>: <span class="tsd-signature-type">number</span></h5>
|
|
663
|
+
<div class="tsd-comment tsd-typography"><p>The <code>count</code> parameter is an optional parameter of type <code>number</code>. It represents the number
|
|
664
|
+
of occurrences of the value in the binary tree node. If not provided, the default value is <code>undefined</code>.</p>
|
|
665
|
+
</div>
|
|
666
|
+
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
667
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h4><p>a BinaryTreeNode object if the value is not null, otherwise it returns null.</p>
|
|
668
|
+
|
|
669
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
670
|
+
<p>Overrides <a href="BST.html">BST</a>.<a href="BST.html#_createNode">_createNode</a></p>
|
|
671
|
+
<ul>
|
|
672
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/avl-tree.ts#L21">src/data-structures/binary-tree/avl-tree.ts:21</a></li></ul></aside></li></ul></section>
|
|
649
673
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_getResultByPropertyName" class="tsd-anchor"></a>
|
|
650
674
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_get<wbr/>Result<wbr/>By<wbr/>Property<wbr/>Name</span><a href="#_getResultByPropertyName" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
651
675
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
652
|
-
<li class="tsd-signature tsd-anchor-link" id="_getResultByPropertyName._getResultByPropertyName-1"><span class="tsd-kind-call-signature">_get<wbr/>Result<wbr/>By<wbr/>Property<wbr/>Name</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../types/
|
|
676
|
+
<li class="tsd-signature tsd-anchor-link" id="_getResultByPropertyName._getResultByPropertyName-1"><span class="tsd-kind-call-signature">_get<wbr/>Result<wbr/>By<wbr/>Property<wbr/>Name</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../types/AbstractResultsByProperty.html" class="tsd-signature-type tsd-kind-type-alias">AbstractResultsByProperty</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">></span><a href="#_getResultByPropertyName._getResultByPropertyName-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
653
677
|
<li class="tsd-description">
|
|
654
678
|
<div class="tsd-comment tsd-typography"><p>The function <code>_getResultByPropertyName</code> returns different results based on the provided property name or defaulting
|
|
655
679
|
to 'id'.</p>
|
|
@@ -663,12 +687,12 @@ to 'id'.</p>
|
|
|
663
687
|
can accept a value of type <code>NodeOrPropertyName</code>.</p>
|
|
664
688
|
</div>
|
|
665
689
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
666
|
-
<h4 class="tsd-returns-title">Returns <a href="../types/
|
|
690
|
+
<h4 class="tsd-returns-title">Returns <a href="../types/AbstractResultsByProperty.html" class="tsd-signature-type tsd-kind-type-alias">AbstractResultsByProperty</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">></span></h4><p>The method returns an object of type <code>AbstractResultsByProperty<T></code>.</p>
|
|
667
691
|
|
|
668
692
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
669
693
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_getResultByPropertyName">_getResultByPropertyName</a></p>
|
|
670
694
|
<ul>
|
|
671
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
695
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1472">src/data-structures/binary-tree/abstract-binary-tree.ts:1472</a></li></ul></aside></li></ul></section>
|
|
672
696
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_pushByPropertyNameStopOrNot" class="tsd-anchor"></a>
|
|
673
697
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_push<wbr/>By<wbr/>Property<wbr/>Name<wbr/>Stop<wbr/>Or<wbr/>Not</span><a href="#_pushByPropertyNameStopOrNot" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
674
698
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -681,18 +705,18 @@ a result array.</p>
|
|
|
681
705
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
682
706
|
<ul class="tsd-parameter-list">
|
|
683
707
|
<li>
|
|
684
|
-
<h5><span class="tsd-kind-parameter">cur</span>: <
|
|
708
|
+
<h5><span class="tsd-kind-parameter">cur</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
685
709
|
<div class="tsd-comment tsd-typography"><p>The current binary tree node that is being checked.</p>
|
|
686
710
|
</div>
|
|
687
711
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
688
712
|
<li>
|
|
689
|
-
<h5><span class="tsd-kind-parameter">result</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
713
|
+
<h5><span class="tsd-kind-parameter">result</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span></h5>
|
|
690
714
|
<div class="tsd-comment tsd-typography"><p>An array that stores the matching nodes found during the
|
|
691
715
|
traversal.</p>
|
|
692
716
|
</div>
|
|
693
717
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
694
718
|
<li>
|
|
695
|
-
<h5><span class="tsd-kind-parameter">nodeProperty</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
719
|
+
<h5><span class="tsd-kind-parameter">nodeProperty</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
696
720
|
<div class="tsd-comment tsd-typography"><p>The <code>nodeProperty</code> parameter is the value that we are searching for in
|
|
697
721
|
the binary tree nodes. It can be either the <code>id</code>, <code>count</code>, or <code>val</code> property of the node.</p>
|
|
698
722
|
</div>
|
|
@@ -716,7 +740,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
716
740
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
717
741
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_pushByPropertyNameStopOrNot">_pushByPropertyNameStopOrNot</a></p>
|
|
718
742
|
<ul>
|
|
719
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
743
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1406">src/data-structures/binary-tree/abstract-binary-tree.ts:1406</a></li></ul></aside></li></ul></section>
|
|
720
744
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_resetResults" class="tsd-anchor"></a>
|
|
721
745
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_reset<wbr/>Results</span><a href="#_resetResults" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
722
746
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -728,7 +752,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
728
752
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
729
753
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_resetResults">_resetResults</a></p>
|
|
730
754
|
<ul>
|
|
731
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
755
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1382">src/data-structures/binary-tree/abstract-binary-tree.ts:1382</a></li></ul></aside></li></ul></section>
|
|
732
756
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setAutoIncrementId" class="tsd-anchor"></a>
|
|
733
757
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_set<wbr/>Auto<wbr/>Increment<wbr/>Id</span><a href="#_setAutoIncrementId" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
734
758
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -742,7 +766,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
742
766
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
743
767
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_setAutoIncrementId">_setAutoIncrementId</a></p>
|
|
744
768
|
<ul>
|
|
745
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
769
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1351">src/data-structures/binary-tree/abstract-binary-tree.ts:1351</a></li></ul></aside></li></ul></section>
|
|
746
770
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setCount" class="tsd-anchor"></a>
|
|
747
771
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_set<wbr/>Count</span><a href="#_setCount" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
748
772
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -756,7 +780,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
756
780
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
757
781
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_setCount">_setCount</a></p>
|
|
758
782
|
<ul>
|
|
759
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
783
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1375">src/data-structures/binary-tree/abstract-binary-tree.ts:1375</a></li></ul></aside></li></ul></section>
|
|
760
784
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setIsDuplicatedVal" class="tsd-anchor"></a>
|
|
761
785
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_set<wbr/>Is<wbr/>Duplicated<wbr/>Val</span><a href="#_setIsDuplicatedVal" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
762
786
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -770,7 +794,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
770
794
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
771
795
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_setIsDuplicatedVal">_setIsDuplicatedVal</a></p>
|
|
772
796
|
<ul>
|
|
773
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
797
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1359">src/data-structures/binary-tree/abstract-binary-tree.ts:1359</a></li></ul></aside></li></ul></section>
|
|
774
798
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setLoopType" class="tsd-anchor"></a>
|
|
775
799
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_set<wbr/>Loop<wbr/>Type</span><a href="#_setLoopType" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
776
800
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -784,7 +808,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
784
808
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
785
809
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_setLoopType">_setLoopType</a></p>
|
|
786
810
|
<ul>
|
|
787
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
811
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1327">src/data-structures/binary-tree/abstract-binary-tree.ts:1327</a></li></ul></aside></li></ul></section>
|
|
788
812
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setMaxId" class="tsd-anchor"></a>
|
|
789
813
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_set<wbr/>Max<wbr/>Id</span><a href="#_setMaxId" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
790
814
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -798,7 +822,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
798
822
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
799
823
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_setMaxId">_setMaxId</a></p>
|
|
800
824
|
<ul>
|
|
801
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
825
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1355">src/data-structures/binary-tree/abstract-binary-tree.ts:1355</a></li></ul></aside></li></ul></section>
|
|
802
826
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setRoot" class="tsd-anchor"></a>
|
|
803
827
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_set<wbr/>Root</span><a href="#_setRoot" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
804
828
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -808,11 +832,11 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
808
832
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
809
833
|
<ul class="tsd-parameter-list">
|
|
810
834
|
<li>
|
|
811
|
-
<h5><span class="tsd-kind-parameter">v</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
835
|
+
<h5><span class="tsd-kind-parameter">v</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5></li></ul></div>
|
|
812
836
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
813
837
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_setRoot">_setRoot</a></p>
|
|
814
838
|
<ul>
|
|
815
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
839
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1363">src/data-structures/binary-tree/abstract-binary-tree.ts:1363</a></li></ul></aside></li></ul></section>
|
|
816
840
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setSize" class="tsd-anchor"></a>
|
|
817
841
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_set<wbr/>Size</span><a href="#_setSize" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
818
842
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -826,7 +850,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
826
850
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
827
851
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_setSize">_setSize</a></p>
|
|
828
852
|
<ul>
|
|
829
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
853
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1371">src/data-structures/binary-tree/abstract-binary-tree.ts:1371</a></li></ul></aside></li></ul></section>
|
|
830
854
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setVisitedId" class="tsd-anchor"></a>
|
|
831
855
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_set<wbr/>Visited<wbr/>Id</span><a href="#_setVisitedId" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
832
856
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -840,7 +864,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
840
864
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
841
865
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_setVisitedId">_setVisitedId</a></p>
|
|
842
866
|
<ul>
|
|
843
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
867
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1331">src/data-structures/binary-tree/abstract-binary-tree.ts:1331</a></li></ul></aside></li></ul></section>
|
|
844
868
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setVisitedLeftSum" class="tsd-anchor"></a>
|
|
845
869
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_set<wbr/>Visited<wbr/>Left<wbr/>Sum</span><a href="#_setVisitedLeftSum" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
846
870
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -854,7 +878,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
854
878
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
855
879
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_setVisitedLeftSum">_setVisitedLeftSum</a></p>
|
|
856
880
|
<ul>
|
|
857
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
881
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1347">src/data-structures/binary-tree/abstract-binary-tree.ts:1347</a></li></ul></aside></li></ul></section>
|
|
858
882
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setVisitedNode" class="tsd-anchor"></a>
|
|
859
883
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_set<wbr/>Visited<wbr/>Node</span><a href="#_setVisitedNode" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
860
884
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -864,11 +888,11 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
864
888
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
865
889
|
<ul class="tsd-parameter-list">
|
|
866
890
|
<li>
|
|
867
|
-
<h5><span class="tsd-kind-parameter">value</span>: <
|
|
891
|
+
<h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h5></li></ul></div>
|
|
868
892
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
869
893
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_setVisitedNode">_setVisitedNode</a></p>
|
|
870
894
|
<ul>
|
|
871
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
895
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1339">src/data-structures/binary-tree/abstract-binary-tree.ts:1339</a></li></ul></aside></li></ul></section>
|
|
872
896
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setVisitedVal" class="tsd-anchor"></a>
|
|
873
897
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_set<wbr/>Visited<wbr/>Val</span><a href="#_setVisitedVal" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
874
898
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -878,15 +902,15 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
878
902
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
879
903
|
<ul class="tsd-parameter-list">
|
|
880
904
|
<li>
|
|
881
|
-
<h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type tsd-kind-type-parameter">
|
|
905
|
+
<h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h5></li></ul></div>
|
|
882
906
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
883
907
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_setVisitedVal">_setVisitedVal</a></p>
|
|
884
908
|
<ul>
|
|
885
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
909
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1335">src/data-structures/binary-tree/abstract-binary-tree.ts:1335</a></li></ul></aside></li></ul></section>
|
|
886
910
|
<section class="tsd-panel tsd-member"><a id="add" class="tsd-anchor"></a>
|
|
887
911
|
<h3 class="tsd-anchor-link"><span>add</span><a href="#add" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
888
912
|
<ul class="tsd-signatures">
|
|
889
|
-
<li class="tsd-signature tsd-anchor-link" id="add.add-1"><span class="tsd-kind-call-signature">add</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">id</span>, <span class="tsd-kind-parameter">val</span>, <span class="tsd-kind-parameter">count</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
913
|
+
<li class="tsd-signature tsd-anchor-link" id="add.add-1"><span class="tsd-kind-call-signature">add</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">id</span>, <span class="tsd-kind-parameter">val</span>, <span class="tsd-kind-parameter">count</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><a href="#add.add-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
890
914
|
<li class="tsd-description">
|
|
891
915
|
<div class="tsd-comment tsd-typography"><p>The function overrides the add method of a Binary Search Tree to insert a node with a given id and value, and then
|
|
892
916
|
balances the tree.</p>
|
|
@@ -901,9 +925,9 @@ update in the AVL tree.</p>
|
|
|
901
925
|
</div>
|
|
902
926
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
903
927
|
<li>
|
|
904
|
-
<h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
928
|
+
<h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span></h5>
|
|
905
929
|
<div class="tsd-comment tsd-typography"><p>The <code>val</code> parameter represents the value that you want to assign to the node with the given
|
|
906
|
-
<code>id</code>. It can be of type <code>
|
|
930
|
+
<code>id</code>. It can be of type <code>N</code> (the generic type) or <code>null</code>.</p>
|
|
907
931
|
</div>
|
|
908
932
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
909
933
|
<li>
|
|
@@ -913,16 +937,16 @@ of times the value <code>val</code> should be inserted into the AVL tree. If the
|
|
|
913
937
|
to <code>1</code>, indicating that the value should be inserted once.</p>
|
|
914
938
|
</div>
|
|
915
939
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
916
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
940
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h4><p>The method is returning either an N object or null.</p>
|
|
917
941
|
|
|
918
942
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
919
943
|
<p>Overrides <a href="BST.html">BST</a>.<a href="BST.html#add">add</a></p>
|
|
920
944
|
<ul>
|
|
921
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
945
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/avl-tree.ts#L38">src/data-structures/binary-tree/avl-tree.ts:38</a></li></ul></aside></li></ul></section>
|
|
922
946
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="addMany" class="tsd-anchor"></a>
|
|
923
947
|
<h3 class="tsd-anchor-link"><span>add<wbr/>Many</span><a href="#addMany" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
924
948
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
925
|
-
<li class="tsd-signature tsd-anchor-link" id="addMany.addMany-1"><span class="tsd-kind-call-signature">add<wbr/>Many</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
949
|
+
<li class="tsd-signature tsd-anchor-link" id="addMany.addMany-1"><span class="tsd-kind-call-signature">add<wbr/>Many</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span><a href="#addMany.addMany-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
926
950
|
<li class="tsd-description">
|
|
927
951
|
<div class="tsd-comment tsd-typography"><p>The <code>addMany</code> function inserts multiple items into a binary tree and returns an array of the inserted nodes or
|
|
928
952
|
null/undefined values.</p>
|
|
@@ -931,21 +955,21 @@ null/undefined values.</p>
|
|
|
931
955
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
932
956
|
<ul class="tsd-parameter-list">
|
|
933
957
|
<li>
|
|
934
|
-
<h5><span class="tsd-kind-parameter">data</span>: <
|
|
935
|
-
<div class="tsd-comment tsd-typography"><p>The <code>data</code> parameter can be either an array of elements of type <code>
|
|
936
|
-
array of <code>
|
|
958
|
+
<h5><span class="tsd-kind-parameter">data</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[]</span></h5>
|
|
959
|
+
<div class="tsd-comment tsd-typography"><p>The <code>data</code> parameter can be either an array of elements of type <code>N</code> or an
|
|
960
|
+
array of <code>N</code> objects.</p>
|
|
937
961
|
</div>
|
|
938
962
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
939
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">(</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
963
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">(</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>addMany</code> returns an array of <code>N</code>, <code>null</code>, or <code>undefined</code> values.</p>
|
|
940
964
|
|
|
941
965
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
942
966
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#addMany">addMany</a></p>
|
|
943
967
|
<ul>
|
|
944
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
968
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L362">src/data-structures/binary-tree/abstract-binary-tree.ts:362</a></li></ul></aside></li></ul></section>
|
|
945
969
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="addTo" class="tsd-anchor"></a>
|
|
946
970
|
<h3 class="tsd-anchor-link"><span>add<wbr/>To</span><a href="#addTo" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
947
971
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
948
|
-
<li class="tsd-signature tsd-anchor-link" id="addTo.addTo-1"><span class="tsd-kind-call-signature">add<wbr/>To</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">newNode</span>, <span class="tsd-kind-parameter">parent</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
972
|
+
<li class="tsd-signature tsd-anchor-link" id="addTo.addTo-1"><span class="tsd-kind-call-signature">add<wbr/>To</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">newNode</span>, <span class="tsd-kind-parameter">parent</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><a href="#addTo.addTo-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
949
973
|
<li class="tsd-description">
|
|
950
974
|
<div class="tsd-comment tsd-typography"><p>The function inserts a new node into a binary tree as the left or right child of a given parent node.</p>
|
|
951
975
|
</div>
|
|
@@ -953,23 +977,23 @@ array of <code>BinaryTreeNode<T></code> objects.</p>
|
|
|
953
977
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
954
978
|
<ul class="tsd-parameter-list">
|
|
955
979
|
<li>
|
|
956
|
-
<h5><span class="tsd-kind-parameter">newNode</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
980
|
+
<h5><span class="tsd-kind-parameter">newNode</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
957
981
|
<div class="tsd-comment tsd-typography"><p>The <code>newNode</code> parameter is an instance of the <code>BinaryTreeNode</code> class or
|
|
958
982
|
<code>null</code>. It represents the node that needs to be inserted into the binary tree.</p>
|
|
959
983
|
</div>
|
|
960
984
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
961
985
|
<li>
|
|
962
|
-
<h5><span class="tsd-kind-parameter">parent</span>: <
|
|
986
|
+
<h5><span class="tsd-kind-parameter">parent</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
963
987
|
<div class="tsd-comment tsd-typography"><p>The <code>parent</code> parameter is a BinaryTreeNode object representing the parent node to which the new node
|
|
964
988
|
will be inserted as a child.</p>
|
|
965
989
|
</div>
|
|
966
990
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
967
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
991
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h4><p>The method returns the newly inserted node, either as the left child or the right child of the parent node.</p>
|
|
968
992
|
|
|
969
993
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
970
994
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#addTo">addTo</a></p>
|
|
971
995
|
<ul>
|
|
972
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
996
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L322">src/data-structures/binary-tree/abstract-binary-tree.ts:322</a></li></ul></aside></li></ul></section>
|
|
973
997
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="allGreaterNodesAdd" class="tsd-anchor"></a>
|
|
974
998
|
<h3 class="tsd-anchor-link"><span>all<wbr/>Greater<wbr/>Nodes<wbr/>Add</span><a href="#allGreaterNodesAdd" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
975
999
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -982,8 +1006,8 @@ that have a greater value than a given node.</p>
|
|
|
982
1006
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
983
1007
|
<ul class="tsd-parameter-list">
|
|
984
1008
|
<li>
|
|
985
|
-
<h5><span class="tsd-kind-parameter">node</span>: <
|
|
986
|
-
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is of type <code>
|
|
1009
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1010
|
+
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is of type <code>N</code>, which represents a node in a binary search tree. It
|
|
987
1011
|
contains properties such as <code>id</code> and <code>count</code>.</p>
|
|
988
1012
|
</div>
|
|
989
1013
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
@@ -1005,7 +1029,7 @@ defaults to 'id'.</p>
|
|
|
1005
1029
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1006
1030
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#allGreaterNodesAdd">allGreaterNodesAdd</a></p>
|
|
1007
1031
|
<ul>
|
|
1008
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1032
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/bst.ts#L341">src/data-structures/binary-tree/bst.ts:341</a></li></ul></aside></li></ul></section>
|
|
1009
1033
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="balance" class="tsd-anchor"></a>
|
|
1010
1034
|
<h3 class="tsd-anchor-link"><span>balance</span><a href="#balance" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1011
1035
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1019,7 +1043,7 @@ recursive or iterative approach.</p>
|
|
|
1019
1043
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1020
1044
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#balance">balance</a></p>
|
|
1021
1045
|
<ul>
|
|
1022
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1046
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/bst.ts#L392">src/data-structures/binary-tree/bst.ts:392</a></li></ul></aside></li></ul></section>
|
|
1023
1047
|
<section class="tsd-panel tsd-member"><a id="balanceFactor" class="tsd-anchor"></a>
|
|
1024
1048
|
<h3 class="tsd-anchor-link"><span>balance<wbr/>Factor</span><a href="#balanceFactor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1025
1049
|
<ul class="tsd-signatures">
|
|
@@ -1032,15 +1056,15 @@ height of its right subtree.</p>
|
|
|
1032
1056
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1033
1057
|
<ul class="tsd-parameter-list">
|
|
1034
1058
|
<li>
|
|
1035
|
-
<h5><span class="tsd-kind-parameter">node</span>: <
|
|
1036
|
-
<div class="tsd-comment tsd-typography"><p>The parameter "node" is of type
|
|
1059
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1060
|
+
<div class="tsd-comment tsd-typography"><p>The parameter "node" is of type N, which represents a node in an AVL tree.</p>
|
|
1037
1061
|
</div>
|
|
1038
1062
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1039
1063
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>The balance factor of the given AVL tree node.</p>
|
|
1040
1064
|
|
|
1041
1065
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1042
1066
|
<ul>
|
|
1043
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1067
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/avl-tree.ts#L70">src/data-structures/binary-tree/avl-tree.ts:70</a></li></ul></aside></li></ul></section>
|
|
1044
1068
|
<section class="tsd-panel tsd-member"><a id="balanceLL" class="tsd-anchor"></a>
|
|
1045
1069
|
<h3 class="tsd-anchor-link"><span>balanceLL</span><a href="#balanceLL" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1046
1070
|
<ul class="tsd-signatures">
|
|
@@ -1052,14 +1076,14 @@ height of its right subtree.</p>
|
|
|
1052
1076
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1053
1077
|
<ul class="tsd-parameter-list">
|
|
1054
1078
|
<li>
|
|
1055
|
-
<h5><span class="tsd-kind-parameter">A</span>: <
|
|
1079
|
+
<h5><span class="tsd-kind-parameter">A</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1056
1080
|
<div class="tsd-comment tsd-typography"><p>The parameter A is an AVLTreeNode object.</p>
|
|
1057
1081
|
</div>
|
|
1058
1082
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1059
1083
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
1060
1084
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1061
1085
|
<ul>
|
|
1062
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1086
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/avl-tree.ts#L132">src/data-structures/binary-tree/avl-tree.ts:132</a></li></ul></aside></li></ul></section>
|
|
1063
1087
|
<section class="tsd-panel tsd-member"><a id="balanceLR" class="tsd-anchor"></a>
|
|
1064
1088
|
<h3 class="tsd-anchor-link"><span>balanceLR</span><a href="#balanceLR" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1065
1089
|
<ul class="tsd-signatures">
|
|
@@ -1071,14 +1095,14 @@ height of its right subtree.</p>
|
|
|
1071
1095
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1072
1096
|
<ul class="tsd-parameter-list">
|
|
1073
1097
|
<li>
|
|
1074
|
-
<h5><span class="tsd-kind-parameter">A</span>: <
|
|
1098
|
+
<h5><span class="tsd-kind-parameter">A</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1075
1099
|
<div class="tsd-comment tsd-typography"><p>A is an AVLTreeNode object.</p>
|
|
1076
1100
|
</div>
|
|
1077
1101
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1078
1102
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
1079
1103
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1080
1104
|
<ul>
|
|
1081
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1105
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/avl-tree.ts#L162">src/data-structures/binary-tree/avl-tree.ts:162</a></li></ul></aside></li></ul></section>
|
|
1082
1106
|
<section class="tsd-panel tsd-member"><a id="balancePath" class="tsd-anchor"></a>
|
|
1083
1107
|
<h3 class="tsd-anchor-link"><span>balance<wbr/>Path</span><a href="#balancePath" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1084
1108
|
<ul class="tsd-signatures">
|
|
@@ -1091,14 +1115,14 @@ each node in the path from the given node to the root.</p>
|
|
|
1091
1115
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1092
1116
|
<ul class="tsd-parameter-list">
|
|
1093
1117
|
<li>
|
|
1094
|
-
<h5><span class="tsd-kind-parameter">node</span>: <
|
|
1118
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1095
1119
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is an AVLTreeNode object, which represents a node in an AVL tree.</p>
|
|
1096
1120
|
</div>
|
|
1097
1121
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1098
1122
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
1099
1123
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1100
1124
|
<ul>
|
|
1101
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1125
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/avl-tree.ts#L101">src/data-structures/binary-tree/avl-tree.ts:101</a></li></ul></aside></li></ul></section>
|
|
1102
1126
|
<section class="tsd-panel tsd-member"><a id="balanceRL" class="tsd-anchor"></a>
|
|
1103
1127
|
<h3 class="tsd-anchor-link"><span>balanceRL</span><a href="#balanceRL" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1104
1128
|
<ul class="tsd-signatures">
|
|
@@ -1110,14 +1134,14 @@ each node in the path from the given node to the root.</p>
|
|
|
1110
1134
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1111
1135
|
<ul class="tsd-parameter-list">
|
|
1112
1136
|
<li>
|
|
1113
|
-
<h5><span class="tsd-kind-parameter">A</span>: <
|
|
1137
|
+
<h5><span class="tsd-kind-parameter">A</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1114
1138
|
<div class="tsd-comment tsd-typography"><p>A is an AVLTreeNode object.</p>
|
|
1115
1139
|
</div>
|
|
1116
1140
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1117
1141
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
1118
1142
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1119
1143
|
<ul>
|
|
1120
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1144
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/avl-tree.ts#L245">src/data-structures/binary-tree/avl-tree.ts:245</a></li></ul></aside></li></ul></section>
|
|
1121
1145
|
<section class="tsd-panel tsd-member"><a id="balanceRR" class="tsd-anchor"></a>
|
|
1122
1146
|
<h3 class="tsd-anchor-link"><span>balanceRR</span><a href="#balanceRR" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1123
1147
|
<ul class="tsd-signatures">
|
|
@@ -1129,14 +1153,14 @@ each node in the path from the given node to the root.</p>
|
|
|
1129
1153
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1130
1154
|
<ul class="tsd-parameter-list">
|
|
1131
1155
|
<li>
|
|
1132
|
-
<h5><span class="tsd-kind-parameter">A</span>: <
|
|
1156
|
+
<h5><span class="tsd-kind-parameter">A</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1133
1157
|
<div class="tsd-comment tsd-typography"><p>The parameter A is an AVLTreeNode object.</p>
|
|
1134
1158
|
</div>
|
|
1135
1159
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1136
1160
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
1137
1161
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1138
1162
|
<ul>
|
|
1139
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1163
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/avl-tree.ts#L210">src/data-structures/binary-tree/avl-tree.ts:210</a></li></ul></aside></li></ul></section>
|
|
1140
1164
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="clear" class="tsd-anchor"></a>
|
|
1141
1165
|
<h3 class="tsd-anchor-link"><span>clear</span><a href="#clear" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1142
1166
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1148,43 +1172,7 @@ each node in the path from the given node to the root.</p>
|
|
|
1148
1172
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1149
1173
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#clear">clear</a></p>
|
|
1150
1174
|
<ul>
|
|
1151
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1152
|
-
<section class="tsd-panel tsd-member"><a id="createNode" class="tsd-anchor"></a>
|
|
1153
|
-
<h3 class="tsd-anchor-link"><span>create<wbr/>Node</span><a href="#createNode" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1154
|
-
<ul class="tsd-signatures">
|
|
1155
|
-
<li class="tsd-signature tsd-anchor-link" id="createNode.createNode-1"><span class="tsd-kind-call-signature">create<wbr/>Node</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">id</span>, <span class="tsd-kind-parameter">val</span>, <span class="tsd-kind-parameter">count</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="AVLTreeNode.html" class="tsd-signature-type tsd-kind-class">AVLTreeNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">></span><a href="#createNode.createNode-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1156
|
-
<li class="tsd-description">
|
|
1157
|
-
<div class="tsd-comment tsd-typography"><p>The function creates a new binary tree node with the given id, value, and count, or returns null if the value is
|
|
1158
|
-
null.</p>
|
|
1159
|
-
</div>
|
|
1160
|
-
<div class="tsd-parameters">
|
|
1161
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1162
|
-
<ul class="tsd-parameter-list">
|
|
1163
|
-
<li>
|
|
1164
|
-
<h5><span class="tsd-kind-parameter">id</span>: <span class="tsd-signature-type">number</span></h5>
|
|
1165
|
-
<div class="tsd-comment tsd-typography"><p>The <code>id</code> parameter is the identifier for the binary tree node. It is of type
|
|
1166
|
-
<code>BinaryTreeNodeId</code>, which could be a string or a number, depending on how you want to identify your nodes.</p>
|
|
1167
|
-
</div>
|
|
1168
|
-
<div class="tsd-comment tsd-typography"></div></li>
|
|
1169
|
-
<li>
|
|
1170
|
-
<h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
|
|
1171
|
-
<div class="tsd-comment tsd-typography"><p>The <code>val</code> parameter represents the value to be stored in the binary tree node. It can be of
|
|
1172
|
-
any type <code>T</code> or <code>null</code>.</p>
|
|
1173
|
-
</div>
|
|
1174
|
-
<div class="tsd-comment tsd-typography"></div></li>
|
|
1175
|
-
<li>
|
|
1176
|
-
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">count</span>: <span class="tsd-signature-type">number</span></h5>
|
|
1177
|
-
<div class="tsd-comment tsd-typography"><p>The count parameter is an optional parameter that represents the number of occurrences of
|
|
1178
|
-
the value in the binary tree node. It is of type number.</p>
|
|
1179
|
-
</div>
|
|
1180
|
-
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1181
|
-
<h4 class="tsd-returns-title">Returns <a href="AVLTreeNode.html" class="tsd-signature-type tsd-kind-class">AVLTreeNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">></span></h4><p>The function <code>createNode</code> returns a <code>BinaryTreeNode<T></code> object if the <code>val</code> parameter is not null.
|
|
1182
|
-
Otherwise, it returns null.</p>
|
|
1183
|
-
|
|
1184
|
-
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1185
|
-
<p>Overrides <a href="BST.html">BST</a>.<a href="BST.html#createNode">createNode</a></p>
|
|
1186
|
-
<ul>
|
|
1187
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c1b5969/src/data-structures/binary-tree/avl-tree.ts#L25">src/data-structures/binary-tree/avl-tree.ts:25</a></li></ul></aside></li></ul></section>
|
|
1175
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L246">src/data-structures/binary-tree/abstract-binary-tree.ts:246</a></li></ul></aside></li></ul></section>
|
|
1188
1176
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="fill" class="tsd-anchor"></a>
|
|
1189
1177
|
<h3 class="tsd-anchor-link"><span>fill</span><a href="#fill" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1190
1178
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1197,9 +1185,9 @@ was successful.</p>
|
|
|
1197
1185
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1198
1186
|
<ul class="tsd-parameter-list">
|
|
1199
1187
|
<li>
|
|
1200
|
-
<h5><span class="tsd-kind-parameter">data</span>: <
|
|
1201
|
-
<div class="tsd-comment tsd-typography"><p>The <code>data</code> parameter can be either an array of elements of type <code>
|
|
1202
|
-
array of <code>
|
|
1188
|
+
<h5><span class="tsd-kind-parameter">data</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[]</span></h5>
|
|
1189
|
+
<div class="tsd-comment tsd-typography"><p>The <code>data</code> parameter can be either an array of elements of type <code>N</code> or an
|
|
1190
|
+
array of <code>N</code> objects.</p>
|
|
1203
1191
|
</div>
|
|
1204
1192
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1205
1193
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>The method is returning a boolean value.</p>
|
|
@@ -1207,11 +1195,11 @@ array of <code>BinaryTreeNode<T></code> objects.</p>
|
|
|
1207
1195
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1208
1196
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#fill">fill</a></p>
|
|
1209
1197
|
<ul>
|
|
1210
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1198
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L423">src/data-structures/binary-tree/abstract-binary-tree.ts:423</a></li></ul></aside></li></ul></section>
|
|
1211
1199
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="get" class="tsd-anchor"></a>
|
|
1212
1200
|
<h3 class="tsd-anchor-link"><span>get</span><a href="#get" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1213
1201
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
1214
|
-
<li class="tsd-signature tsd-anchor-link" id="get.get-1"><span class="tsd-kind-call-signature">get</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">nodeProperty</span>, <span class="tsd-kind-parameter">propertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1202
|
+
<li class="tsd-signature tsd-anchor-link" id="get.get-1"><span class="tsd-kind-call-signature">get</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">nodeProperty</span>, <span class="tsd-kind-parameter">propertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><a href="#get.get-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1215
1203
|
<li class="tsd-description">
|
|
1216
1204
|
<div class="tsd-comment tsd-typography"><p>The <code>get</code> function returns the first node in a binary search tree that matches the given property value or name.</p>
|
|
1217
1205
|
</div>
|
|
@@ -1219,9 +1207,9 @@ array of <code>BinaryTreeNode<T></code> objects.</p>
|
|
|
1219
1207
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1220
1208
|
<ul class="tsd-parameter-list">
|
|
1221
1209
|
<li>
|
|
1222
|
-
<h5><span class="tsd-kind-parameter">nodeProperty</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
1210
|
+
<h5><span class="tsd-kind-parameter">nodeProperty</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1223
1211
|
<div class="tsd-comment tsd-typography"><p>The <code>nodeProperty</code> parameter can be either a <code>BinaryTreeNodeId</code> or a
|
|
1224
|
-
generic type <code>
|
|
1212
|
+
generic type <code>N</code>. It represents the value of the property that you want to search for in the binary search tree.</p>
|
|
1225
1213
|
</div>
|
|
1226
1214
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
1227
1215
|
<li>
|
|
@@ -1231,12 +1219,12 @@ specifies the property name to use for searching the binary search tree nodes. I
|
|
|
1231
1219
|
<code>'id'</code>.</p>
|
|
1232
1220
|
</div>
|
|
1233
1221
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1234
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1222
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h4><p>The method is returning a N object or null.</p>
|
|
1235
1223
|
|
|
1236
1224
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1237
1225
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#get">get</a></p>
|
|
1238
1226
|
<ul>
|
|
1239
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1227
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/bst.ts#L123">src/data-structures/binary-tree/bst.ts:123</a></li></ul></aside></li></ul></section>
|
|
1240
1228
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getDepth" class="tsd-anchor"></a>
|
|
1241
1229
|
<h3 class="tsd-anchor-link"><span>get<wbr/>Depth</span><a href="#getDepth" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1242
1230
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1248,8 +1236,8 @@ specifies the property name to use for searching the binary search tree nodes. I
|
|
|
1248
1236
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1249
1237
|
<ul class="tsd-parameter-list">
|
|
1250
1238
|
<li>
|
|
1251
|
-
<h5><span class="tsd-kind-parameter">node</span>: <
|
|
1252
|
-
<div class="tsd-comment tsd-typography"><p>
|
|
1239
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1240
|
+
<div class="tsd-comment tsd-typography"><p>N - This is the node for which we want to calculate the depth. It is a generic type,
|
|
1253
1241
|
meaning it can represent any type of data that we want to store in the node.</p>
|
|
1254
1242
|
</div>
|
|
1255
1243
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
@@ -1258,7 +1246,7 @@ meaning it can represent any type of data that we want to store in the node.</p>
|
|
|
1258
1246
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1259
1247
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getDepth">getDepth</a></p>
|
|
1260
1248
|
<ul>
|
|
1261
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1249
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L481">src/data-structures/binary-tree/abstract-binary-tree.ts:481</a></li></ul></aside></li></ul></section>
|
|
1262
1250
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getHeight" class="tsd-anchor"></a>
|
|
1263
1251
|
<h3 class="tsd-anchor-link"><span>get<wbr/>Height</span><a href="#getHeight" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1264
1252
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1271,9 +1259,9 @@ approach.</p>
|
|
|
1271
1259
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1272
1260
|
<ul class="tsd-parameter-list">
|
|
1273
1261
|
<li>
|
|
1274
|
-
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">beginRoot</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1262
|
+
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">beginRoot</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1275
1263
|
<div class="tsd-comment tsd-typography"><p>The <code>beginRoot</code> parameter is an optional parameter of type
|
|
1276
|
-
<code>
|
|
1264
|
+
<code>N | null</code>. It represents the starting node from which to calculate the height of the binary tree.
|
|
1277
1265
|
If no value is provided for <code>beginRoot</code>, the function will use the <code>root</code> property of the class instance as</p>
|
|
1278
1266
|
</div>
|
|
1279
1267
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
@@ -1282,22 +1270,22 @@ If no value is provided for <code>beginRoot</code>, the function will use the <c
|
|
|
1282
1270
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1283
1271
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getHeight">getHeight</a></p>
|
|
1284
1272
|
<ul>
|
|
1285
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1273
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L498">src/data-structures/binary-tree/abstract-binary-tree.ts:498</a></li></ul></aside></li></ul></section>
|
|
1286
1274
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getLeftMost" class="tsd-anchor"></a>
|
|
1287
1275
|
<h3 class="tsd-anchor-link"><span>get<wbr/>Left<wbr/>Most</span><a href="#getLeftMost" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1288
1276
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
1289
|
-
<li class="tsd-signature tsd-anchor-link" id="getLeftMost.getLeftMost-1"><span class="tsd-kind-call-signature">get<wbr/>Left<wbr/>Most</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1277
|
+
<li class="tsd-signature tsd-anchor-link" id="getLeftMost.getLeftMost-1"><span class="tsd-kind-call-signature">get<wbr/>Left<wbr/>Most</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><a href="#getLeftMost.getLeftMost-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1290
1278
|
<li class="tsd-description">
|
|
1291
1279
|
<div class="tsd-comment tsd-typography"><p>The <code>getLeftMost</code> function returns the leftmost node in a binary tree, either recursively or iteratively using tail
|
|
1292
1280
|
recursion optimization.</p>
|
|
1293
1281
|
</div>
|
|
1294
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1282
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h4><p>The <code>getLeftMost</code> function returns the leftmost node in a binary tree.</p>
|
|
1295
1283
|
|
|
1296
1284
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1297
1285
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getLeftMost">getLeftMost</a></p>
|
|
1298
1286
|
<ul>
|
|
1299
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1300
|
-
<li class="tsd-signature tsd-anchor-link" id="getLeftMost.getLeftMost-2"><span class="tsd-kind-call-signature">get<wbr/>Left<wbr/>Most</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><
|
|
1287
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L685">src/data-structures/binary-tree/abstract-binary-tree.ts:685</a></li></ul></aside></li>
|
|
1288
|
+
<li class="tsd-signature tsd-anchor-link" id="getLeftMost.getLeftMost-2"><span class="tsd-kind-call-signature">get<wbr/>Left<wbr/>Most</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><a href="#getLeftMost.getLeftMost-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1301
1289
|
<li class="tsd-description">
|
|
1302
1290
|
<div class="tsd-comment tsd-typography"><p>The <code>getLeftMost</code> function returns the leftmost node in a binary tree, either recursively or iteratively using tail
|
|
1303
1291
|
recursion optimization.</p>
|
|
@@ -1306,17 +1294,17 @@ recursion optimization.</p>
|
|
|
1306
1294
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1307
1295
|
<ul class="tsd-parameter-list">
|
|
1308
1296
|
<li>
|
|
1309
|
-
<h5><span class="tsd-kind-parameter">node</span>: <
|
|
1310
|
-
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is an optional parameter of type <code>
|
|
1297
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1298
|
+
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is an optional parameter of type <code>N | null</code>. It represents the starting node from which to find the leftmost node in a binary tree. If no node is
|
|
1311
1299
|
provided, the function will use the root node of the binary tree.</p>
|
|
1312
1300
|
</div>
|
|
1313
1301
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1314
|
-
<h4 class="tsd-returns-title">Returns <
|
|
1302
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h4><p>The <code>getLeftMost</code> function returns the leftmost node in a binary tree.</p>
|
|
1315
1303
|
|
|
1316
1304
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1317
1305
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getLeftMost">getLeftMost</a></p>
|
|
1318
1306
|
<ul>
|
|
1319
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1307
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L687">src/data-structures/binary-tree/abstract-binary-tree.ts:687</a></li></ul></aside></li></ul></section>
|
|
1320
1308
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getMinHeight" class="tsd-anchor"></a>
|
|
1321
1309
|
<h3 class="tsd-anchor-link"><span>get<wbr/>Min<wbr/>Height</span><a href="#getMinHeight" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1322
1310
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1329,9 +1317,9 @@ approach.</p>
|
|
|
1329
1317
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1330
1318
|
<ul class="tsd-parameter-list">
|
|
1331
1319
|
<li>
|
|
1332
|
-
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">beginRoot</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1320
|
+
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">beginRoot</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1333
1321
|
<div class="tsd-comment tsd-typography"><p>The <code>beginRoot</code> parameter is an optional parameter of type
|
|
1334
|
-
<code>
|
|
1322
|
+
<code>N | null</code>. It represents the starting node from which to calculate the minimum height of the binary
|
|
1335
1323
|
tree. If no value is provided for <code>beginRoot</code>, the function will use the root node of the binary tree.</p>
|
|
1336
1324
|
</div>
|
|
1337
1325
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
@@ -1340,11 +1328,11 @@ tree. If no value is provided for <code>beginRoot</code>, the function will use
|
|
|
1340
1328
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1341
1329
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getMinHeight">getMinHeight</a></p>
|
|
1342
1330
|
<ul>
|
|
1343
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1331
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L547">src/data-structures/binary-tree/abstract-binary-tree.ts:547</a></li></ul></aside></li></ul></section>
|
|
1344
1332
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getNodes" class="tsd-anchor"></a>
|
|
1345
1333
|
<h3 class="tsd-anchor-link"><span>get<wbr/>Nodes</span><a href="#getNodes" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1346
1334
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
1347
|
-
<li class="tsd-signature tsd-anchor-link" id="getNodes.getNodes-1"><span class="tsd-kind-call-signature">get<wbr/>Nodes</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">nodeProperty</span>, <span class="tsd-kind-parameter">propertyName</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">onlyOne</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><
|
|
1335
|
+
<li class="tsd-signature tsd-anchor-link" id="getNodes.getNodes-1"><span class="tsd-kind-call-signature">get<wbr/>Nodes</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">nodeProperty</span>, <span class="tsd-kind-parameter">propertyName</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">onlyOne</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span><a href="#getNodes.getNodes-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1348
1336
|
<li class="tsd-description">
|
|
1349
1337
|
<div class="tsd-comment tsd-typography"><p>The function <code>getNodes</code> returns an array of binary search tree nodes that match a given property value, with the
|
|
1350
1338
|
option to specify the property name and whether to return only one node.</p>
|
|
@@ -1353,9 +1341,9 @@ option to specify the property name and whether to return only one node.</p>
|
|
|
1353
1341
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1354
1342
|
<ul class="tsd-parameter-list">
|
|
1355
1343
|
<li>
|
|
1356
|
-
<h5><span class="tsd-kind-parameter">nodeProperty</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
1344
|
+
<h5><span class="tsd-kind-parameter">nodeProperty</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1357
1345
|
<div class="tsd-comment tsd-typography"><p>The <code>nodeProperty</code> parameter can be either a <code>BinaryTreeNodeId</code> or a
|
|
1358
|
-
generic type <code>
|
|
1346
|
+
generic type <code>N</code>. It represents the property value that you want to search for in the binary search tree.</p>
|
|
1359
1347
|
</div>
|
|
1360
1348
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
1361
1349
|
<li>
|
|
@@ -1372,16 +1360,16 @@ nodeProperty. If set to true, the function will stop traversing the tree and ret
|
|
|
1372
1360
|
to false or not provided, the function will return all nodes that match the given nodeProperty.</p>
|
|
1373
1361
|
</div>
|
|
1374
1362
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1375
|
-
<h4 class="tsd-returns-title">Returns <
|
|
1363
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4><p>an array of N objects.</p>
|
|
1376
1364
|
|
|
1377
1365
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1378
1366
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getNodes">getNodes</a></p>
|
|
1379
1367
|
<ul>
|
|
1380
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1368
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/bst.ts#L213">src/data-structures/binary-tree/bst.ts:213</a></li></ul></aside></li></ul></section>
|
|
1381
1369
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getPathToRoot" class="tsd-anchor"></a>
|
|
1382
1370
|
<h3 class="tsd-anchor-link"><span>get<wbr/>Path<wbr/>To<wbr/>Root</span><a href="#getPathToRoot" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1383
1371
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
1384
|
-
<li class="tsd-signature tsd-anchor-link" id="getPathToRoot.getPathToRoot-1"><span class="tsd-kind-call-signature">get<wbr/>Path<wbr/>To<wbr/>Root</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><
|
|
1372
|
+
<li class="tsd-signature tsd-anchor-link" id="getPathToRoot.getPathToRoot-1"><span class="tsd-kind-call-signature">get<wbr/>Path<wbr/>To<wbr/>Root</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span><a href="#getPathToRoot.getPathToRoot-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1385
1373
|
<li class="tsd-description">
|
|
1386
1374
|
<div class="tsd-comment tsd-typography"><p>The function getPathToRoot returns an array of BinaryTreeNode objects representing the path from a given node to the
|
|
1387
1375
|
root of a binary tree.</p>
|
|
@@ -1390,21 +1378,21 @@ root of a binary tree.</p>
|
|
|
1390
1378
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1391
1379
|
<ul class="tsd-parameter-list">
|
|
1392
1380
|
<li>
|
|
1393
|
-
<h5><span class="tsd-kind-parameter">node</span>: <
|
|
1381
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1394
1382
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object.</p>
|
|
1395
1383
|
</div>
|
|
1396
1384
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1397
|
-
<h4 class="tsd-returns-title">Returns <
|
|
1385
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>getPathToRoot</code> returns an array of <code>N</code> objects, representing the path from
|
|
1398
1386
|
the given <code>node</code> to the root of the binary tree.</p>
|
|
1399
1387
|
|
|
1400
1388
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1401
1389
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getPathToRoot">getPathToRoot</a></p>
|
|
1402
1390
|
<ul>
|
|
1403
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1391
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L675">src/data-structures/binary-tree/abstract-binary-tree.ts:675</a></li></ul></aside></li></ul></section>
|
|
1404
1392
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getPredecessor" class="tsd-anchor"></a>
|
|
1405
1393
|
<h3 class="tsd-anchor-link"><span>get<wbr/>Predecessor</span><a href="#getPredecessor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1406
1394
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
1407
|
-
<li class="tsd-signature tsd-anchor-link" id="getPredecessor.getPredecessor-1"><span class="tsd-kind-call-signature">get<wbr/>Predecessor</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><
|
|
1395
|
+
<li class="tsd-signature tsd-anchor-link" id="getPredecessor.getPredecessor-1"><span class="tsd-kind-call-signature">get<wbr/>Predecessor</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><a href="#getPredecessor.getPredecessor-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1408
1396
|
<li class="tsd-description">
|
|
1409
1397
|
<div class="tsd-comment tsd-typography"><p>The function returns the predecessor of a given node in a binary tree.</p>
|
|
1410
1398
|
</div>
|
|
@@ -1412,31 +1400,31 @@ the given <code>node</code> to the root of the binary tree.</p>
|
|
|
1412
1400
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1413
1401
|
<ul class="tsd-parameter-list">
|
|
1414
1402
|
<li>
|
|
1415
|
-
<h5><span class="tsd-kind-parameter">node</span>: <
|
|
1403
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1416
1404
|
<div class="tsd-comment tsd-typography"><p>The parameter <code>node</code> is a BinaryTreeNode object, representing a node in a binary tree.</p>
|
|
1417
1405
|
</div>
|
|
1418
1406
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1419
|
-
<h4 class="tsd-returns-title">Returns <
|
|
1407
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h4><p>the predecessor of the given node in a binary tree.</p>
|
|
1420
1408
|
|
|
1421
1409
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1422
1410
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getPredecessor">getPredecessor</a></p>
|
|
1423
1411
|
<ul>
|
|
1424
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1412
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1205">src/data-structures/binary-tree/abstract-binary-tree.ts:1205</a></li></ul></aside></li></ul></section>
|
|
1425
1413
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getRightMost" class="tsd-anchor"></a>
|
|
1426
1414
|
<h3 class="tsd-anchor-link"><span>get<wbr/>Right<wbr/>Most</span><a href="#getRightMost" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1427
1415
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
1428
|
-
<li class="tsd-signature tsd-anchor-link" id="getRightMost.getRightMost-1"><span class="tsd-kind-call-signature">get<wbr/>Right<wbr/>Most</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1416
|
+
<li class="tsd-signature tsd-anchor-link" id="getRightMost.getRightMost-1"><span class="tsd-kind-call-signature">get<wbr/>Right<wbr/>Most</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><a href="#getRightMost.getRightMost-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1429
1417
|
<li class="tsd-description">
|
|
1430
1418
|
<div class="tsd-comment tsd-typography"><p>The <code>getRightMost</code> function returns the rightmost node in a binary tree, either recursively or iteratively using
|
|
1431
1419
|
tail recursion optimization.</p>
|
|
1432
1420
|
</div>
|
|
1433
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1421
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h4><p>The <code>getRightMost</code> function returns the rightmost node in a binary tree.</p>
|
|
1434
1422
|
|
|
1435
1423
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1436
1424
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getRightMost">getRightMost</a></p>
|
|
1437
1425
|
<ul>
|
|
1438
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1439
|
-
<li class="tsd-signature tsd-anchor-link" id="getRightMost.getRightMost-2"><span class="tsd-kind-call-signature">get<wbr/>Right<wbr/>Most</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><
|
|
1426
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L720">src/data-structures/binary-tree/abstract-binary-tree.ts:720</a></li></ul></aside></li>
|
|
1427
|
+
<li class="tsd-signature tsd-anchor-link" id="getRightMost.getRightMost-2"><span class="tsd-kind-call-signature">get<wbr/>Right<wbr/>Most</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><a href="#getRightMost.getRightMost-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1440
1428
|
<li class="tsd-description">
|
|
1441
1429
|
<div class="tsd-comment tsd-typography"><p>The <code>getRightMost</code> function returns the rightmost node in a binary tree, either recursively or iteratively using
|
|
1442
1430
|
tail recursion optimization.</p>
|
|
@@ -1445,17 +1433,17 @@ tail recursion optimization.</p>
|
|
|
1445
1433
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1446
1434
|
<ul class="tsd-parameter-list">
|
|
1447
1435
|
<li>
|
|
1448
|
-
<h5><span class="tsd-kind-parameter">node</span>: <
|
|
1449
|
-
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is an optional parameter of type <code>
|
|
1436
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1437
|
+
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is an optional parameter of type <code>N | null</code>. It represents the starting node from which to find the rightmost node in a binary tree. If no node is
|
|
1450
1438
|
provided, the function will use the root node of the binary tree.</p>
|
|
1451
1439
|
</div>
|
|
1452
1440
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1453
|
-
<h4 class="tsd-returns-title">Returns <
|
|
1441
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h4><p>The <code>getRightMost</code> function returns the rightmost node in a binary tree.</p>
|
|
1454
1442
|
|
|
1455
1443
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1456
1444
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getRightMost">getRightMost</a></p>
|
|
1457
1445
|
<ul>
|
|
1458
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1446
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L722">src/data-structures/binary-tree/abstract-binary-tree.ts:722</a></li></ul></aside></li></ul></section>
|
|
1459
1447
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getSubTreeSizeAndCount" class="tsd-anchor"></a>
|
|
1460
1448
|
<h3 class="tsd-anchor-link"><span>get<wbr/>Sub<wbr/>Tree<wbr/>Size<wbr/>And<wbr/>Count</span><a href="#getSubTreeSizeAndCount" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1461
1449
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1468,7 +1456,7 @@ traversal.</p>
|
|
|
1468
1456
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1469
1457
|
<ul class="tsd-parameter-list">
|
|
1470
1458
|
<li>
|
|
1471
|
-
<h5><span class="tsd-kind-parameter">subTreeRoot</span>: <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1459
|
+
<h5><span class="tsd-kind-parameter">subTreeRoot</span>: <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1472
1460
|
<div class="tsd-comment tsd-typography"><p>The <code>subTreeRoot</code> parameter is the root node of a binary
|
|
1473
1461
|
tree.</p>
|
|
1474
1462
|
</div>
|
|
@@ -1479,7 +1467,7 @@ represents the size of the subtree, and the second element represents the count
|
|
|
1479
1467
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1480
1468
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getSubTreeSizeAndCount">getSubTreeSizeAndCount</a></p>
|
|
1481
1469
|
<ul>
|
|
1482
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1470
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L799">src/data-structures/binary-tree/abstract-binary-tree.ts:799</a></li></ul></aside></li></ul></section>
|
|
1483
1471
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="has" class="tsd-anchor"></a>
|
|
1484
1472
|
<h3 class="tsd-anchor-link"><span>has</span><a href="#has" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1485
1473
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1492,9 +1480,9 @@ property.</p>
|
|
|
1492
1480
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1493
1481
|
<ul class="tsd-parameter-list">
|
|
1494
1482
|
<li>
|
|
1495
|
-
<h5><span class="tsd-kind-parameter">nodeProperty</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
1483
|
+
<h5><span class="tsd-kind-parameter">nodeProperty</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1496
1484
|
<div class="tsd-comment tsd-typography"><p>The <code>nodeProperty</code> parameter can be either a <code>BinaryTreeNodeId</code> or a
|
|
1497
|
-
generic type <code>
|
|
1485
|
+
generic type <code>N</code>. It represents the property of a binary tree node that you want to check.</p>
|
|
1498
1486
|
</div>
|
|
1499
1487
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
1500
1488
|
<li>
|
|
@@ -1508,7 +1496,7 @@ specifies the name of the property to check for in the nodes.</p>
|
|
|
1508
1496
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1509
1497
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#has">has</a></p>
|
|
1510
1498
|
<ul>
|
|
1511
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1499
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L650">src/data-structures/binary-tree/abstract-binary-tree.ts:650</a></li></ul></aside></li></ul></section>
|
|
1512
1500
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="isAVLBalanced" class="tsd-anchor"></a>
|
|
1513
1501
|
<h3 class="tsd-anchor-link"><span>isAVLBalanced</span><a href="#isAVLBalanced" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1514
1502
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1522,7 +1510,7 @@ is balanced according to the AVL tree property, and <code>false</code> otherwise
|
|
|
1522
1510
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1523
1511
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#isAVLBalanced">isAVLBalanced</a></p>
|
|
1524
1512
|
<ul>
|
|
1525
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1513
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/bst.ts#L433">src/data-structures/binary-tree/bst.ts:433</a></li></ul></aside></li></ul></section>
|
|
1526
1514
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="isBST" class="tsd-anchor"></a>
|
|
1527
1515
|
<h3 class="tsd-anchor-link"><span>isBST</span><a href="#isBST" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1528
1516
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1534,8 +1522,8 @@ is balanced according to the AVL tree property, and <code>false</code> otherwise
|
|
|
1534
1522
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1535
1523
|
<ul class="tsd-parameter-list">
|
|
1536
1524
|
<li>
|
|
1537
|
-
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1538
|
-
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is an optional parameter of type <code>
|
|
1525
|
+
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1526
|
+
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is an optional parameter of type <code>N | null</code>. It represents the root node of the binary search tree (BST) that we want to check for validity. If no node
|
|
1539
1527
|
is provided, the function will default to using the root node of the BST instance that</p>
|
|
1540
1528
|
</div>
|
|
1541
1529
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
@@ -1545,7 +1533,7 @@ tree, and <code>false</code> otherwise.</p>
|
|
|
1545
1533
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1546
1534
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#isBST">isBST</a></p>
|
|
1547
1535
|
<ul>
|
|
1548
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1536
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L762">src/data-structures/binary-tree/abstract-binary-tree.ts:762</a></li></ul></aside></li></ul></section>
|
|
1549
1537
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="isBalanced" class="tsd-anchor"></a>
|
|
1550
1538
|
<h3 class="tsd-anchor-link"><span>is<wbr/>Balanced</span><a href="#isBalanced" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1551
1539
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1557,9 +1545,9 @@ tree, and <code>false</code> otherwise.</p>
|
|
|
1557
1545
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1558
1546
|
<ul class="tsd-parameter-list">
|
|
1559
1547
|
<li>
|
|
1560
|
-
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">beginRoot</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1548
|
+
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">beginRoot</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1561
1549
|
<div class="tsd-comment tsd-typography"><p>The <code>beginRoot</code> parameter is the root node of a binary tree. It is
|
|
1562
|
-
of type <code>
|
|
1550
|
+
of type <code>N | null</code>, which means it can either be a <code>BinaryTreeNode</code> object or <code>null</code>.</p>
|
|
1563
1551
|
</div>
|
|
1564
1552
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1565
1553
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>The method is returning a boolean value.</p>
|
|
@@ -1567,7 +1555,7 @@ of type <code>BinaryTreeNode<T> | null</code>, which means it can either b
|
|
|
1567
1555
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1568
1556
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#isBalanced">isBalanced</a></p>
|
|
1569
1557
|
<ul>
|
|
1570
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1558
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L595">src/data-structures/binary-tree/abstract-binary-tree.ts:595</a></li></ul></aside></li></ul></section>
|
|
1571
1559
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="isEmpty" class="tsd-anchor"></a>
|
|
1572
1560
|
<h3 class="tsd-anchor-link"><span>is<wbr/>Empty</span><a href="#isEmpty" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1573
1561
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1580,7 +1568,7 @@ of type <code>BinaryTreeNode<T> | null</code>, which means it can either b
|
|
|
1580
1568
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1581
1569
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#isEmpty">isEmpty</a></p>
|
|
1582
1570
|
<ul>
|
|
1583
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1571
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L257">src/data-structures/binary-tree/abstract-binary-tree.ts:257</a></li></ul></aside></li></ul></section>
|
|
1584
1572
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="lastKey" class="tsd-anchor"></a>
|
|
1585
1573
|
<h3 class="tsd-anchor-link"><span>last<wbr/>Key</span><a href="#lastKey" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1586
1574
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1597,7 +1585,7 @@ there are no nodes in</p>
|
|
|
1597
1585
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1598
1586
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#lastKey">lastKey</a></p>
|
|
1599
1587
|
<ul>
|
|
1600
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1588
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/bst.ts#L136">src/data-structures/binary-tree/bst.ts:136</a></li></ul></aside></li></ul></section>
|
|
1601
1589
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="lesserSum" class="tsd-anchor"></a>
|
|
1602
1590
|
<h3 class="tsd-anchor-link"><span>lesser<wbr/>Sum</span><a href="#lesserSum" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1603
1591
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1627,7 +1615,7 @@ binary search tree that have a property value lesser than the given <code>id</co
|
|
|
1627
1615
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1628
1616
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#lesserSum">lesserSum</a></p>
|
|
1629
1617
|
<ul>
|
|
1630
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1618
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/bst.ts#L264">src/data-structures/binary-tree/bst.ts:264</a></li></ul></aside></li></ul></section>
|
|
1631
1619
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="levelIterative" class="tsd-anchor"></a>
|
|
1632
1620
|
<h3 class="tsd-anchor-link"><span>level<wbr/>Iterative</span><a href="#levelIterative" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1633
1621
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1640,18 +1628,18 @@ in an array, based on a specified property name.</p>
|
|
|
1640
1628
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1641
1629
|
<ul class="tsd-parameter-list">
|
|
1642
1630
|
<li>
|
|
1643
|
-
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1631
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1644
1632
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object representing the starting
|
|
1645
1633
|
node for the level order traversal. It can be null if no specific node is provided, in which case the root node of
|
|
1646
1634
|
the tree is used as the starting node.</p>
|
|
1647
1635
|
</div>
|
|
1648
1636
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1649
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>levelIterative</code> returns an object of type <code>
|
|
1637
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>levelIterative</code> returns an object of type <code>AbstractResultsByProperty<N></code>.</p>
|
|
1650
1638
|
|
|
1651
1639
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1652
1640
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#levelIterative">levelIterative</a></p>
|
|
1653
1641
|
<ul>
|
|
1654
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1642
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1082">src/data-structures/binary-tree/abstract-binary-tree.ts:1082</a></li></ul></aside></li>
|
|
1655
1643
|
<li class="tsd-signature tsd-anchor-link" id="levelIterative.levelIterative-2"><span class="tsd-kind-call-signature">level<wbr/>Iterative</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><a href="#levelIterative.levelIterative-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1656
1644
|
<li class="tsd-description">
|
|
1657
1645
|
<div class="tsd-comment tsd-typography"><p>The <code>levelIterative</code> function performs a level-order traversal on a binary tree and returns the values of the nodes
|
|
@@ -1661,7 +1649,7 @@ in an array, based on a specified property name.</p>
|
|
|
1661
1649
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1662
1650
|
<ul class="tsd-parameter-list">
|
|
1663
1651
|
<li>
|
|
1664
|
-
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1652
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1665
1653
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object representing the starting
|
|
1666
1654
|
node for the level order traversal. It can be null if no specific node is provided, in which case the root node of
|
|
1667
1655
|
the tree is used as the starting node.</p>
|
|
@@ -1675,13 +1663,13 @@ will accumulate results based on that property. If no property name is provided,
|
|
|
1675
1663
|
accumulating results</p>
|
|
1676
1664
|
</div>
|
|
1677
1665
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1678
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>levelIterative</code> returns an object of type <code>
|
|
1666
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>levelIterative</code> returns an object of type <code>AbstractResultsByProperty<N></code>.</p>
|
|
1679
1667
|
|
|
1680
1668
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1681
1669
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#levelIterative">levelIterative</a></p>
|
|
1682
1670
|
<ul>
|
|
1683
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1684
|
-
<li class="tsd-signature tsd-anchor-link" id="levelIterative.levelIterative-3"><span class="tsd-kind-call-signature">level<wbr/>Iterative</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
1671
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1084">src/data-structures/binary-tree/abstract-binary-tree.ts:1084</a></li></ul></aside></li>
|
|
1672
|
+
<li class="tsd-signature tsd-anchor-link" id="levelIterative.levelIterative-3"><span class="tsd-kind-call-signature">level<wbr/>Iterative</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[]</span><a href="#levelIterative.levelIterative-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1685
1673
|
<li class="tsd-description">
|
|
1686
1674
|
<div class="tsd-comment tsd-typography"><p>The <code>levelIterative</code> function performs a level-order traversal on a binary tree and returns the values of the nodes
|
|
1687
1675
|
in an array, based on a specified property name.</p>
|
|
@@ -1690,7 +1678,7 @@ in an array, based on a specified property name.</p>
|
|
|
1690
1678
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1691
1679
|
<ul class="tsd-parameter-list">
|
|
1692
1680
|
<li>
|
|
1693
|
-
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1681
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1694
1682
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object representing the starting
|
|
1695
1683
|
node for the level order traversal. It can be null if no specific node is provided, in which case the root node of
|
|
1696
1684
|
the tree is used as the starting node.</p>
|
|
@@ -1704,13 +1692,13 @@ will accumulate results based on that property. If no property name is provided,
|
|
|
1704
1692
|
accumulating results</p>
|
|
1705
1693
|
</div>
|
|
1706
1694
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1707
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">
|
|
1695
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>levelIterative</code> returns an object of type <code>AbstractResultsByProperty<N></code>.</p>
|
|
1708
1696
|
|
|
1709
1697
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1710
1698
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#levelIterative">levelIterative</a></p>
|
|
1711
1699
|
<ul>
|
|
1712
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1713
|
-
<li class="tsd-signature tsd-anchor-link" id="levelIterative.levelIterative-4"><span class="tsd-kind-call-signature">level<wbr/>Iterative</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><
|
|
1700
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1086">src/data-structures/binary-tree/abstract-binary-tree.ts:1086</a></li></ul></aside></li>
|
|
1701
|
+
<li class="tsd-signature tsd-anchor-link" id="levelIterative.levelIterative-4"><span class="tsd-kind-call-signature">level<wbr/>Iterative</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span><a href="#levelIterative.levelIterative-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1714
1702
|
<li class="tsd-description">
|
|
1715
1703
|
<div class="tsd-comment tsd-typography"><p>The <code>levelIterative</code> function performs a level-order traversal on a binary tree and returns the values of the nodes
|
|
1716
1704
|
in an array, based on a specified property name.</p>
|
|
@@ -1719,7 +1707,7 @@ in an array, based on a specified property name.</p>
|
|
|
1719
1707
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1720
1708
|
<ul class="tsd-parameter-list">
|
|
1721
1709
|
<li>
|
|
1722
|
-
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1710
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1723
1711
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object representing the starting
|
|
1724
1712
|
node for the level order traversal. It can be null if no specific node is provided, in which case the root node of
|
|
1725
1713
|
the tree is used as the starting node.</p>
|
|
@@ -1733,12 +1721,12 @@ will accumulate results based on that property. If no property name is provided,
|
|
|
1733
1721
|
accumulating results</p>
|
|
1734
1722
|
</div>
|
|
1735
1723
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1736
|
-
<h4 class="tsd-returns-title">Returns <
|
|
1724
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>levelIterative</code> returns an object of type <code>AbstractResultsByProperty<N></code>.</p>
|
|
1737
1725
|
|
|
1738
1726
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1739
1727
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#levelIterative">levelIterative</a></p>
|
|
1740
1728
|
<ul>
|
|
1741
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1729
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1088">src/data-structures/binary-tree/abstract-binary-tree.ts:1088</a></li></ul></aside></li>
|
|
1742
1730
|
<li class="tsd-signature tsd-anchor-link" id="levelIterative.levelIterative-5"><span class="tsd-kind-call-signature">level<wbr/>Iterative</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><a href="#levelIterative.levelIterative-5" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1743
1731
|
<li class="tsd-description">
|
|
1744
1732
|
<div class="tsd-comment tsd-typography"><p>The <code>levelIterative</code> function performs a level-order traversal on a binary tree and returns the values of the nodes
|
|
@@ -1748,7 +1736,7 @@ in an array, based on a specified property name.</p>
|
|
|
1748
1736
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1749
1737
|
<ul class="tsd-parameter-list">
|
|
1750
1738
|
<li>
|
|
1751
|
-
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1739
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1752
1740
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object representing the starting
|
|
1753
1741
|
node for the level order traversal. It can be null if no specific node is provided, in which case the root node of
|
|
1754
1742
|
the tree is used as the starting node.</p>
|
|
@@ -1762,12 +1750,12 @@ will accumulate results based on that property. If no property name is provided,
|
|
|
1762
1750
|
accumulating results</p>
|
|
1763
1751
|
</div>
|
|
1764
1752
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1765
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>levelIterative</code> returns an object of type <code>
|
|
1753
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>levelIterative</code> returns an object of type <code>AbstractResultsByProperty<N></code>.</p>
|
|
1766
1754
|
|
|
1767
1755
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1768
1756
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#levelIterative">levelIterative</a></p>
|
|
1769
1757
|
<ul>
|
|
1770
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1758
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1090">src/data-structures/binary-tree/abstract-binary-tree.ts:1090</a></li></ul></aside></li></ul></section>
|
|
1771
1759
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="listLevels" class="tsd-anchor"></a>
|
|
1772
1760
|
<h3 class="tsd-anchor-link"><span>list<wbr/>Levels</span><a href="#listLevels" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1773
1761
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1779,17 +1767,17 @@ accumulating results</p>
|
|
|
1779
1767
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1780
1768
|
<ul class="tsd-parameter-list">
|
|
1781
1769
|
<li>
|
|
1782
|
-
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1770
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1783
1771
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object or null. It represents the
|
|
1784
1772
|
root node of a binary tree. If it is null, the function will use the root node of the current binary tree instance.</p>
|
|
1785
1773
|
</div>
|
|
1786
1774
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1787
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>listLevels</code> returns a 2D array of <code>
|
|
1775
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>listLevels</code> returns a 2D array of <code>AbstractResultByProperty<N></code> objects.</p>
|
|
1788
1776
|
|
|
1789
1777
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1790
1778
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#listLevels">listLevels</a></p>
|
|
1791
1779
|
<ul>
|
|
1792
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1780
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1128">src/data-structures/binary-tree/abstract-binary-tree.ts:1128</a></li></ul></aside></li>
|
|
1793
1781
|
<li class="tsd-signature tsd-anchor-link" id="listLevels.listLevels-2"><span class="tsd-kind-call-signature">list<wbr/>Levels</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span><a href="#listLevels.listLevels-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1794
1782
|
<li class="tsd-description">
|
|
1795
1783
|
<div class="tsd-comment tsd-typography"><p>The <code>listLevels</code> function collects nodes from a binary tree by a specified property and organizes them into levels.</p>
|
|
@@ -1798,7 +1786,7 @@ root node of a binary tree. If it is null, the function will use the root node o
|
|
|
1798
1786
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1799
1787
|
<ul class="tsd-parameter-list">
|
|
1800
1788
|
<li>
|
|
1801
|
-
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1789
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1802
1790
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object or null. It represents the
|
|
1803
1791
|
root node of a binary tree. If it is null, the function will use the root node of the current binary tree instance.</p>
|
|
1804
1792
|
</div>
|
|
@@ -1810,13 +1798,13 @@ specifies the property of the <code>BinaryTreeNode</code> object to collect at e
|
|
|
1810
1798
|
values:</p>
|
|
1811
1799
|
</div>
|
|
1812
1800
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1813
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>listLevels</code> returns a 2D array of <code>
|
|
1801
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>listLevels</code> returns a 2D array of <code>AbstractResultByProperty<N></code> objects.</p>
|
|
1814
1802
|
|
|
1815
1803
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1816
1804
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#listLevels">listLevels</a></p>
|
|
1817
1805
|
<ul>
|
|
1818
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1819
|
-
<li class="tsd-signature tsd-anchor-link" id="listLevels.listLevels-3"><span class="tsd-kind-call-signature">list<wbr/>Levels</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
1806
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1130">src/data-structures/binary-tree/abstract-binary-tree.ts:1130</a></li></ul></aside></li>
|
|
1807
|
+
<li class="tsd-signature tsd-anchor-link" id="listLevels.listLevels-3"><span class="tsd-kind-call-signature">list<wbr/>Levels</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span><a href="#listLevels.listLevels-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1820
1808
|
<li class="tsd-description">
|
|
1821
1809
|
<div class="tsd-comment tsd-typography"><p>The <code>listLevels</code> function collects nodes from a binary tree by a specified property and organizes them into levels.</p>
|
|
1822
1810
|
</div>
|
|
@@ -1824,7 +1812,7 @@ values:</p>
|
|
|
1824
1812
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1825
1813
|
<ul class="tsd-parameter-list">
|
|
1826
1814
|
<li>
|
|
1827
|
-
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1815
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1828
1816
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object or null. It represents the
|
|
1829
1817
|
root node of a binary tree. If it is null, the function will use the root node of the current binary tree instance.</p>
|
|
1830
1818
|
</div>
|
|
@@ -1836,13 +1824,13 @@ specifies the property of the <code>BinaryTreeNode</code> object to collect at e
|
|
|
1836
1824
|
values:</p>
|
|
1837
1825
|
</div>
|
|
1838
1826
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1839
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">
|
|
1827
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>listLevels</code> returns a 2D array of <code>AbstractResultByProperty<N></code> objects.</p>
|
|
1840
1828
|
|
|
1841
1829
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1842
1830
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#listLevels">listLevels</a></p>
|
|
1843
1831
|
<ul>
|
|
1844
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1845
|
-
<li class="tsd-signature tsd-anchor-link" id="listLevels.listLevels-4"><span class="tsd-kind-call-signature">list<wbr/>Levels</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><
|
|
1832
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1132">src/data-structures/binary-tree/abstract-binary-tree.ts:1132</a></li></ul></aside></li>
|
|
1833
|
+
<li class="tsd-signature tsd-anchor-link" id="listLevels.listLevels-4"><span class="tsd-kind-call-signature">list<wbr/>Levels</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span><a href="#listLevels.listLevels-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1846
1834
|
<li class="tsd-description">
|
|
1847
1835
|
<div class="tsd-comment tsd-typography"><p>The <code>listLevels</code> function collects nodes from a binary tree by a specified property and organizes them into levels.</p>
|
|
1848
1836
|
</div>
|
|
@@ -1850,7 +1838,7 @@ values:</p>
|
|
|
1850
1838
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1851
1839
|
<ul class="tsd-parameter-list">
|
|
1852
1840
|
<li>
|
|
1853
|
-
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1841
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1854
1842
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object or null. It represents the
|
|
1855
1843
|
root node of a binary tree. If it is null, the function will use the root node of the current binary tree instance.</p>
|
|
1856
1844
|
</div>
|
|
@@ -1862,12 +1850,12 @@ specifies the property of the <code>BinaryTreeNode</code> object to collect at e
|
|
|
1862
1850
|
values:</p>
|
|
1863
1851
|
</div>
|
|
1864
1852
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1865
|
-
<h4 class="tsd-returns-title">Returns <
|
|
1853
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>listLevels</code> returns a 2D array of <code>AbstractResultByProperty<N></code> objects.</p>
|
|
1866
1854
|
|
|
1867
1855
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1868
1856
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#listLevels">listLevels</a></p>
|
|
1869
1857
|
<ul>
|
|
1870
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1858
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1134">src/data-structures/binary-tree/abstract-binary-tree.ts:1134</a></li></ul></aside></li>
|
|
1871
1859
|
<li class="tsd-signature tsd-anchor-link" id="listLevels.listLevels-5"><span class="tsd-kind-call-signature">list<wbr/>Levels</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span><a href="#listLevels.listLevels-5" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1872
1860
|
<li class="tsd-description">
|
|
1873
1861
|
<div class="tsd-comment tsd-typography"><p>The <code>listLevels</code> function collects nodes from a binary tree by a specified property and organizes them into levels.</p>
|
|
@@ -1876,7 +1864,7 @@ values:</p>
|
|
|
1876
1864
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1877
1865
|
<ul class="tsd-parameter-list">
|
|
1878
1866
|
<li>
|
|
1879
|
-
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1867
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1880
1868
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object or null. It represents the
|
|
1881
1869
|
root node of a binary tree. If it is null, the function will use the root node of the current binary tree instance.</p>
|
|
1882
1870
|
</div>
|
|
@@ -1888,12 +1876,12 @@ specifies the property of the <code>BinaryTreeNode</code> object to collect at e
|
|
|
1888
1876
|
values:</p>
|
|
1889
1877
|
</div>
|
|
1890
1878
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1891
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>listLevels</code> returns a 2D array of <code>
|
|
1879
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>listLevels</code> returns a 2D array of <code>AbstractResultByProperty<N></code> objects.</p>
|
|
1892
1880
|
|
|
1893
1881
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1894
1882
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#listLevels">listLevels</a></p>
|
|
1895
1883
|
<ul>
|
|
1896
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1884
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1136">src/data-structures/binary-tree/abstract-binary-tree.ts:1136</a></li></ul></aside></li></ul></section>
|
|
1897
1885
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="morris" class="tsd-anchor"></a>
|
|
1898
1886
|
<h3 class="tsd-anchor-link"><span>morris</span><a href="#morris" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1899
1887
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1904,12 +1892,12 @@ traversal algorithm and returns the results based on the specified property name
|
|
|
1904
1892
|
The time complexity of Morris traversal is O(n), it's may slower than others
|
|
1905
1893
|
The space complexity Morris traversal is O(1) because no using stack</p>
|
|
1906
1894
|
</div>
|
|
1907
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>morris</code> returns an object of type <code>
|
|
1895
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>morris</code> returns an object of type <code>AbstractResultsByProperty<N></code>.</p>
|
|
1908
1896
|
|
|
1909
1897
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1910
1898
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#morris">morris</a></p>
|
|
1911
1899
|
<ul>
|
|
1912
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1900
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1219">src/data-structures/binary-tree/abstract-binary-tree.ts:1219</a></li></ul></aside></li>
|
|
1913
1901
|
<li class="tsd-signature tsd-anchor-link" id="morris.morris-2"><span class="tsd-kind-call-signature">morris</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><a href="#morris.morris-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1914
1902
|
<li class="tsd-description">
|
|
1915
1903
|
<div class="tsd-comment tsd-typography"><p>The <code>morris</code> function performs an in-order, pre-order, or post-order traversal on a binary tree using the Morris
|
|
@@ -1933,13 +1921,13 @@ property of the nodes that you want to retrieve in the results. It can be either
|
|
|
1933
1921
|
property. If not provided, it defaults to <code>'id'</code>.</p>
|
|
1934
1922
|
</div>
|
|
1935
1923
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1936
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>morris</code> returns an object of type <code>
|
|
1924
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>morris</code> returns an object of type <code>AbstractResultsByProperty<N></code>.</p>
|
|
1937
1925
|
|
|
1938
1926
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1939
1927
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#morris">morris</a></p>
|
|
1940
1928
|
<ul>
|
|
1941
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1942
|
-
<li class="tsd-signature tsd-anchor-link" id="morris.morris-3"><span class="tsd-kind-call-signature">morris</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
1929
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1221">src/data-structures/binary-tree/abstract-binary-tree.ts:1221</a></li></ul></aside></li>
|
|
1930
|
+
<li class="tsd-signature tsd-anchor-link" id="morris.morris-3"><span class="tsd-kind-call-signature">morris</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span><a href="#morris.morris-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1943
1931
|
<li class="tsd-description">
|
|
1944
1932
|
<div class="tsd-comment tsd-typography"><p>The <code>morris</code> function performs an in-order, pre-order, or post-order traversal on a binary tree using the Morris
|
|
1945
1933
|
traversal algorithm and returns the results based on the specified property name.
|
|
@@ -1962,13 +1950,13 @@ property of the nodes that you want to retrieve in the results. It can be either
|
|
|
1962
1950
|
property. If not provided, it defaults to <code>'id'</code>.</p>
|
|
1963
1951
|
</div>
|
|
1964
1952
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1965
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">
|
|
1953
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>morris</code> returns an object of type <code>AbstractResultsByProperty<N></code>.</p>
|
|
1966
1954
|
|
|
1967
1955
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1968
1956
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#morris">morris</a></p>
|
|
1969
1957
|
<ul>
|
|
1970
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1971
|
-
<li class="tsd-signature tsd-anchor-link" id="morris.morris-4"><span class="tsd-kind-call-signature">morris</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><
|
|
1958
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1223">src/data-structures/binary-tree/abstract-binary-tree.ts:1223</a></li></ul></aside></li>
|
|
1959
|
+
<li class="tsd-signature tsd-anchor-link" id="morris.morris-4"><span class="tsd-kind-call-signature">morris</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span><a href="#morris.morris-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1972
1960
|
<li class="tsd-description">
|
|
1973
1961
|
<div class="tsd-comment tsd-typography"><p>The <code>morris</code> function performs an in-order, pre-order, or post-order traversal on a binary tree using the Morris
|
|
1974
1962
|
traversal algorithm and returns the results based on the specified property name.
|
|
@@ -1991,12 +1979,12 @@ property of the nodes that you want to retrieve in the results. It can be either
|
|
|
1991
1979
|
property. If not provided, it defaults to <code>'id'</code>.</p>
|
|
1992
1980
|
</div>
|
|
1993
1981
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1994
|
-
<h4 class="tsd-returns-title">Returns <
|
|
1982
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>morris</code> returns an object of type <code>AbstractResultsByProperty<N></code>.</p>
|
|
1995
1983
|
|
|
1996
1984
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1997
1985
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#morris">morris</a></p>
|
|
1998
1986
|
<ul>
|
|
1999
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1987
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1225">src/data-structures/binary-tree/abstract-binary-tree.ts:1225</a></li></ul></aside></li>
|
|
2000
1988
|
<li class="tsd-signature tsd-anchor-link" id="morris.morris-5"><span class="tsd-kind-call-signature">morris</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><a href="#morris.morris-5" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
2001
1989
|
<li class="tsd-description">
|
|
2002
1990
|
<div class="tsd-comment tsd-typography"><p>The <code>morris</code> function performs an in-order, pre-order, or post-order traversal on a binary tree using the Morris
|
|
@@ -2020,16 +2008,16 @@ property of the nodes that you want to retrieve in the results. It can be either
|
|
|
2020
2008
|
property. If not provided, it defaults to <code>'id'</code>.</p>
|
|
2021
2009
|
</div>
|
|
2022
2010
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
2023
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>morris</code> returns an object of type <code>
|
|
2011
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>morris</code> returns an object of type <code>AbstractResultsByProperty<N></code>.</p>
|
|
2024
2012
|
|
|
2025
2013
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
2026
2014
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#morris">morris</a></p>
|
|
2027
2015
|
<ul>
|
|
2028
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
2016
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1227">src/data-structures/binary-tree/abstract-binary-tree.ts:1227</a></li></ul></aside></li></ul></section>
|
|
2029
2017
|
<section class="tsd-panel tsd-member"><a id="remove" class="tsd-anchor"></a>
|
|
2030
2018
|
<h3 class="tsd-anchor-link"><span>remove</span><a href="#remove" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
2031
2019
|
<ul class="tsd-signatures">
|
|
2032
|
-
<li class="tsd-signature tsd-anchor-link" id="remove.remove-1"><span class="tsd-kind-call-signature">remove</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">id</span>, <span class="tsd-kind-parameter">isUpdateAllLeftSum</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../
|
|
2020
|
+
<li class="tsd-signature tsd-anchor-link" id="remove.remove-1"><span class="tsd-kind-call-signature">remove</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">id</span>, <span class="tsd-kind-parameter">isUpdateAllLeftSum</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../types/BinaryTreeDeletedResult.html" class="tsd-signature-type tsd-kind-type-alias">BinaryTreeDeletedResult</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">[]</span><a href="#remove.remove-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
2033
2021
|
<li class="tsd-description">
|
|
2034
2022
|
<div class="tsd-comment tsd-typography"><p>The function overrides the remove method of the Binary Search Tree class, performs the removal operation, and
|
|
2035
2023
|
then balances the tree if necessary.</p>
|
|
@@ -2050,12 +2038,12 @@ determines whether the left sum of all nodes in the AVL tree should be updated a
|
|
|
2050
2038
|
<code>isUpdateAllLeftSum</code> is set to <code>true</code>, the left sum of all nodes will be recalculated.</p>
|
|
2051
2039
|
</div>
|
|
2052
2040
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
2053
|
-
<h4 class="tsd-returns-title">Returns <a href="../
|
|
2041
|
+
<h4 class="tsd-returns-title">Returns <a href="../types/BinaryTreeDeletedResult.html" class="tsd-signature-type tsd-kind-type-alias">BinaryTreeDeletedResult</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">[]</span></h4><p>The method is returning an array of <code>AVLTreeDeleted<N></code> objects.</p>
|
|
2054
2042
|
|
|
2055
2043
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
2056
2044
|
<p>Overrides <a href="BST.html">BST</a>.<a href="BST.html#remove">remove</a></p>
|
|
2057
2045
|
<ul>
|
|
2058
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
2046
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/avl-tree.ts#L54">src/data-structures/binary-tree/avl-tree.ts:54</a></li></ul></aside></li></ul></section>
|
|
2059
2047
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="setVisitedCount" class="tsd-anchor"></a>
|
|
2060
2048
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>set<wbr/>Visited<wbr/>Count</span><a href="#setVisitedCount" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
2061
2049
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -2069,7 +2057,7 @@ determines whether the left sum of all nodes in the AVL tree should be updated a
|
|
|
2069
2057
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
2070
2058
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#setVisitedCount">setVisitedCount</a></p>
|
|
2071
2059
|
<ul>
|
|
2072
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
2060
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1343">src/data-structures/binary-tree/abstract-binary-tree.ts:1343</a></li></ul></aside></li></ul></section>
|
|
2073
2061
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="subTreeAdd" class="tsd-anchor"></a>
|
|
2074
2062
|
<h3 class="tsd-anchor-link"><span>sub<wbr/>Tree<wbr/>Add</span><a href="#subTreeAdd" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
2075
2063
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -2081,7 +2069,7 @@ determines whether the left sum of all nodes in the AVL tree should be updated a
|
|
|
2081
2069
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
2082
2070
|
<ul class="tsd-parameter-list">
|
|
2083
2071
|
<li>
|
|
2084
|
-
<h5><span class="tsd-kind-parameter">subTreeRoot</span>: <
|
|
2072
|
+
<h5><span class="tsd-kind-parameter">subTreeRoot</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
2085
2073
|
<div class="tsd-comment tsd-typography"><p>The <code>subTreeRoot</code> parameter is the root node of the subtree where the values will be modified.</p>
|
|
2086
2074
|
</div>
|
|
2087
2075
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
@@ -2102,7 +2090,7 @@ specifies the property of the <code>BinaryTreeNode</code> that should be modifie
|
|
|
2102
2090
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
2103
2091
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#subTreeAdd">subTreeAdd</a></p>
|
|
2104
2092
|
<ul>
|
|
2105
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
2093
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L896">src/data-structures/binary-tree/abstract-binary-tree.ts:896</a></li></ul></aside></li></ul></section>
|
|
2106
2094
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="subTreeSum" class="tsd-anchor"></a>
|
|
2107
2095
|
<h3 class="tsd-anchor-link"><span>sub<wbr/>Tree<wbr/>Sum</span><a href="#subTreeSum" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
2108
2096
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -2115,7 +2103,7 @@ iteratively.</p>
|
|
|
2115
2103
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
2116
2104
|
<ul class="tsd-parameter-list">
|
|
2117
2105
|
<li>
|
|
2118
|
-
<h5><span class="tsd-kind-parameter">subTreeRoot</span>: <
|
|
2106
|
+
<h5><span class="tsd-kind-parameter">subTreeRoot</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
2119
2107
|
<div class="tsd-comment tsd-typography"><p>The subTreeRoot parameter is the root node of the subtree for which you want to calculate the
|
|
2120
2108
|
sum.</p>
|
|
2121
2109
|
</div>
|
|
@@ -2132,7 +2120,7 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
2132
2120
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
2133
2121
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#subTreeSum">subTreeSum</a></p>
|
|
2134
2122
|
<ul>
|
|
2135
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
2123
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L840">src/data-structures/binary-tree/abstract-binary-tree.ts:840</a></li></ul></aside></li></ul></section>
|
|
2136
2124
|
<section class="tsd-panel tsd-member"><a id="updateHeight" class="tsd-anchor"></a>
|
|
2137
2125
|
<h3 class="tsd-anchor-link"><span>update<wbr/>Height</span><a href="#updateHeight" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
2138
2126
|
<ul class="tsd-signatures">
|
|
@@ -2144,14 +2132,14 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
2144
2132
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
2145
2133
|
<ul class="tsd-parameter-list">
|
|
2146
2134
|
<li>
|
|
2147
|
-
<h5><span class="tsd-kind-parameter">node</span>: <
|
|
2135
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
2148
2136
|
<div class="tsd-comment tsd-typography"><p>The parameter <code>node</code> is an AVLTreeNode object, which represents a node in an AVL tree.</p>
|
|
2149
2137
|
</div>
|
|
2150
2138
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
2151
2139
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
2152
2140
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
2153
2141
|
<ul>
|
|
2154
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
2142
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/avl-tree.ts#L83">src/data-structures/binary-tree/avl-tree.ts:83</a></li></ul></aside></li></ul></section></section></div>
|
|
2155
2143
|
<div class="col-sidebar">
|
|
2156
2144
|
<div class="page-menu">
|
|
2157
2145
|
<div class="tsd-navigation settings">
|
|
@@ -2171,7 +2159,7 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
2171
2159
|
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="#icon-chevronDown"></use></svg>On This Page</h3></summary>
|
|
2172
2160
|
<div class="tsd-accordion-details">
|
|
2173
2161
|
<ul>
|
|
2174
|
-
<li><a href="#constructor" class="
|
|
2162
|
+
<li><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-512"></use></svg><span>constructor</span></a></li>
|
|
2175
2163
|
<li><a href="#_comparator" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_comparator</span></a></li>
|
|
2176
2164
|
<li><a href="#autoIncrementId" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>auto<wbr/>Increment<wbr/>Id</span></a></li>
|
|
2177
2165
|
<li><a href="#count" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>count</span></a></li>
|
|
@@ -2190,6 +2178,7 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
2190
2178
|
<li><a href="#DFSIterative" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>DFSIterative</span></a></li>
|
|
2191
2179
|
<li><a href="#_accumulatedByPropertyName" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_accumulated<wbr/>By<wbr/>Property<wbr/>Name</span></a></li>
|
|
2192
2180
|
<li><a href="#_compare" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_compare</span></a></li>
|
|
2181
|
+
<li><a href="#_createNode" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_create<wbr/>Node</span></a></li>
|
|
2193
2182
|
<li><a href="#_getResultByPropertyName" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_get<wbr/>Result<wbr/>By<wbr/>Property<wbr/>Name</span></a></li>
|
|
2194
2183
|
<li><a href="#_pushByPropertyNameStopOrNot" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_push<wbr/>By<wbr/>Property<wbr/>Name<wbr/>Stop<wbr/>Or<wbr/>Not</span></a></li>
|
|
2195
2184
|
<li><a href="#_resetResults" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_reset<wbr/>Results</span></a></li>
|
|
@@ -2216,7 +2205,6 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
2216
2205
|
<li><a href="#balanceRL" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>balanceRL</span></a></li>
|
|
2217
2206
|
<li><a href="#balanceRR" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>balanceRR</span></a></li>
|
|
2218
2207
|
<li><a href="#clear" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>clear</span></a></li>
|
|
2219
|
-
<li><a href="#createNode" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>create<wbr/>Node</span></a></li>
|
|
2220
2208
|
<li><a href="#fill" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>fill</span></a></li>
|
|
2221
2209
|
<li><a href="#get" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get</span></a></li>
|
|
2222
2210
|
<li><a href="#getDepth" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Depth</span></a></li>
|
|
@@ -2249,9 +2237,13 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
2249
2237
|
<li><a href="../enums/CP.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-8"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-enum)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.45 16V7.24H14.49V8.224H10.518V10.936H14.07V11.908H10.518V15.016H14.49V16H9.45Z" fill="var(--color-text)"></path></g></svg><span>CP</span></a></li>
|
|
2250
2238
|
<li><a href="../enums/FamilyPosition.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-8"></use></svg><span>Family<wbr/>Position</span></a></li>
|
|
2251
2239
|
<li><a href="../enums/LoopType.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-8"></use></svg><span>Loop<wbr/>Type</span></a></li>
|
|
2240
|
+
<li><a href="../enums/RBColor.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-8"></use></svg><span>RBColor</span></a></li>
|
|
2241
|
+
<li><a href="../enums/TopologicalProperty.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-8"></use></svg><span>Topological<wbr/>Property</span></a></li>
|
|
2252
2242
|
<li><a href="AVLTree.html" class="current"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-128"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)"></path></g></svg><span>AVLTree</span></a></li>
|
|
2253
2243
|
<li><a href="AVLTreeNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>AVLTree<wbr/>Node</span></a></li>
|
|
2254
2244
|
<li><a href="AaTree.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Aa<wbr/>Tree</span></a></li>
|
|
2245
|
+
<li><a href="AbstractBinaryTree.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Abstract<wbr/>Binary<wbr/>Tree</span></a></li>
|
|
2246
|
+
<li><a href="AbstractBinaryTreeNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Abstract<wbr/>Binary<wbr/>Tree<wbr/>Node</span></a></li>
|
|
2255
2247
|
<li><a href="AbstractEdge.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Abstract<wbr/>Edge</span></a></li>
|
|
2256
2248
|
<li><a href="AbstractGraph.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Abstract<wbr/>Graph</span></a></li>
|
|
2257
2249
|
<li><a href="AbstractVertex.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Abstract<wbr/>Vertex</span></a></li>
|
|
@@ -2285,7 +2277,6 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
2285
2277
|
<li><a href="Pair.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Pair</span></a></li>
|
|
2286
2278
|
<li><a href="PriorityQueue.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Priority<wbr/>Queue</span></a></li>
|
|
2287
2279
|
<li><a href="Queue.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Queue</span></a></li>
|
|
2288
|
-
<li><a href="RBTree.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>RBTree</span></a></li>
|
|
2289
2280
|
<li><a href="SegmentTree.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Segment<wbr/>Tree</span></a></li>
|
|
2290
2281
|
<li><a href="SegmentTreeNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Segment<wbr/>Tree<wbr/>Node</span></a></li>
|
|
2291
2282
|
<li><a href="SinglyLinkedList.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Singly<wbr/>Linked<wbr/>List</span></a></li>
|
|
@@ -2295,6 +2286,7 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
2295
2286
|
<li><a href="Stack.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Stack</span></a></li>
|
|
2296
2287
|
<li><a href="TreeMap.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Tree<wbr/>Map</span></a></li>
|
|
2297
2288
|
<li><a href="TreeMultiSet.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Tree<wbr/>Multi<wbr/>Set</span></a></li>
|
|
2289
|
+
<li><a href="TreeMultiSetNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Tree<wbr/>Multi<wbr/>Set<wbr/>Node</span></a></li>
|
|
2298
2290
|
<li><a href="TreeNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Tree<wbr/>Node</span></a></li>
|
|
2299
2291
|
<li><a href="TreeSet.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Tree<wbr/>Set</span></a></li>
|
|
2300
2292
|
<li><a href="Trie.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Trie</span></a></li>
|
|
@@ -2304,33 +2296,42 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
2304
2296
|
<li><a href="UndirectedGraph.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Undirected<wbr/>Graph</span></a></li>
|
|
2305
2297
|
<li><a href="UndirectedVertex.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Undirected<wbr/>Vertex</span></a></li>
|
|
2306
2298
|
<li><a href="Vector2D.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Vector2D</span></a></li>
|
|
2307
|
-
<li><a href="../interfaces/
|
|
2308
|
-
<li><a href="../interfaces/
|
|
2299
|
+
<li><a href="../interfaces/IBinaryTree.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-256"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.51 16V15.016H11.298V8.224H9.51V7.24H14.19V8.224H12.402V15.016H14.19V16H9.51Z" fill="var(--color-text)"></path></g></svg><span>IBinary<wbr/>Tree</span></a></li>
|
|
2300
|
+
<li><a href="../interfaces/IBinaryTreeNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>IBinary<wbr/>Tree<wbr/>Node</span></a></li>
|
|
2309
2301
|
<li><a href="../interfaces/IDirectedGraph.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>IDirected<wbr/>Graph</span></a></li>
|
|
2310
2302
|
<li><a href="../interfaces/IGraph.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>IGraph</span></a></li>
|
|
2311
|
-
<li><a href="../interfaces/
|
|
2312
|
-
<li><a href="../
|
|
2313
|
-
<li><a href="../types/
|
|
2314
|
-
<li><a href="../types/
|
|
2315
|
-
<li><a href="../types/
|
|
2303
|
+
<li><a href="../interfaces/IUNDirectedGraph.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>IUNDirected<wbr/>Graph</span></a></li>
|
|
2304
|
+
<li><a href="../types/AVLTreeOptions.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-4194304"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)"></path></g></svg><span>AVLTree<wbr/>Options</span></a></li>
|
|
2305
|
+
<li><a href="../types/AbstractBinaryTreeOptions.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Abstract<wbr/>Binary<wbr/>Tree<wbr/>Options</span></a></li>
|
|
2306
|
+
<li><a href="../types/AbstractRecursiveBinaryTreeNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Abstract<wbr/>Recursive<wbr/>Binary<wbr/>Tree<wbr/>Node</span></a></li>
|
|
2307
|
+
<li><a href="../types/AbstractResultByProperty.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Abstract<wbr/>Result<wbr/>By<wbr/>Property</span></a></li>
|
|
2308
|
+
<li><a href="../types/AbstractResultsByProperty.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Abstract<wbr/>Results<wbr/>By<wbr/>Property</span></a></li>
|
|
2309
|
+
<li><a href="../types/BSTComparator.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>BSTComparator</span></a></li>
|
|
2310
|
+
<li><a href="../types/BSTOptions.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>BSTOptions</span></a></li>
|
|
2311
|
+
<li><a href="../types/BinaryTreeDeletedResult.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Binary<wbr/>Tree<wbr/>Deleted<wbr/>Result</span></a></li>
|
|
2316
2312
|
<li><a href="../types/BinaryTreeNodeId.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Binary<wbr/>Tree<wbr/>Node<wbr/>Id</span></a></li>
|
|
2317
2313
|
<li><a href="../types/BinaryTreeNodePropertyName.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Binary<wbr/>Tree<wbr/>Node<wbr/>Property<wbr/>Name</span></a></li>
|
|
2314
|
+
<li><a href="../types/BinaryTreeOptions.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Binary<wbr/>Tree<wbr/>Options</span></a></li>
|
|
2318
2315
|
<li><a href="../types/DFSOrderPattern.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>DFSOrder<wbr/>Pattern</span></a></li>
|
|
2319
2316
|
<li><a href="../types/DijkstraResult.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Dijkstra<wbr/>Result</span></a></li>
|
|
2320
2317
|
<li><a href="../types/Direction.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Direction</span></a></li>
|
|
2318
|
+
<li><a href="../types/EdgeId.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Edge<wbr/>Id</span></a></li>
|
|
2319
|
+
<li><a href="../types/HeapOptions.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Heap<wbr/>Options</span></a></li>
|
|
2320
|
+
<li><a href="../types/IdObject.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Id<wbr/>Object</span></a></li>
|
|
2321
|
+
<li><a href="../types/KeyValObject.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Key<wbr/>Val<wbr/>Object</span></a></li>
|
|
2322
|
+
<li><a href="../types/NavigatorParams.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Navigator<wbr/>Params</span></a></li>
|
|
2321
2323
|
<li><a href="../types/NodeOrPropertyName.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Node<wbr/>Or<wbr/>Property<wbr/>Name</span></a></li>
|
|
2322
2324
|
<li><a href="../types/PriorityQueueComparator.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Priority<wbr/>Queue<wbr/>Comparator</span></a></li>
|
|
2323
2325
|
<li><a href="../types/PriorityQueueDFSOrderPattern.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Priority<wbr/>QueueDFSOrder<wbr/>Pattern</span></a></li>
|
|
2324
|
-
<li><a href="../types/
|
|
2325
|
-
<li><a href="../types/
|
|
2326
|
+
<li><a href="../types/PriorityQueueOptions.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Priority<wbr/>Queue<wbr/>Options</span></a></li>
|
|
2327
|
+
<li><a href="../types/RBTreeOptions.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>RBTree<wbr/>Options</span></a></li>
|
|
2328
|
+
<li><a href="../types/RecursiveAVLTreeNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>RecursiveAVLTree<wbr/>Node</span></a></li>
|
|
2329
|
+
<li><a href="../types/RecursiveBSTNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>RecursiveBSTNode</span></a></li>
|
|
2330
|
+
<li><a href="../types/RecursiveBinaryTreeNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Recursive<wbr/>Binary<wbr/>Tree<wbr/>Node</span></a></li>
|
|
2331
|
+
<li><a href="../types/RecursiveTreeMultiSetNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Recursive<wbr/>Tree<wbr/>Multi<wbr/>Set<wbr/>Node</span></a></li>
|
|
2326
2332
|
<li><a href="../types/SegmentTreeNodeVal.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Segment<wbr/>Tree<wbr/>Node<wbr/>Val</span></a></li>
|
|
2327
|
-
<li><a href="../types/SpecifyOptional.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Specify<wbr/>Optional</span></a></li>
|
|
2328
|
-
<li><a href="../types/Thunk.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Thunk</span></a></li>
|
|
2329
|
-
<li><a href="../types/ToThunkFn.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>To<wbr/>Thunk<wbr/>Fn</span></a></li>
|
|
2330
2333
|
<li><a href="../types/TopologicalStatus.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Topological<wbr/>Status</span></a></li>
|
|
2331
|
-
<li><a href="../types/
|
|
2332
|
-
<li><a href="../types/TrlAsyncFn.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Trl<wbr/>Async<wbr/>Fn</span></a></li>
|
|
2333
|
-
<li><a href="../types/TrlFn.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Trl<wbr/>Fn</span></a></li>
|
|
2334
|
+
<li><a href="../types/TreeMultiSetOptions.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Tree<wbr/>Multi<wbr/>Set<wbr/>Options</span></a></li>
|
|
2334
2335
|
<li><a href="../types/Turning.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Turning</span></a></li>
|
|
2335
2336
|
<li><a href="../types/VertexId.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Vertex<wbr/>Id</span></a></li></ul></nav></div></div></div>
|
|
2336
2337
|
<div class="tsd-generator">
|