data-structure-typed 1.18.0 → 1.18.5
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/avl-tree.d.ts +19 -25
- package/dist/data-structures/binary-tree/avl-tree.js +8 -16
- package/dist/data-structures/binary-tree/binary-tree.d.ts +99 -98
- package/dist/data-structures/binary-tree/binary-tree.js +70 -65
- package/dist/data-structures/binary-tree/bst.d.ts +21 -21
- package/dist/data-structures/binary-tree/bst.js +15 -17
- package/dist/data-structures/binary-tree/rb-tree.d.ts +1 -2
- package/dist/data-structures/binary-tree/rb-tree.js +68 -5
- package/dist/data-structures/binary-tree/tree-multiset.d.ts +9 -8
- package/dist/data-structures/binary-tree/tree-multiset.js +7 -6
- 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 +127 -96
- package/dist/data-structures/graph/directed-graph.js +161 -109
- package/dist/data-structures/graph/undirected-graph.d.ts +82 -59
- package/dist/data-structures/graph/undirected-graph.js +99 -72
- 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 +27 -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-graph.d.ts +1 -20
- package/dist/data-structures/types/avl-tree.d.ts +5 -4
- package/dist/data-structures/types/binary-tree.d.ts +6 -5
- package/dist/data-structures/types/bst.d.ts +4 -3
- 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/index.d.ts +0 -1
- package/dist/data-structures/types/index.js +0 -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/tree-multiset.d.ts +3 -4
- package/docs/assets/search.js +1 -1
- package/docs/classes/AVLTree.html +288 -287
- package/docs/classes/AVLTreeNode.html +106 -63
- package/docs/classes/AaTree.html +14 -12
- package/docs/classes/AbstractEdge.html +68 -34
- package/docs/classes/AbstractGraph.html +219 -114
- package/docs/classes/AbstractVertex.html +71 -30
- package/docs/classes/ArrayDeque.html +27 -25
- package/docs/classes/BST.html +279 -273
- package/docs/classes/BSTNode.html +106 -57
- package/docs/classes/BTree.html +14 -12
- package/docs/classes/BinaryIndexedTree.html +22 -20
- package/docs/classes/BinaryTree.html +283 -277
- package/docs/classes/BinaryTreeNode.html +111 -63
- package/docs/classes/Character.html +17 -15
- package/docs/classes/CoordinateMap.html +22 -20
- package/docs/classes/CoordinateSet.html +23 -21
- package/docs/classes/Deque.html +47 -45
- package/docs/classes/DirectedEdge.html +74 -41
- package/docs/classes/DirectedGraph.html +444 -208
- package/docs/classes/DirectedVertex.html +63 -36
- package/docs/classes/DoublyLinkedList.html +52 -50
- package/docs/classes/DoublyLinkedListNode.html +24 -22
- package/docs/classes/HashTable.html +14 -12
- package/docs/classes/Heap.html +29 -27
- package/docs/classes/HeapItem.html +21 -19
- package/docs/classes/Matrix2D.html +29 -27
- package/docs/classes/MatrixNTI2D.html +17 -15
- package/docs/classes/MaxHeap.html +29 -27
- package/docs/classes/MaxPriorityQueue.html +67 -60
- package/docs/classes/MinHeap.html +29 -27
- package/docs/classes/MinPriorityQueue.html +67 -60
- package/docs/classes/Navigator.html +24 -22
- package/docs/classes/ObjectDeque.html +62 -50
- package/docs/classes/Pair.html +14 -12
- package/docs/classes/PriorityQueue.html +62 -55
- package/docs/classes/Queue.html +29 -27
- package/docs/classes/SegmentTree.html +30 -28
- package/docs/classes/SegmentTreeNode.html +33 -31
- package/docs/classes/SinglyLinkedList.html +49 -47
- package/docs/classes/SinglyLinkedListNode.html +21 -19
- package/docs/classes/SkipLinkedList.html +14 -12
- package/docs/classes/SplayTree.html +14 -12
- package/docs/classes/Stack.html +27 -25
- package/docs/classes/TreeMap.html +14 -12
- package/docs/classes/TreeMultiSet.html +277 -270
- package/docs/classes/TreeNode.html +29 -27
- package/docs/classes/TreeSet.html +14 -12
- package/docs/classes/Trie.html +26 -24
- package/docs/classes/TrieNode.html +24 -22
- package/docs/classes/TwoThreeTree.html +14 -12
- package/docs/classes/UndirectedEdge.html +70 -51
- package/docs/classes/UndirectedGraph.html +344 -161
- package/docs/classes/UndirectedVertex.html +63 -36
- package/docs/classes/Vector2D.html +41 -39
- package/docs/enums/CP.html +17 -15
- package/docs/enums/FamilyPosition.html +17 -15
- package/docs/enums/LoopType.html +16 -14
- package/docs/{interfaces/AVLTreeDeleted.html → enums/TopologicalProperty.html} +43 -43
- package/docs/index.html +195 -68
- package/docs/interfaces/{HeapOptions.html → IBinaryTree.html} +39 -32
- package/docs/interfaces/IBinaryTreeNode.html +383 -0
- package/docs/interfaces/IDirectedGraph.html +20 -18
- package/docs/interfaces/IGraph.html +118 -88
- package/docs/interfaces/{PriorityQueueOptions.html → IUNDirectedGraph.html} +22 -53
- package/docs/modules.html +25 -21
- package/docs/types/{ToThunkFn.html → AVLTreeDeleted.html} +27 -21
- package/docs/types/BSTComparator.html +14 -12
- package/docs/types/BSTDeletedResult.html +19 -17
- package/docs/types/BinaryTreeDeleted.html +19 -17
- package/docs/types/BinaryTreeNodeId.html +14 -12
- package/docs/types/BinaryTreeNodePropertyName.html +14 -12
- package/docs/types/DFSOrderPattern.html +14 -12
- package/docs/types/DijkstraResult.html +14 -12
- package/docs/types/Direction.html +14 -12
- package/docs/types/{TrlFn.html → EdgeId.html} +18 -29
- package/docs/types/{TrlAsyncFn.html → HeapOptions.html} +29 -19
- package/docs/types/NavigatorParams.html +164 -0
- package/docs/types/NodeOrPropertyName.html +14 -12
- package/docs/types/PriorityQueueComparator.html +14 -12
- package/docs/types/PriorityQueueDFSOrderPattern.html +14 -12
- package/docs/types/{SpecifyOptional.html → PriorityQueueOptions.html} +28 -19
- package/docs/types/RecursiveAVLTreeNode.html +135 -0
- package/docs/types/{Thunk.html → RecursiveBSTNode.html} +23 -24
- package/docs/types/RecursiveBinaryTreeNode.html +135 -0
- package/docs/types/ResultByProperty.html +17 -15
- package/docs/types/ResultsByProperty.html +17 -15
- package/docs/types/SegmentTreeNodeVal.html +14 -12
- package/docs/types/TopologicalStatus.html +14 -12
- package/docs/types/TreeMultiSetDeletedResult.html +19 -17
- package/docs/types/Turning.html +14 -12
- package/docs/types/VertexId.html +14 -12
- package/notes/note.md +8 -1
- package/package.json +10 -2
- package/docs/classes/RBTree.html +0 -153
- package/docs/interfaces/NavigatorParams.html +0 -200
package/docs/classes/BST.html
CHANGED
|
@@ -14,23 +14,27 @@
|
|
|
14
14
|
<ul class="tsd-breadcrumb">
|
|
15
15
|
<li><a href="../modules.html">data-structure-typed</a></li>
|
|
16
16
|
<li><a href="BST.html">BST</a></li></ul>
|
|
17
|
-
<h1>Class BST<
|
|
17
|
+
<h1>Class BST<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="BSTNode.html" class="tsd-signature-type tsd-kind-class">BSTNode</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="BSTNode.html" class="tsd-signature-type tsd-kind-class">BSTNode</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="BinaryTree.html" class="tsd-signature-type tsd-kind-class">BinaryTree</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
26
|
+
<li><a href="BinaryTree.html" class="tsd-signature-type tsd-kind-class">BinaryTree</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">BST</span>
|
|
29
29
|
<ul class="tsd-hierarchy">
|
|
30
30
|
<li><a href="AVLTree.html" class="tsd-signature-type tsd-kind-class">AVLTree</a></li>
|
|
31
|
-
<li><a href="TreeMultiSet.html" class="tsd-signature-type tsd-kind-class">TreeMultiSet</a></li></ul></li></ul></li></ul></section
|
|
31
|
+
<li><a href="TreeMultiSet.html" class="tsd-signature-type tsd-kind-class">TreeMultiSet</a></li></ul></li></ul></li></ul></section>
|
|
32
|
+
<section class="tsd-panel">
|
|
33
|
+
<h4>Implements</h4>
|
|
34
|
+
<ul class="tsd-hierarchy">
|
|
35
|
+
<li><a href="../interfaces/IBinaryTree.html" class="tsd-signature-type tsd-kind-interface">IBinaryTree</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">></span></li></ul></section><aside class="tsd-sources">
|
|
32
36
|
<ul>
|
|
33
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
37
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/bst.ts#L24">src/data-structures/binary-tree/bst.ts:24</a></li></ul></aside>
|
|
34
38
|
<section class="tsd-panel-group tsd-index-group">
|
|
35
39
|
<section class="tsd-panel tsd-index-panel">
|
|
36
40
|
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
|
|
@@ -66,6 +70,7 @@
|
|
|
66
70
|
<a href="BST.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>
|
|
67
71
|
<a href="BST.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>
|
|
68
72
|
<a href="BST.html#_compare" class="tsd-index-link tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_compare</span></a>
|
|
73
|
+
<a href="BST.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>
|
|
69
74
|
<a href="BST.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>
|
|
70
75
|
<a href="BST.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>
|
|
71
76
|
<a href="BST.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>
|
|
@@ -86,7 +91,6 @@
|
|
|
86
91
|
<a href="BST.html#allGreaterNodesAdd" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>all<wbr/>Greater<wbr/>Nodes<wbr/>Add</span></a>
|
|
87
92
|
<a href="BST.html#balance" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>balance</span></a>
|
|
88
93
|
<a href="BST.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>
|
|
89
|
-
<a href="BST.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>
|
|
90
94
|
<a href="BST.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>
|
|
91
95
|
<a href="BST.html#get" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get</span></a>
|
|
92
96
|
<a href="BST.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>
|
|
@@ -118,7 +122,7 @@
|
|
|
118
122
|
<section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a>
|
|
119
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>
|
|
120
124
|
<ul class="tsd-signatures">
|
|
121
|
-
<li class="tsd-signature tsd-anchor-link" id="constructor.new_BST"><span class="tsd-kind-constructor-signature">new BST</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
125
|
+
<li class="tsd-signature tsd-anchor-link" id="constructor.new_BST"><span class="tsd-kind-constructor-signature">new BST</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="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><a href="#constructor.new_BST" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
122
126
|
<li class="tsd-description">
|
|
123
127
|
<div class="tsd-comment tsd-typography"><p>The constructor function accepts an optional options object and sets the comparator property if provided.</p>
|
|
124
128
|
</div>
|
|
@@ -126,7 +130,7 @@
|
|
|
126
130
|
<h4>Type Parameters</h4>
|
|
127
131
|
<ul class="tsd-type-parameter-list">
|
|
128
132
|
<li>
|
|
129
|
-
<h4><span class="tsd-kind-type-parameter">
|
|
133
|
+
<h4><span class="tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol"> extends </span><a href="BSTNode.html" class="tsd-signature-type tsd-kind-class">BSTNode</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="BSTNode.html" class="tsd-signature-type tsd-kind-class">BSTNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span><a href="../types/RecursiveBSTNode.html" class="tsd-signature-type tsd-kind-type-alias">RecursiveBSTNode</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>
|
|
130
134
|
<div class="tsd-parameters">
|
|
131
135
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
132
136
|
<ul class="tsd-parameter-list">
|
|
@@ -140,18 +144,18 @@
|
|
|
140
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>
|
|
141
145
|
<li class="tsd-parameter">
|
|
142
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>
|
|
143
|
-
<h4 class="tsd-returns-title">Returns <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">
|
|
147
|
+
<h4 class="tsd-returns-title">Returns <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></h4>
|
|
144
148
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
145
149
|
<p>Overrides <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#constructor">constructor</a></p>
|
|
146
150
|
<ul>
|
|
147
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
151
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/bst.ts#L29">src/data-structures/binary-tree/bst.ts:29</a></li></ul></aside></li></ul></section></section>
|
|
148
152
|
<section class="tsd-panel-group tsd-member-group">
|
|
149
153
|
<h2>Properties</h2>
|
|
150
154
|
<section class="tsd-panel tsd-member tsd-is-protected"><a id="_comparator" class="tsd-anchor"></a>
|
|
151
155
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_comparator</span><a href="#_comparator" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
152
156
|
<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">
|
|
153
157
|
<ul>
|
|
154
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
158
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/bst.ts#L485">src/data-structures/binary-tree/bst.ts:485</a></li></ul></aside></section></section>
|
|
155
159
|
<section class="tsd-panel-group tsd-member-group">
|
|
156
160
|
<h2>Accessors</h2>
|
|
157
161
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="autoIncrementId" class="tsd-anchor"></a>
|
|
@@ -162,7 +166,7 @@
|
|
|
162
166
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources">
|
|
163
167
|
<p>Inherited from BinaryTree.autoIncrementId</p>
|
|
164
168
|
<ul>
|
|
165
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
169
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L220">src/data-structures/binary-tree/binary-tree.ts:220</a></li></ul></aside></li></ul></section>
|
|
166
170
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="count" class="tsd-anchor"></a>
|
|
167
171
|
<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>
|
|
168
172
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -171,7 +175,7 @@
|
|
|
171
175
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
|
|
172
176
|
<p>Inherited from BinaryTree.count</p>
|
|
173
177
|
<ul>
|
|
174
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
178
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L250">src/data-structures/binary-tree/binary-tree.ts:250</a></li></ul></aside></li></ul></section>
|
|
175
179
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="isDuplicatedVal" class="tsd-anchor"></a>
|
|
176
180
|
<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>
|
|
177
181
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -180,7 +184,7 @@
|
|
|
180
184
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources">
|
|
181
185
|
<p>Inherited from BinaryTree.isDuplicatedVal</p>
|
|
182
186
|
<ul>
|
|
183
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
187
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L232">src/data-structures/binary-tree/binary-tree.ts:232</a></li></ul></aside></li></ul></section>
|
|
184
188
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="loopType" class="tsd-anchor"></a>
|
|
185
189
|
<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>
|
|
186
190
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -189,7 +193,7 @@
|
|
|
189
193
|
<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">
|
|
190
194
|
<p>Inherited from BinaryTree.loopType</p>
|
|
191
195
|
<ul>
|
|
192
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
196
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L185">src/data-structures/binary-tree/binary-tree.ts:185</a></li></ul></aside></li></ul></section>
|
|
193
197
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="maxId" class="tsd-anchor"></a>
|
|
194
198
|
<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>
|
|
195
199
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -198,16 +202,16 @@
|
|
|
198
202
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
|
|
199
203
|
<p>Inherited from BinaryTree.maxId</p>
|
|
200
204
|
<ul>
|
|
201
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
205
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L226">src/data-structures/binary-tree/binary-tree.ts:226</a></li></ul></aside></li></ul></section>
|
|
202
206
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="root" class="tsd-anchor"></a>
|
|
203
207
|
<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>
|
|
204
208
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
205
|
-
<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><
|
|
209
|
+
<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>
|
|
206
210
|
<li class="tsd-description">
|
|
207
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
211
|
+
<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">
|
|
208
212
|
<p>Inherited from BinaryTree.root</p>
|
|
209
213
|
<ul>
|
|
210
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
214
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L238">src/data-structures/binary-tree/binary-tree.ts:238</a></li></ul></aside></li></ul></section>
|
|
211
215
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="size" class="tsd-anchor"></a>
|
|
212
216
|
<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>
|
|
213
217
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -216,7 +220,7 @@
|
|
|
216
220
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
|
|
217
221
|
<p>Inherited from BinaryTree.size</p>
|
|
218
222
|
<ul>
|
|
219
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
223
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L244">src/data-structures/binary-tree/binary-tree.ts:244</a></li></ul></aside></li></ul></section>
|
|
220
224
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="visitedCount" class="tsd-anchor"></a>
|
|
221
225
|
<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>
|
|
222
226
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -225,7 +229,7 @@
|
|
|
225
229
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources">
|
|
226
230
|
<p>Inherited from BinaryTree.visitedCount</p>
|
|
227
231
|
<ul>
|
|
228
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
232
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L208">src/data-structures/binary-tree/binary-tree.ts:208</a></li></ul></aside></li></ul></section>
|
|
229
233
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="visitedId" class="tsd-anchor"></a>
|
|
230
234
|
<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>
|
|
231
235
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -234,7 +238,7 @@
|
|
|
234
238
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources">
|
|
235
239
|
<p>Inherited from BinaryTree.visitedId</p>
|
|
236
240
|
<ul>
|
|
237
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
241
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L190">src/data-structures/binary-tree/binary-tree.ts:190</a></li></ul></aside></li></ul></section>
|
|
238
242
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="visitedLeftSum" class="tsd-anchor"></a>
|
|
239
243
|
<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>
|
|
240
244
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -243,25 +247,25 @@
|
|
|
243
247
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources">
|
|
244
248
|
<p>Inherited from BinaryTree.visitedLeftSum</p>
|
|
245
249
|
<ul>
|
|
246
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
250
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L214">src/data-structures/binary-tree/binary-tree.ts:214</a></li></ul></aside></li></ul></section>
|
|
247
251
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="visitedNode" class="tsd-anchor"></a>
|
|
248
252
|
<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>
|
|
249
253
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
250
|
-
<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><
|
|
254
|
+
<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>
|
|
251
255
|
<li class="tsd-description">
|
|
252
|
-
<h4 class="tsd-returns-title">Returns <
|
|
256
|
+
<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">
|
|
253
257
|
<p>Inherited from BinaryTree.visitedNode</p>
|
|
254
258
|
<ul>
|
|
255
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
259
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L202">src/data-structures/binary-tree/binary-tree.ts:202</a></li></ul></aside></li></ul></section>
|
|
256
260
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="visitedVal" class="tsd-anchor"></a>
|
|
257
261
|
<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>
|
|
258
262
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
259
|
-
<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">
|
|
263
|
+
<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>
|
|
260
264
|
<li class="tsd-description">
|
|
261
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">
|
|
265
|
+
<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">
|
|
262
266
|
<p>Inherited from BinaryTree.visitedVal</p>
|
|
263
267
|
<ul>
|
|
264
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
268
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L196">src/data-structures/binary-tree/binary-tree.ts:196</a></li></ul></aside></li></ul></section></section>
|
|
265
269
|
<section class="tsd-panel-group tsd-member-group">
|
|
266
270
|
<h2>Methods</h2>
|
|
267
271
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="BFS" class="tsd-anchor"></a>
|
|
@@ -272,12 +276,12 @@
|
|
|
272
276
|
<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
|
|
273
277
|
or property name.</p>
|
|
274
278
|
</div>
|
|
275
|
-
<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>ResultsByProperty<
|
|
279
|
+
<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>ResultsByProperty<N></code>.</p>
|
|
276
280
|
|
|
277
281
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
278
282
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#BFS">BFS</a></p>
|
|
279
283
|
<ul>
|
|
280
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
284
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L950">src/data-structures/binary-tree/binary-tree.ts:950</a></li></ul></aside></li>
|
|
281
285
|
<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>
|
|
282
286
|
<li class="tsd-description">
|
|
283
287
|
<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
|
|
@@ -294,13 +298,13 @@ performed starting from that node. If a property name is provided, the breadth-f
|
|
|
294
298
|
performed starting from the root node</p>
|
|
295
299
|
</div>
|
|
296
300
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
297
|
-
<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>ResultsByProperty<
|
|
301
|
+
<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>ResultsByProperty<N></code>.</p>
|
|
298
302
|
|
|
299
303
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
300
304
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#BFS">BFS</a></p>
|
|
301
305
|
<ul>
|
|
302
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
303
|
-
<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">
|
|
306
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L952">src/data-structures/binary-tree/binary-tree.ts:952</a></li></ul></aside></li>
|
|
307
|
+
<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>
|
|
304
308
|
<li class="tsd-description">
|
|
305
309
|
<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
|
|
306
310
|
or property name.</p>
|
|
@@ -316,13 +320,13 @@ performed starting from that node. If a property name is provided, the breadth-f
|
|
|
316
320
|
performed starting from the root node</p>
|
|
317
321
|
</div>
|
|
318
322
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
319
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">
|
|
323
|
+
<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>ResultsByProperty<N></code>.</p>
|
|
320
324
|
|
|
321
325
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
322
326
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#BFS">BFS</a></p>
|
|
323
327
|
<ul>
|
|
324
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
325
|
-
<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><
|
|
328
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L954">src/data-structures/binary-tree/binary-tree.ts:954</a></li></ul></aside></li>
|
|
329
|
+
<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>
|
|
326
330
|
<li class="tsd-description">
|
|
327
331
|
<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
|
|
328
332
|
or property name.</p>
|
|
@@ -338,12 +342,12 @@ performed starting from that node. If a property name is provided, the breadth-f
|
|
|
338
342
|
performed starting from the root node</p>
|
|
339
343
|
</div>
|
|
340
344
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
341
|
-
<h4 class="tsd-returns-title">Returns <
|
|
345
|
+
<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>ResultsByProperty<N></code>.</p>
|
|
342
346
|
|
|
343
347
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
344
348
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#BFS">BFS</a></p>
|
|
345
349
|
<ul>
|
|
346
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
350
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L956">src/data-structures/binary-tree/binary-tree.ts:956</a></li></ul></aside></li>
|
|
347
351
|
<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>
|
|
348
352
|
<li class="tsd-description">
|
|
349
353
|
<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
|
|
@@ -360,12 +364,12 @@ performed starting from that node. If a property name is provided, the breadth-f
|
|
|
360
364
|
performed starting from the root node</p>
|
|
361
365
|
</div>
|
|
362
366
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
363
|
-
<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>ResultsByProperty<
|
|
367
|
+
<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>ResultsByProperty<N></code>.</p>
|
|
364
368
|
|
|
365
369
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
366
370
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#BFS">BFS</a></p>
|
|
367
371
|
<ul>
|
|
368
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
372
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L958">src/data-structures/binary-tree/binary-tree.ts:958</a></li></ul></aside></li></ul></section>
|
|
369
373
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="DFS" class="tsd-anchor"></a>
|
|
370
374
|
<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>
|
|
371
375
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -374,12 +378,12 @@ performed starting from the root node</p>
|
|
|
374
378
|
<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
|
|
375
379
|
specified pattern and node or property name.</p>
|
|
376
380
|
</div>
|
|
377
|
-
<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>ResultsByProperty<
|
|
381
|
+
<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>ResultsByProperty<N></code>.</p>
|
|
378
382
|
|
|
379
383
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
380
384
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#DFS">DFS</a></p>
|
|
381
385
|
<ul>
|
|
382
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
386
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L986">src/data-structures/binary-tree/binary-tree.ts:986</a></li></ul></aside></li>
|
|
383
387
|
<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>
|
|
384
388
|
<li class="tsd-description">
|
|
385
389
|
<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
|
|
@@ -403,13 +407,13 @@ either the name of a property in the <code>BinaryTreeNode</code> object or the v
|
|
|
403
407
|
no value</p>
|
|
404
408
|
</div>
|
|
405
409
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
406
|
-
<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>ResultsByProperty<
|
|
410
|
+
<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>ResultsByProperty<N></code>.</p>
|
|
407
411
|
|
|
408
412
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
409
413
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#DFS">DFS</a></p>
|
|
410
414
|
<ul>
|
|
411
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
412
|
-
<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">
|
|
415
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L988">src/data-structures/binary-tree/binary-tree.ts:988</a></li></ul></aside></li>
|
|
416
|
+
<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>
|
|
413
417
|
<li class="tsd-description">
|
|
414
418
|
<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
|
|
415
419
|
specified pattern and node or property name.</p>
|
|
@@ -432,13 +436,13 @@ either the name of a property in the <code>BinaryTreeNode</code> object or the v
|
|
|
432
436
|
no value</p>
|
|
433
437
|
</div>
|
|
434
438
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
435
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">
|
|
439
|
+
<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>ResultsByProperty<N></code>.</p>
|
|
436
440
|
|
|
437
441
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
438
442
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#DFS">DFS</a></p>
|
|
439
443
|
<ul>
|
|
440
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
441
|
-
<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><
|
|
444
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L990">src/data-structures/binary-tree/binary-tree.ts:990</a></li></ul></aside></li>
|
|
445
|
+
<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>
|
|
442
446
|
<li class="tsd-description">
|
|
443
447
|
<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
|
|
444
448
|
specified pattern and node or property name.</p>
|
|
@@ -461,12 +465,12 @@ either the name of a property in the <code>BinaryTreeNode</code> object or the v
|
|
|
461
465
|
no value</p>
|
|
462
466
|
</div>
|
|
463
467
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
464
|
-
<h4 class="tsd-returns-title">Returns <
|
|
468
|
+
<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>ResultsByProperty<N></code>.</p>
|
|
465
469
|
|
|
466
470
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
467
471
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#DFS">DFS</a></p>
|
|
468
472
|
<ul>
|
|
469
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
473
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L992">src/data-structures/binary-tree/binary-tree.ts:992</a></li></ul></aside></li>
|
|
470
474
|
<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>
|
|
471
475
|
<li class="tsd-description">
|
|
472
476
|
<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
|
|
@@ -490,12 +494,12 @@ either the name of a property in the <code>BinaryTreeNode</code> object or the v
|
|
|
490
494
|
no value</p>
|
|
491
495
|
</div>
|
|
492
496
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
493
|
-
<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>ResultsByProperty<
|
|
497
|
+
<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>ResultsByProperty<N></code>.</p>
|
|
494
498
|
|
|
495
499
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
496
500
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#DFS">DFS</a></p>
|
|
497
501
|
<ul>
|
|
498
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
502
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L994">src/data-structures/binary-tree/binary-tree.ts:994</a></li></ul></aside></li></ul></section>
|
|
499
503
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="DFSIterative" class="tsd-anchor"></a>
|
|
500
504
|
<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>
|
|
501
505
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -508,7 +512,7 @@ Space complexity of Iterative DFS equals to recursive DFS which is O(n) because
|
|
|
508
512
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
509
513
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#DFSIterative">DFSIterative</a></p>
|
|
510
514
|
<ul>
|
|
511
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
515
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1036">src/data-structures/binary-tree/binary-tree.ts:1036</a></li></ul></aside></li>
|
|
512
516
|
<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>
|
|
513
517
|
<li class="tsd-description">
|
|
514
518
|
<div class="tsd-comment tsd-typography"><p>Time complexity is O(n)
|
|
@@ -527,8 +531,8 @@ Space complexity of Iterative DFS equals to recursive DFS which is O(n) because
|
|
|
527
531
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
528
532
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#DFSIterative">DFSIterative</a></p>
|
|
529
533
|
<ul>
|
|
530
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
531
|
-
<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">
|
|
534
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1038">src/data-structures/binary-tree/binary-tree.ts:1038</a></li></ul></aside></li>
|
|
535
|
+
<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>
|
|
532
536
|
<li class="tsd-description">
|
|
533
537
|
<div class="tsd-comment tsd-typography"><p>Time complexity is O(n)
|
|
534
538
|
Space complexity of Iterative DFS equals to recursive DFS which is O(n) because of the stack</p>
|
|
@@ -542,12 +546,12 @@ Space complexity of Iterative DFS equals to recursive DFS which is O(n) because
|
|
|
542
546
|
<li>
|
|
543
547
|
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">nodeOrPropertyName</span>: <span class="tsd-signature-type">"val"</span></h5>
|
|
544
548
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
545
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">
|
|
549
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4>
|
|
546
550
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
547
551
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#DFSIterative">DFSIterative</a></p>
|
|
548
552
|
<ul>
|
|
549
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
550
|
-
<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><
|
|
553
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1040">src/data-structures/binary-tree/binary-tree.ts:1040</a></li></ul></aside></li>
|
|
554
|
+
<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>
|
|
551
555
|
<li class="tsd-description">
|
|
552
556
|
<div class="tsd-comment tsd-typography"><p>Time complexity is O(n)
|
|
553
557
|
Space complexity of Iterative DFS equals to recursive DFS which is O(n) because of the stack</p>
|
|
@@ -561,11 +565,11 @@ Space complexity of Iterative DFS equals to recursive DFS which is O(n) because
|
|
|
561
565
|
<li>
|
|
562
566
|
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">nodeOrPropertyName</span>: <span class="tsd-signature-type">"node"</span></h5>
|
|
563
567
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
564
|
-
<h4 class="tsd-returns-title">Returns <
|
|
568
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4>
|
|
565
569
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
566
570
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#DFSIterative">DFSIterative</a></p>
|
|
567
571
|
<ul>
|
|
568
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
572
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1042">src/data-structures/binary-tree/binary-tree.ts:1042</a></li></ul></aside></li>
|
|
569
573
|
<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>
|
|
570
574
|
<li class="tsd-description">
|
|
571
575
|
<div class="tsd-comment tsd-typography"><p>Time complexity is O(n)
|
|
@@ -584,7 +588,7 @@ Space complexity of Iterative DFS equals to recursive DFS which is O(n) because
|
|
|
584
588
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
585
589
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#DFSIterative">DFSIterative</a></p>
|
|
586
590
|
<ul>
|
|
587
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
591
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1044">src/data-structures/binary-tree/binary-tree.ts:1044</a></li></ul></aside></li></ul></section>
|
|
588
592
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_accumulatedByPropertyName" class="tsd-anchor"></a>
|
|
589
593
|
<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>
|
|
590
594
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -597,8 +601,8 @@ provided property name or a default property name.</p>
|
|
|
597
601
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
598
602
|
<ul class="tsd-parameter-list">
|
|
599
603
|
<li>
|
|
600
|
-
<h5><span class="tsd-kind-parameter">node</span>: <
|
|
601
|
-
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is of type <code>
|
|
604
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
605
|
+
<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>
|
|
602
606
|
</div>
|
|
603
607
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
604
608
|
<li>
|
|
@@ -612,7 +616,7 @@ the property name of the node that should be accumulated. If it is a node object
|
|
|
612
616
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
613
617
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#_accumulatedByPropertyName">_accumulatedByPropertyName</a></p>
|
|
614
618
|
<ul>
|
|
615
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
619
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1456">src/data-structures/binary-tree/binary-tree.ts:1456</a></li></ul></aside></li></ul></section>
|
|
616
620
|
<section class="tsd-panel tsd-member tsd-is-protected"><a id="_compare" class="tsd-anchor"></a>
|
|
617
621
|
<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>
|
|
618
622
|
<ul class="tsd-signatures tsd-is-protected">
|
|
@@ -639,11 +643,47 @@ than), or CP.eq (equal).</p>
|
|
|
639
643
|
|
|
640
644
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
641
645
|
<ul>
|
|
642
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
646
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/bst.ts#L495">src/data-structures/binary-tree/bst.ts:495</a></li></ul></aside></li></ul></section>
|
|
647
|
+
<section class="tsd-panel tsd-member"><a id="_createNode" class="tsd-anchor"></a>
|
|
648
|
+
<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>
|
|
649
|
+
<ul class="tsd-signatures">
|
|
650
|
+
<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">null</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>
|
|
651
|
+
<li class="tsd-description">
|
|
652
|
+
<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
|
|
653
|
+
it returns null.</p>
|
|
654
|
+
</div>
|
|
655
|
+
<div class="tsd-parameters">
|
|
656
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
657
|
+
<ul class="tsd-parameter-list">
|
|
658
|
+
<li>
|
|
659
|
+
<h5><span class="tsd-kind-parameter">id</span>: <span class="tsd-signature-type">number</span></h5>
|
|
660
|
+
<div class="tsd-comment tsd-typography"><p>The <code>id</code> parameter is the identifier for the binary tree node. It is of type
|
|
661
|
+
<code>BinaryTreeNodeId</code>.</p>
|
|
662
|
+
</div>
|
|
663
|
+
<div class="tsd-comment tsd-typography"></div></li>
|
|
664
|
+
<li>
|
|
665
|
+
<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>
|
|
666
|
+
<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)
|
|
667
|
+
or <code>null</code>.</p>
|
|
668
|
+
</div>
|
|
669
|
+
<div class="tsd-comment tsd-typography"></div></li>
|
|
670
|
+
<li>
|
|
671
|
+
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">count</span>: <span class="tsd-signature-type">number</span></h5>
|
|
672
|
+
<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
|
|
673
|
+
of occurrences of the value in the binary tree node. If not provided, the default value is <code>undefined</code>.</p>
|
|
674
|
+
</div>
|
|
675
|
+
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
676
|
+
<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>a BinaryTreeNode object if the value is not null, otherwise it returns null.</p>
|
|
677
|
+
|
|
678
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
679
|
+
<p>Implementation of <a href="../interfaces/IBinaryTree.html">IBinaryTree</a>.<a href="../interfaces/IBinaryTree.html#_createNode">_createNode</a></p>
|
|
680
|
+
<p>Overrides <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#_createNode">_createNode</a></p>
|
|
681
|
+
<ul>
|
|
682
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/bst.ts#L42">src/data-structures/binary-tree/bst.ts:42</a></li></ul></aside></li></ul></section>
|
|
643
683
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_getResultByPropertyName" class="tsd-anchor"></a>
|
|
644
684
|
<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>
|
|
645
685
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
646
|
-
<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/ResultsByProperty.html" class="tsd-signature-type tsd-kind-type-alias">ResultsByProperty</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
686
|
+
<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/ResultsByProperty.html" class="tsd-signature-type tsd-kind-type-alias">ResultsByProperty</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>
|
|
647
687
|
<li class="tsd-description">
|
|
648
688
|
<div class="tsd-comment tsd-typography"><p>The function <code>_getResultByPropertyName</code> returns different results based on the provided property name or defaulting
|
|
649
689
|
to 'id'.</p>
|
|
@@ -657,12 +697,12 @@ to 'id'.</p>
|
|
|
657
697
|
can accept a value of type <code>NodeOrPropertyName</code>.</p>
|
|
658
698
|
</div>
|
|
659
699
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
660
|
-
<h4 class="tsd-returns-title">Returns <a href="../types/ResultsByProperty.html" class="tsd-signature-type tsd-kind-type-alias">ResultsByProperty</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
700
|
+
<h4 class="tsd-returns-title">Returns <a href="../types/ResultsByProperty.html" class="tsd-signature-type tsd-kind-type-alias">ResultsByProperty</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>ResultsByProperty<T></code>.</p>
|
|
661
701
|
|
|
662
702
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
663
703
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#_getResultByPropertyName">_getResultByPropertyName</a></p>
|
|
664
704
|
<ul>
|
|
665
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
705
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1485">src/data-structures/binary-tree/binary-tree.ts:1485</a></li></ul></aside></li></ul></section>
|
|
666
706
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_pushByPropertyNameStopOrNot" class="tsd-anchor"></a>
|
|
667
707
|
<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>
|
|
668
708
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -675,18 +715,18 @@ a result array.</p>
|
|
|
675
715
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
676
716
|
<ul class="tsd-parameter-list">
|
|
677
717
|
<li>
|
|
678
|
-
<h5><span class="tsd-kind-parameter">cur</span>: <
|
|
718
|
+
<h5><span class="tsd-kind-parameter">cur</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
679
719
|
<div class="tsd-comment tsd-typography"><p>The current binary tree node that is being checked.</p>
|
|
680
720
|
</div>
|
|
681
721
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
682
722
|
<li>
|
|
683
|
-
<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><
|
|
723
|
+
<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>
|
|
684
724
|
<div class="tsd-comment tsd-typography"><p>An array that stores the matching nodes found during the
|
|
685
725
|
traversal.</p>
|
|
686
726
|
</div>
|
|
687
727
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
688
728
|
<li>
|
|
689
|
-
<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">
|
|
729
|
+
<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>
|
|
690
730
|
<div class="tsd-comment tsd-typography"><p>The <code>nodeProperty</code> parameter is the value that we are searching for in
|
|
691
731
|
the binary tree nodes. It can be either the <code>id</code>, <code>count</code>, or <code>val</code> property of the node.</p>
|
|
692
732
|
</div>
|
|
@@ -710,7 +750,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
710
750
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
711
751
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#_pushByPropertyNameStopOrNot">_pushByPropertyNameStopOrNot</a></p>
|
|
712
752
|
<ul>
|
|
713
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
753
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1419">src/data-structures/binary-tree/binary-tree.ts:1419</a></li></ul></aside></li></ul></section>
|
|
714
754
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_resetResults" class="tsd-anchor"></a>
|
|
715
755
|
<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>
|
|
716
756
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -722,7 +762,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
722
762
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
723
763
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#_resetResults">_resetResults</a></p>
|
|
724
764
|
<ul>
|
|
725
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
765
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1395">src/data-structures/binary-tree/binary-tree.ts:1395</a></li></ul></aside></li></ul></section>
|
|
726
766
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setAutoIncrementId" class="tsd-anchor"></a>
|
|
727
767
|
<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>
|
|
728
768
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -736,7 +776,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
736
776
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
737
777
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#_setAutoIncrementId">_setAutoIncrementId</a></p>
|
|
738
778
|
<ul>
|
|
739
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
779
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1364">src/data-structures/binary-tree/binary-tree.ts:1364</a></li></ul></aside></li></ul></section>
|
|
740
780
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setCount" class="tsd-anchor"></a>
|
|
741
781
|
<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>
|
|
742
782
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -750,7 +790,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
750
790
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
751
791
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#_setCount">_setCount</a></p>
|
|
752
792
|
<ul>
|
|
753
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
793
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1388">src/data-structures/binary-tree/binary-tree.ts:1388</a></li></ul></aside></li></ul></section>
|
|
754
794
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setIsDuplicatedVal" class="tsd-anchor"></a>
|
|
755
795
|
<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>
|
|
756
796
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -764,7 +804,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
764
804
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
765
805
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#_setIsDuplicatedVal">_setIsDuplicatedVal</a></p>
|
|
766
806
|
<ul>
|
|
767
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
807
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1372">src/data-structures/binary-tree/binary-tree.ts:1372</a></li></ul></aside></li></ul></section>
|
|
768
808
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setLoopType" class="tsd-anchor"></a>
|
|
769
809
|
<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>
|
|
770
810
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -778,7 +818,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
778
818
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
779
819
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#_setLoopType">_setLoopType</a></p>
|
|
780
820
|
<ul>
|
|
781
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
821
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1340">src/data-structures/binary-tree/binary-tree.ts:1340</a></li></ul></aside></li></ul></section>
|
|
782
822
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setMaxId" class="tsd-anchor"></a>
|
|
783
823
|
<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>
|
|
784
824
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -792,7 +832,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
792
832
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
793
833
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#_setMaxId">_setMaxId</a></p>
|
|
794
834
|
<ul>
|
|
795
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
835
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1368">src/data-structures/binary-tree/binary-tree.ts:1368</a></li></ul></aside></li></ul></section>
|
|
796
836
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setRoot" class="tsd-anchor"></a>
|
|
797
837
|
<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>
|
|
798
838
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -802,11 +842,11 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
802
842
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
803
843
|
<ul class="tsd-parameter-list">
|
|
804
844
|
<li>
|
|
805
|
-
<h5><span class="tsd-kind-parameter">v</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
845
|
+
<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>
|
|
806
846
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
807
847
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#_setRoot">_setRoot</a></p>
|
|
808
848
|
<ul>
|
|
809
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
849
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1376">src/data-structures/binary-tree/binary-tree.ts:1376</a></li></ul></aside></li></ul></section>
|
|
810
850
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setSize" class="tsd-anchor"></a>
|
|
811
851
|
<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>
|
|
812
852
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -820,7 +860,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
820
860
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
821
861
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#_setSize">_setSize</a></p>
|
|
822
862
|
<ul>
|
|
823
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
863
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1384">src/data-structures/binary-tree/binary-tree.ts:1384</a></li></ul></aside></li></ul></section>
|
|
824
864
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setVisitedId" class="tsd-anchor"></a>
|
|
825
865
|
<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>
|
|
826
866
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -834,7 +874,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
834
874
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
835
875
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#_setVisitedId">_setVisitedId</a></p>
|
|
836
876
|
<ul>
|
|
837
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
877
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1344">src/data-structures/binary-tree/binary-tree.ts:1344</a></li></ul></aside></li></ul></section>
|
|
838
878
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setVisitedLeftSum" class="tsd-anchor"></a>
|
|
839
879
|
<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>
|
|
840
880
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -848,7 +888,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
848
888
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
849
889
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#_setVisitedLeftSum">_setVisitedLeftSum</a></p>
|
|
850
890
|
<ul>
|
|
851
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
891
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1360">src/data-structures/binary-tree/binary-tree.ts:1360</a></li></ul></aside></li></ul></section>
|
|
852
892
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setVisitedNode" class="tsd-anchor"></a>
|
|
853
893
|
<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>
|
|
854
894
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -858,11 +898,11 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
858
898
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
859
899
|
<ul class="tsd-parameter-list">
|
|
860
900
|
<li>
|
|
861
|
-
<h5><span class="tsd-kind-parameter">value</span>: <
|
|
901
|
+
<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>
|
|
862
902
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
863
903
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#_setVisitedNode">_setVisitedNode</a></p>
|
|
864
904
|
<ul>
|
|
865
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
905
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1352">src/data-structures/binary-tree/binary-tree.ts:1352</a></li></ul></aside></li></ul></section>
|
|
866
906
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setVisitedVal" class="tsd-anchor"></a>
|
|
867
907
|
<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>
|
|
868
908
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -872,15 +912,15 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
872
912
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
873
913
|
<ul class="tsd-parameter-list">
|
|
874
914
|
<li>
|
|
875
|
-
<h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type tsd-kind-type-parameter">
|
|
915
|
+
<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>
|
|
876
916
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
877
917
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#_setVisitedVal">_setVisitedVal</a></p>
|
|
878
918
|
<ul>
|
|
879
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
919
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1348">src/data-structures/binary-tree/binary-tree.ts:1348</a></li></ul></aside></li></ul></section>
|
|
880
920
|
<section class="tsd-panel tsd-member"><a id="add" class="tsd-anchor"></a>
|
|
881
921
|
<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>
|
|
882
922
|
<ul class="tsd-signatures">
|
|
883
|
-
<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><
|
|
923
|
+
<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>
|
|
884
924
|
<li class="tsd-description">
|
|
885
925
|
<div class="tsd-comment tsd-typography"><p>The <code>add</code> function inserts a new node into a binary search tree, updating the count and value of an existing node if
|
|
886
926
|
the ID matches, and returns the inserted node.</p>
|
|
@@ -895,9 +935,9 @@ determine the position of the node in the binary search tree.</p>
|
|
|
895
935
|
</div>
|
|
896
936
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
897
937
|
<li>
|
|
898
|
-
<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">
|
|
938
|
+
<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>
|
|
899
939
|
<div class="tsd-comment tsd-typography"><p>The <code>val</code> parameter represents the value to be stored in the binary search tree node. It can
|
|
900
|
-
be of type <code>
|
|
940
|
+
be of type <code>N</code> (the generic type) or <code>null</code>.</p>
|
|
901
941
|
</div>
|
|
902
942
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
903
943
|
<li>
|
|
@@ -907,16 +947,16 @@ the binary search tree. By default, it is set to 1, meaning that if no count is
|
|
|
907
947
|
inserted once.</p>
|
|
908
948
|
</div>
|
|
909
949
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
910
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
950
|
+
<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 <code>add</code> returns a <code>N</code> object or <code>null</code>.</p>
|
|
911
951
|
|
|
912
952
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
913
953
|
<p>Overrides <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#add">add</a></p>
|
|
914
954
|
<ul>
|
|
915
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
955
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/bst.ts#L59">src/data-structures/binary-tree/bst.ts:59</a></li></ul></aside></li></ul></section>
|
|
916
956
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="addMany" class="tsd-anchor"></a>
|
|
917
957
|
<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>
|
|
918
958
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
919
|
-
<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><
|
|
959
|
+
<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>
|
|
920
960
|
<li class="tsd-description">
|
|
921
961
|
<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
|
|
922
962
|
null/undefined values.</p>
|
|
@@ -925,21 +965,21 @@ null/undefined values.</p>
|
|
|
925
965
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
926
966
|
<ul class="tsd-parameter-list">
|
|
927
967
|
<li>
|
|
928
|
-
<h5><span class="tsd-kind-parameter">data</span>: <
|
|
929
|
-
<div class="tsd-comment tsd-typography"><p>The <code>data</code> parameter can be either an array of elements of type <code>
|
|
930
|
-
array of <code>
|
|
968
|
+
<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>
|
|
969
|
+
<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
|
|
970
|
+
array of <code>N</code> objects.</p>
|
|
931
971
|
</div>
|
|
932
972
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
933
|
-
<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><
|
|
973
|
+
<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>
|
|
934
974
|
|
|
935
975
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
936
976
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#addMany">addMany</a></p>
|
|
937
977
|
<ul>
|
|
938
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
978
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L389">src/data-structures/binary-tree/binary-tree.ts:389</a></li></ul></aside></li></ul></section>
|
|
939
979
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="addTo" class="tsd-anchor"></a>
|
|
940
980
|
<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>
|
|
941
981
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
942
|
-
<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><
|
|
982
|
+
<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>
|
|
943
983
|
<li class="tsd-description">
|
|
944
984
|
<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>
|
|
945
985
|
</div>
|
|
@@ -947,23 +987,23 @@ array of <code>BinaryTreeNode<T></code> objects.</p>
|
|
|
947
987
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
948
988
|
<ul class="tsd-parameter-list">
|
|
949
989
|
<li>
|
|
950
|
-
<h5><span class="tsd-kind-parameter">newNode</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
990
|
+
<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>
|
|
951
991
|
<div class="tsd-comment tsd-typography"><p>The <code>newNode</code> parameter is an instance of the <code>BinaryTreeNode</code> class or
|
|
952
992
|
<code>null</code>. It represents the node that needs to be inserted into the binary tree.</p>
|
|
953
993
|
</div>
|
|
954
994
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
955
995
|
<li>
|
|
956
|
-
<h5><span class="tsd-kind-parameter">parent</span>: <
|
|
996
|
+
<h5><span class="tsd-kind-parameter">parent</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
957
997
|
<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
|
|
958
998
|
will be inserted as a child.</p>
|
|
959
999
|
</div>
|
|
960
1000
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
961
|
-
<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><
|
|
1001
|
+
<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>
|
|
962
1002
|
|
|
963
1003
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
964
1004
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#addTo">addTo</a></p>
|
|
965
1005
|
<ul>
|
|
966
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1006
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L349">src/data-structures/binary-tree/binary-tree.ts:349</a></li></ul></aside></li></ul></section>
|
|
967
1007
|
<section class="tsd-panel tsd-member"><a id="allGreaterNodesAdd" class="tsd-anchor"></a>
|
|
968
1008
|
<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>
|
|
969
1009
|
<ul class="tsd-signatures">
|
|
@@ -976,8 +1016,8 @@ that have a greater value than a given node.</p>
|
|
|
976
1016
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
977
1017
|
<ul class="tsd-parameter-list">
|
|
978
1018
|
<li>
|
|
979
|
-
<h5><span class="tsd-kind-parameter">node</span>: <
|
|
980
|
-
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is of type <code>
|
|
1019
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1020
|
+
<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
|
|
981
1021
|
contains properties such as <code>id</code> and <code>count</code>.</p>
|
|
982
1022
|
</div>
|
|
983
1023
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
@@ -998,7 +1038,7 @@ defaults to 'id'.</p>
|
|
|
998
1038
|
|
|
999
1039
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1000
1040
|
<ul>
|
|
1001
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1041
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/bst.ts#L351">src/data-structures/binary-tree/bst.ts:351</a></li></ul></aside></li></ul></section>
|
|
1002
1042
|
<section class="tsd-panel tsd-member"><a id="balance" class="tsd-anchor"></a>
|
|
1003
1043
|
<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>
|
|
1004
1044
|
<ul class="tsd-signatures">
|
|
@@ -1011,7 +1051,7 @@ recursive or iterative approach.</p>
|
|
|
1011
1051
|
|
|
1012
1052
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1013
1053
|
<ul>
|
|
1014
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1054
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/bst.ts#L402">src/data-structures/binary-tree/bst.ts:402</a></li></ul></aside></li></ul></section>
|
|
1015
1055
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="clear" class="tsd-anchor"></a>
|
|
1016
1056
|
<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>
|
|
1017
1057
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1023,43 +1063,7 @@ recursive or iterative approach.</p>
|
|
|
1023
1063
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1024
1064
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#clear">clear</a></p>
|
|
1025
1065
|
<ul>
|
|
1026
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1027
|
-
<section class="tsd-panel tsd-member"><a id="createNode" class="tsd-anchor"></a>
|
|
1028
|
-
<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>
|
|
1029
|
-
<ul class="tsd-signatures">
|
|
1030
|
-
<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">null</span><span class="tsd-signature-symbol"> | </span><a href="BSTNode.html" class="tsd-signature-type tsd-kind-class">BSTNode</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>
|
|
1031
|
-
<li class="tsd-description">
|
|
1032
|
-
<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
|
|
1033
|
-
null.</p>
|
|
1034
|
-
</div>
|
|
1035
|
-
<div class="tsd-parameters">
|
|
1036
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1037
|
-
<ul class="tsd-parameter-list">
|
|
1038
|
-
<li>
|
|
1039
|
-
<h5><span class="tsd-kind-parameter">id</span>: <span class="tsd-signature-type">number</span></h5>
|
|
1040
|
-
<div class="tsd-comment tsd-typography"><p>The <code>id</code> parameter is the identifier for the binary tree node. It is of type
|
|
1041
|
-
<code>BinaryTreeNodeId</code>, which could be a string or a number, depending on how you want to identify your nodes.</p>
|
|
1042
|
-
</div>
|
|
1043
|
-
<div class="tsd-comment tsd-typography"></div></li>
|
|
1044
|
-
<li>
|
|
1045
|
-
<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">T</span></h5>
|
|
1046
|
-
<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
|
|
1047
|
-
any type <code>T</code> or <code>null</code>.</p>
|
|
1048
|
-
</div>
|
|
1049
|
-
<div class="tsd-comment tsd-typography"></div></li>
|
|
1050
|
-
<li>
|
|
1051
|
-
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">count</span>: <span class="tsd-signature-type">number</span></h5>
|
|
1052
|
-
<div class="tsd-comment tsd-typography"><p>The count parameter is an optional parameter that represents the number of occurrences of
|
|
1053
|
-
the value in the binary tree node. It is of type number.</p>
|
|
1054
|
-
</div>
|
|
1055
|
-
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1056
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="BSTNode.html" class="tsd-signature-type tsd-kind-class">BSTNode</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.
|
|
1057
|
-
Otherwise, it returns null.</p>
|
|
1058
|
-
|
|
1059
|
-
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1060
|
-
<p>Overrides <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#createNode">createNode</a></p>
|
|
1061
|
-
<ul>
|
|
1062
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c1b5969/src/data-structures/binary-tree/bst.ts#L37">src/data-structures/binary-tree/bst.ts:37</a></li></ul></aside></li></ul></section>
|
|
1066
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L273">src/data-structures/binary-tree/binary-tree.ts:273</a></li></ul></aside></li></ul></section>
|
|
1063
1067
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="fill" class="tsd-anchor"></a>
|
|
1064
1068
|
<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>
|
|
1065
1069
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1072,9 +1076,9 @@ was successful.</p>
|
|
|
1072
1076
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1073
1077
|
<ul class="tsd-parameter-list">
|
|
1074
1078
|
<li>
|
|
1075
|
-
<h5><span class="tsd-kind-parameter">data</span>: <
|
|
1076
|
-
<div class="tsd-comment tsd-typography"><p>The <code>data</code> parameter can be either an array of elements of type <code>
|
|
1077
|
-
array of <code>
|
|
1079
|
+
<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>
|
|
1080
|
+
<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
|
|
1081
|
+
array of <code>N</code> objects.</p>
|
|
1078
1082
|
</div>
|
|
1079
1083
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1080
1084
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>The method is returning a boolean value.</p>
|
|
@@ -1082,11 +1086,11 @@ array of <code>BinaryTreeNode<T></code> objects.</p>
|
|
|
1082
1086
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1083
1087
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#fill">fill</a></p>
|
|
1084
1088
|
<ul>
|
|
1085
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1089
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L436">src/data-structures/binary-tree/binary-tree.ts:436</a></li></ul></aside></li></ul></section>
|
|
1086
1090
|
<section class="tsd-panel tsd-member"><a id="get" class="tsd-anchor"></a>
|
|
1087
1091
|
<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>
|
|
1088
1092
|
<ul class="tsd-signatures">
|
|
1089
|
-
<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><
|
|
1093
|
+
<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>
|
|
1090
1094
|
<li class="tsd-description">
|
|
1091
1095
|
<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>
|
|
1092
1096
|
</div>
|
|
@@ -1094,9 +1098,9 @@ array of <code>BinaryTreeNode<T></code> objects.</p>
|
|
|
1094
1098
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1095
1099
|
<ul class="tsd-parameter-list">
|
|
1096
1100
|
<li>
|
|
1097
|
-
<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">
|
|
1101
|
+
<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>
|
|
1098
1102
|
<div class="tsd-comment tsd-typography"><p>The <code>nodeProperty</code> parameter can be either a <code>BinaryTreeNodeId</code> or a
|
|
1099
|
-
generic type <code>
|
|
1103
|
+
generic type <code>N</code>. It represents the value of the property that you want to search for in the binary search tree.</p>
|
|
1100
1104
|
</div>
|
|
1101
1105
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
1102
1106
|
<li>
|
|
@@ -1106,12 +1110,12 @@ specifies the property name to use for searching the binary search tree nodes. I
|
|
|
1106
1110
|
<code>'id'</code>.</p>
|
|
1107
1111
|
</div>
|
|
1108
1112
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1109
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1113
|
+
<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>
|
|
1110
1114
|
|
|
1111
1115
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1112
1116
|
<p>Overrides <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#get">get</a></p>
|
|
1113
1117
|
<ul>
|
|
1114
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1118
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/bst.ts#L133">src/data-structures/binary-tree/bst.ts:133</a></li></ul></aside></li></ul></section>
|
|
1115
1119
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getDepth" class="tsd-anchor"></a>
|
|
1116
1120
|
<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>
|
|
1117
1121
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1123,8 +1127,8 @@ specifies the property name to use for searching the binary search tree nodes. I
|
|
|
1123
1127
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1124
1128
|
<ul class="tsd-parameter-list">
|
|
1125
1129
|
<li>
|
|
1126
|
-
<h5><span class="tsd-kind-parameter">node</span>: <
|
|
1127
|
-
<div class="tsd-comment tsd-typography"><p>
|
|
1130
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1131
|
+
<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,
|
|
1128
1132
|
meaning it can represent any type of data that we want to store in the node.</p>
|
|
1129
1133
|
</div>
|
|
1130
1134
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
@@ -1133,7 +1137,7 @@ meaning it can represent any type of data that we want to store in the node.</p>
|
|
|
1133
1137
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1134
1138
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#getDepth">getDepth</a></p>
|
|
1135
1139
|
<ul>
|
|
1136
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1140
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L494">src/data-structures/binary-tree/binary-tree.ts:494</a></li></ul></aside></li></ul></section>
|
|
1137
1141
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getHeight" class="tsd-anchor"></a>
|
|
1138
1142
|
<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>
|
|
1139
1143
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1146,9 +1150,9 @@ approach.</p>
|
|
|
1146
1150
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1147
1151
|
<ul class="tsd-parameter-list">
|
|
1148
1152
|
<li>
|
|
1149
|
-
<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><
|
|
1153
|
+
<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>
|
|
1150
1154
|
<div class="tsd-comment tsd-typography"><p>The <code>beginRoot</code> parameter is an optional parameter of type
|
|
1151
|
-
<code>
|
|
1155
|
+
<code>N | null</code>. It represents the starting node from which to calculate the height of the binary tree.
|
|
1152
1156
|
If no value is provided for <code>beginRoot</code>, the function will use the <code>root</code> property of the class instance as</p>
|
|
1153
1157
|
</div>
|
|
1154
1158
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
@@ -1157,22 +1161,22 @@ If no value is provided for <code>beginRoot</code>, the function will use the <c
|
|
|
1157
1161
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1158
1162
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#getHeight">getHeight</a></p>
|
|
1159
1163
|
<ul>
|
|
1160
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1164
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L511">src/data-structures/binary-tree/binary-tree.ts:511</a></li></ul></aside></li></ul></section>
|
|
1161
1165
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getLeftMost" class="tsd-anchor"></a>
|
|
1162
1166
|
<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>
|
|
1163
1167
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
1164
|
-
<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><
|
|
1168
|
+
<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>
|
|
1165
1169
|
<li class="tsd-description">
|
|
1166
1170
|
<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
|
|
1167
1171
|
recursion optimization.</p>
|
|
1168
1172
|
</div>
|
|
1169
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1173
|
+
<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>
|
|
1170
1174
|
|
|
1171
1175
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1172
1176
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#getLeftMost">getLeftMost</a></p>
|
|
1173
1177
|
<ul>
|
|
1174
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1175
|
-
<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><
|
|
1178
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L698">src/data-structures/binary-tree/binary-tree.ts:698</a></li></ul></aside></li>
|
|
1179
|
+
<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>
|
|
1176
1180
|
<li class="tsd-description">
|
|
1177
1181
|
<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
|
|
1178
1182
|
recursion optimization.</p>
|
|
@@ -1181,17 +1185,17 @@ recursion optimization.</p>
|
|
|
1181
1185
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1182
1186
|
<ul class="tsd-parameter-list">
|
|
1183
1187
|
<li>
|
|
1184
|
-
<h5><span class="tsd-kind-parameter">node</span>: <
|
|
1185
|
-
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is an optional parameter of type <code>
|
|
1188
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1189
|
+
<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
|
|
1186
1190
|
provided, the function will use the root node of the binary tree.</p>
|
|
1187
1191
|
</div>
|
|
1188
1192
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1189
|
-
<h4 class="tsd-returns-title">Returns <
|
|
1193
|
+
<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>
|
|
1190
1194
|
|
|
1191
1195
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1192
1196
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#getLeftMost">getLeftMost</a></p>
|
|
1193
1197
|
<ul>
|
|
1194
|
-
<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/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L700">src/data-structures/binary-tree/binary-tree.ts:700</a></li></ul></aside></li></ul></section>
|
|
1195
1199
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getMinHeight" class="tsd-anchor"></a>
|
|
1196
1200
|
<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>
|
|
1197
1201
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1204,9 +1208,9 @@ approach.</p>
|
|
|
1204
1208
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1205
1209
|
<ul class="tsd-parameter-list">
|
|
1206
1210
|
<li>
|
|
1207
|
-
<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><
|
|
1211
|
+
<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>
|
|
1208
1212
|
<div class="tsd-comment tsd-typography"><p>The <code>beginRoot</code> parameter is an optional parameter of type
|
|
1209
|
-
<code>
|
|
1213
|
+
<code>N | null</code>. It represents the starting node from which to calculate the minimum height of the binary
|
|
1210
1214
|
tree. If no value is provided for <code>beginRoot</code>, the function will use the root node of the binary tree.</p>
|
|
1211
1215
|
</div>
|
|
1212
1216
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
@@ -1215,11 +1219,11 @@ tree. If no value is provided for <code>beginRoot</code>, the function will use
|
|
|
1215
1219
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1216
1220
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#getMinHeight">getMinHeight</a></p>
|
|
1217
1221
|
<ul>
|
|
1218
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1222
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L560">src/data-structures/binary-tree/binary-tree.ts:560</a></li></ul></aside></li></ul></section>
|
|
1219
1223
|
<section class="tsd-panel tsd-member"><a id="getNodes" class="tsd-anchor"></a>
|
|
1220
1224
|
<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>
|
|
1221
1225
|
<ul class="tsd-signatures">
|
|
1222
|
-
<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><
|
|
1226
|
+
<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>
|
|
1223
1227
|
<li class="tsd-description">
|
|
1224
1228
|
<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
|
|
1225
1229
|
option to specify the property name and whether to return only one node.</p>
|
|
@@ -1228,9 +1232,9 @@ option to specify the property name and whether to return only one node.</p>
|
|
|
1228
1232
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1229
1233
|
<ul class="tsd-parameter-list">
|
|
1230
1234
|
<li>
|
|
1231
|
-
<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">
|
|
1235
|
+
<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>
|
|
1232
1236
|
<div class="tsd-comment tsd-typography"><p>The <code>nodeProperty</code> parameter can be either a <code>BinaryTreeNodeId</code> or a
|
|
1233
|
-
generic type <code>
|
|
1237
|
+
generic type <code>N</code>. It represents the property value that you want to search for in the binary search tree.</p>
|
|
1234
1238
|
</div>
|
|
1235
1239
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
1236
1240
|
<li>
|
|
@@ -1247,16 +1251,16 @@ nodeProperty. If set to true, the function will stop traversing the tree and ret
|
|
|
1247
1251
|
to false or not provided, the function will return all nodes that match the given nodeProperty.</p>
|
|
1248
1252
|
</div>
|
|
1249
1253
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1250
|
-
<h4 class="tsd-returns-title">Returns <
|
|
1254
|
+
<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>
|
|
1251
1255
|
|
|
1252
1256
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1253
1257
|
<p>Overrides <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#getNodes">getNodes</a></p>
|
|
1254
1258
|
<ul>
|
|
1255
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1259
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/bst.ts#L223">src/data-structures/binary-tree/bst.ts:223</a></li></ul></aside></li></ul></section>
|
|
1256
1260
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getPathToRoot" class="tsd-anchor"></a>
|
|
1257
1261
|
<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>
|
|
1258
1262
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
1259
|
-
<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><
|
|
1263
|
+
<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>
|
|
1260
1264
|
<li class="tsd-description">
|
|
1261
1265
|
<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
|
|
1262
1266
|
root of a binary tree.</p>
|
|
@@ -1265,21 +1269,21 @@ root of a binary tree.</p>
|
|
|
1265
1269
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1266
1270
|
<ul class="tsd-parameter-list">
|
|
1267
1271
|
<li>
|
|
1268
|
-
<h5><span class="tsd-kind-parameter">node</span>: <
|
|
1272
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1269
1273
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object.</p>
|
|
1270
1274
|
</div>
|
|
1271
1275
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1272
|
-
<h4 class="tsd-returns-title">Returns <
|
|
1276
|
+
<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
|
|
1273
1277
|
the given <code>node</code> to the root of the binary tree.</p>
|
|
1274
1278
|
|
|
1275
1279
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1276
1280
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#getPathToRoot">getPathToRoot</a></p>
|
|
1277
1281
|
<ul>
|
|
1278
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1282
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L688">src/data-structures/binary-tree/binary-tree.ts:688</a></li></ul></aside></li></ul></section>
|
|
1279
1283
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getPredecessor" class="tsd-anchor"></a>
|
|
1280
1284
|
<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>
|
|
1281
1285
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
1282
|
-
<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><
|
|
1286
|
+
<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>
|
|
1283
1287
|
<li class="tsd-description">
|
|
1284
1288
|
<div class="tsd-comment tsd-typography"><p>The function returns the predecessor of a given node in a binary tree.</p>
|
|
1285
1289
|
</div>
|
|
@@ -1287,31 +1291,31 @@ the given <code>node</code> to the root of the binary tree.</p>
|
|
|
1287
1291
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1288
1292
|
<ul class="tsd-parameter-list">
|
|
1289
1293
|
<li>
|
|
1290
|
-
<h5><span class="tsd-kind-parameter">node</span>: <
|
|
1294
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1291
1295
|
<div class="tsd-comment tsd-typography"><p>The parameter <code>node</code> is a BinaryTreeNode object, representing a node in a binary tree.</p>
|
|
1292
1296
|
</div>
|
|
1293
1297
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1294
|
-
<h4 class="tsd-returns-title">Returns <
|
|
1298
|
+
<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>
|
|
1295
1299
|
|
|
1296
1300
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1297
1301
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#getPredecessor">getPredecessor</a></p>
|
|
1298
1302
|
<ul>
|
|
1299
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1303
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1218">src/data-structures/binary-tree/binary-tree.ts:1218</a></li></ul></aside></li></ul></section>
|
|
1300
1304
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getRightMost" class="tsd-anchor"></a>
|
|
1301
1305
|
<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>
|
|
1302
1306
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
1303
|
-
<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><
|
|
1307
|
+
<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>
|
|
1304
1308
|
<li class="tsd-description">
|
|
1305
1309
|
<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
|
|
1306
1310
|
tail recursion optimization.</p>
|
|
1307
1311
|
</div>
|
|
1308
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1312
|
+
<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>
|
|
1309
1313
|
|
|
1310
1314
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1311
1315
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#getRightMost">getRightMost</a></p>
|
|
1312
1316
|
<ul>
|
|
1313
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1314
|
-
<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><
|
|
1317
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L733">src/data-structures/binary-tree/binary-tree.ts:733</a></li></ul></aside></li>
|
|
1318
|
+
<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>
|
|
1315
1319
|
<li class="tsd-description">
|
|
1316
1320
|
<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
|
|
1317
1321
|
tail recursion optimization.</p>
|
|
@@ -1320,17 +1324,17 @@ tail recursion optimization.</p>
|
|
|
1320
1324
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1321
1325
|
<ul class="tsd-parameter-list">
|
|
1322
1326
|
<li>
|
|
1323
|
-
<h5><span class="tsd-kind-parameter">node</span>: <
|
|
1324
|
-
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is an optional parameter of type <code>
|
|
1327
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1328
|
+
<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
|
|
1325
1329
|
provided, the function will use the root node of the binary tree.</p>
|
|
1326
1330
|
</div>
|
|
1327
1331
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1328
|
-
<h4 class="tsd-returns-title">Returns <
|
|
1332
|
+
<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>
|
|
1329
1333
|
|
|
1330
1334
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1331
1335
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#getRightMost">getRightMost</a></p>
|
|
1332
1336
|
<ul>
|
|
1333
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1337
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L735">src/data-structures/binary-tree/binary-tree.ts:735</a></li></ul></aside></li></ul></section>
|
|
1334
1338
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getSubTreeSizeAndCount" class="tsd-anchor"></a>
|
|
1335
1339
|
<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>
|
|
1336
1340
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1343,7 +1347,7 @@ traversal.</p>
|
|
|
1343
1347
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1344
1348
|
<ul class="tsd-parameter-list">
|
|
1345
1349
|
<li>
|
|
1346
|
-
<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><
|
|
1350
|
+
<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>
|
|
1347
1351
|
<div class="tsd-comment tsd-typography"><p>The <code>subTreeRoot</code> parameter is the root node of a binary
|
|
1348
1352
|
tree.</p>
|
|
1349
1353
|
</div>
|
|
@@ -1354,7 +1358,7 @@ represents the size of the subtree, and the second element represents the count
|
|
|
1354
1358
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1355
1359
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#getSubTreeSizeAndCount">getSubTreeSizeAndCount</a></p>
|
|
1356
1360
|
<ul>
|
|
1357
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1361
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L812">src/data-structures/binary-tree/binary-tree.ts:812</a></li></ul></aside></li></ul></section>
|
|
1358
1362
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="has" class="tsd-anchor"></a>
|
|
1359
1363
|
<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>
|
|
1360
1364
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1367,9 +1371,9 @@ property.</p>
|
|
|
1367
1371
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1368
1372
|
<ul class="tsd-parameter-list">
|
|
1369
1373
|
<li>
|
|
1370
|
-
<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">
|
|
1374
|
+
<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>
|
|
1371
1375
|
<div class="tsd-comment tsd-typography"><p>The <code>nodeProperty</code> parameter can be either a <code>BinaryTreeNodeId</code> or a
|
|
1372
|
-
generic type <code>
|
|
1376
|
+
generic type <code>N</code>. It represents the property of a binary tree node that you want to check.</p>
|
|
1373
1377
|
</div>
|
|
1374
1378
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
1375
1379
|
<li>
|
|
@@ -1383,7 +1387,7 @@ specifies the name of the property to check for in the nodes.</p>
|
|
|
1383
1387
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1384
1388
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#has">has</a></p>
|
|
1385
1389
|
<ul>
|
|
1386
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1390
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L663">src/data-structures/binary-tree/binary-tree.ts:663</a></li></ul></aside></li></ul></section>
|
|
1387
1391
|
<section class="tsd-panel tsd-member"><a id="isAVLBalanced" class="tsd-anchor"></a>
|
|
1388
1392
|
<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>
|
|
1389
1393
|
<ul class="tsd-signatures">
|
|
@@ -1396,7 +1400,7 @@ is balanced according to the AVL tree property, and <code>false</code> otherwise
|
|
|
1396
1400
|
|
|
1397
1401
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1398
1402
|
<ul>
|
|
1399
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1403
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/bst.ts#L443">src/data-structures/binary-tree/bst.ts:443</a></li></ul></aside></li></ul></section>
|
|
1400
1404
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="isBST" class="tsd-anchor"></a>
|
|
1401
1405
|
<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>
|
|
1402
1406
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1408,8 +1412,8 @@ is balanced according to the AVL tree property, and <code>false</code> otherwise
|
|
|
1408
1412
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1409
1413
|
<ul class="tsd-parameter-list">
|
|
1410
1414
|
<li>
|
|
1411
|
-
<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><
|
|
1412
|
-
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is an optional parameter of type <code>
|
|
1415
|
+
<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>
|
|
1416
|
+
<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
|
|
1413
1417
|
is provided, the function will default to using the root node of the BST instance that</p>
|
|
1414
1418
|
</div>
|
|
1415
1419
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
@@ -1419,7 +1423,7 @@ tree, and <code>false</code> otherwise.</p>
|
|
|
1419
1423
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1420
1424
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#isBST">isBST</a></p>
|
|
1421
1425
|
<ul>
|
|
1422
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1426
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L775">src/data-structures/binary-tree/binary-tree.ts:775</a></li></ul></aside></li></ul></section>
|
|
1423
1427
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="isBalanced" class="tsd-anchor"></a>
|
|
1424
1428
|
<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>
|
|
1425
1429
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1431,9 +1435,9 @@ tree, and <code>false</code> otherwise.</p>
|
|
|
1431
1435
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1432
1436
|
<ul class="tsd-parameter-list">
|
|
1433
1437
|
<li>
|
|
1434
|
-
<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><
|
|
1438
|
+
<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>
|
|
1435
1439
|
<div class="tsd-comment tsd-typography"><p>The <code>beginRoot</code> parameter is the root node of a binary tree. It is
|
|
1436
|
-
of type <code>
|
|
1440
|
+
of type <code>N | null</code>, which means it can either be a <code>BinaryTreeNode</code> object or <code>null</code>.</p>
|
|
1437
1441
|
</div>
|
|
1438
1442
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1439
1443
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>The method is returning a boolean value.</p>
|
|
@@ -1441,7 +1445,7 @@ of type <code>BinaryTreeNode<T> | null</code>, which means it can either b
|
|
|
1441
1445
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1442
1446
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#isBalanced">isBalanced</a></p>
|
|
1443
1447
|
<ul>
|
|
1444
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1448
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L608">src/data-structures/binary-tree/binary-tree.ts:608</a></li></ul></aside></li></ul></section>
|
|
1445
1449
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="isEmpty" class="tsd-anchor"></a>
|
|
1446
1450
|
<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>
|
|
1447
1451
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1454,7 +1458,7 @@ of type <code>BinaryTreeNode<T> | null</code>, which means it can either b
|
|
|
1454
1458
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1455
1459
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#isEmpty">isEmpty</a></p>
|
|
1456
1460
|
<ul>
|
|
1457
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1461
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L284">src/data-structures/binary-tree/binary-tree.ts:284</a></li></ul></aside></li></ul></section>
|
|
1458
1462
|
<section class="tsd-panel tsd-member"><a id="lastKey" class="tsd-anchor"></a>
|
|
1459
1463
|
<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>
|
|
1460
1464
|
<ul class="tsd-signatures">
|
|
@@ -1470,7 +1474,7 @@ there are no nodes in</p>
|
|
|
1470
1474
|
|
|
1471
1475
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1472
1476
|
<ul>
|
|
1473
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1477
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/bst.ts#L146">src/data-structures/binary-tree/bst.ts:146</a></li></ul></aside></li></ul></section>
|
|
1474
1478
|
<section class="tsd-panel tsd-member"><a id="lesserSum" class="tsd-anchor"></a>
|
|
1475
1479
|
<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>
|
|
1476
1480
|
<ul class="tsd-signatures">
|
|
@@ -1499,7 +1503,7 @@ binary search tree that have a property value lesser than the given <code>id</co
|
|
|
1499
1503
|
|
|
1500
1504
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1501
1505
|
<ul>
|
|
1502
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1506
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/bst.ts#L274">src/data-structures/binary-tree/bst.ts:274</a></li></ul></aside></li></ul></section>
|
|
1503
1507
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="levelIterative" class="tsd-anchor"></a>
|
|
1504
1508
|
<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>
|
|
1505
1509
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1512,18 +1516,18 @@ in an array, based on a specified property name.</p>
|
|
|
1512
1516
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1513
1517
|
<ul class="tsd-parameter-list">
|
|
1514
1518
|
<li>
|
|
1515
|
-
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1519
|
+
<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>
|
|
1516
1520
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object representing the starting
|
|
1517
1521
|
node for the level order traversal. It can be null if no specific node is provided, in which case the root node of
|
|
1518
1522
|
the tree is used as the starting node.</p>
|
|
1519
1523
|
</div>
|
|
1520
1524
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1521
|
-
<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>ResultsByProperty<
|
|
1525
|
+
<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>ResultsByProperty<N></code>.</p>
|
|
1522
1526
|
|
|
1523
1527
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1524
1528
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#levelIterative">levelIterative</a></p>
|
|
1525
1529
|
<ul>
|
|
1526
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1530
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1095">src/data-structures/binary-tree/binary-tree.ts:1095</a></li></ul></aside></li>
|
|
1527
1531
|
<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>
|
|
1528
1532
|
<li class="tsd-description">
|
|
1529
1533
|
<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
|
|
@@ -1533,7 +1537,7 @@ in an array, based on a specified property name.</p>
|
|
|
1533
1537
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1534
1538
|
<ul class="tsd-parameter-list">
|
|
1535
1539
|
<li>
|
|
1536
|
-
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1540
|
+
<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>
|
|
1537
1541
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object representing the starting
|
|
1538
1542
|
node for the level order traversal. It can be null if no specific node is provided, in which case the root node of
|
|
1539
1543
|
the tree is used as the starting node.</p>
|
|
@@ -1547,13 +1551,13 @@ will accumulate results based on that property. If no property name is provided,
|
|
|
1547
1551
|
accumulating results</p>
|
|
1548
1552
|
</div>
|
|
1549
1553
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1550
|
-
<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>ResultsByProperty<
|
|
1554
|
+
<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>ResultsByProperty<N></code>.</p>
|
|
1551
1555
|
|
|
1552
1556
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1553
1557
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#levelIterative">levelIterative</a></p>
|
|
1554
1558
|
<ul>
|
|
1555
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1556
|
-
<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">
|
|
1559
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1097">src/data-structures/binary-tree/binary-tree.ts:1097</a></li></ul></aside></li>
|
|
1560
|
+
<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>
|
|
1557
1561
|
<li class="tsd-description">
|
|
1558
1562
|
<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
|
|
1559
1563
|
in an array, based on a specified property name.</p>
|
|
@@ -1562,7 +1566,7 @@ in an array, based on a specified property name.</p>
|
|
|
1562
1566
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1563
1567
|
<ul class="tsd-parameter-list">
|
|
1564
1568
|
<li>
|
|
1565
|
-
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1569
|
+
<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>
|
|
1566
1570
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object representing the starting
|
|
1567
1571
|
node for the level order traversal. It can be null if no specific node is provided, in which case the root node of
|
|
1568
1572
|
the tree is used as the starting node.</p>
|
|
@@ -1576,13 +1580,13 @@ will accumulate results based on that property. If no property name is provided,
|
|
|
1576
1580
|
accumulating results</p>
|
|
1577
1581
|
</div>
|
|
1578
1582
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1579
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">
|
|
1583
|
+
<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>ResultsByProperty<N></code>.</p>
|
|
1580
1584
|
|
|
1581
1585
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1582
1586
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#levelIterative">levelIterative</a></p>
|
|
1583
1587
|
<ul>
|
|
1584
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1585
|
-
<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><
|
|
1588
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1099">src/data-structures/binary-tree/binary-tree.ts:1099</a></li></ul></aside></li>
|
|
1589
|
+
<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>
|
|
1586
1590
|
<li class="tsd-description">
|
|
1587
1591
|
<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
|
|
1588
1592
|
in an array, based on a specified property name.</p>
|
|
@@ -1591,7 +1595,7 @@ in an array, based on a specified property name.</p>
|
|
|
1591
1595
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1592
1596
|
<ul class="tsd-parameter-list">
|
|
1593
1597
|
<li>
|
|
1594
|
-
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1598
|
+
<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>
|
|
1595
1599
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object representing the starting
|
|
1596
1600
|
node for the level order traversal. It can be null if no specific node is provided, in which case the root node of
|
|
1597
1601
|
the tree is used as the starting node.</p>
|
|
@@ -1605,12 +1609,12 @@ will accumulate results based on that property. If no property name is provided,
|
|
|
1605
1609
|
accumulating results</p>
|
|
1606
1610
|
</div>
|
|
1607
1611
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1608
|
-
<h4 class="tsd-returns-title">Returns <
|
|
1612
|
+
<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>ResultsByProperty<N></code>.</p>
|
|
1609
1613
|
|
|
1610
1614
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1611
1615
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#levelIterative">levelIterative</a></p>
|
|
1612
1616
|
<ul>
|
|
1613
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1617
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1101">src/data-structures/binary-tree/binary-tree.ts:1101</a></li></ul></aside></li>
|
|
1614
1618
|
<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>
|
|
1615
1619
|
<li class="tsd-description">
|
|
1616
1620
|
<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
|
|
@@ -1620,7 +1624,7 @@ in an array, based on a specified property name.</p>
|
|
|
1620
1624
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1621
1625
|
<ul class="tsd-parameter-list">
|
|
1622
1626
|
<li>
|
|
1623
|
-
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1627
|
+
<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>
|
|
1624
1628
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object representing the starting
|
|
1625
1629
|
node for the level order traversal. It can be null if no specific node is provided, in which case the root node of
|
|
1626
1630
|
the tree is used as the starting node.</p>
|
|
@@ -1634,12 +1638,12 @@ will accumulate results based on that property. If no property name is provided,
|
|
|
1634
1638
|
accumulating results</p>
|
|
1635
1639
|
</div>
|
|
1636
1640
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
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>ResultsByProperty<
|
|
1641
|
+
<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>ResultsByProperty<N></code>.</p>
|
|
1638
1642
|
|
|
1639
1643
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1640
1644
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#levelIterative">levelIterative</a></p>
|
|
1641
1645
|
<ul>
|
|
1642
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1646
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1103">src/data-structures/binary-tree/binary-tree.ts:1103</a></li></ul></aside></li></ul></section>
|
|
1643
1647
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="listLevels" class="tsd-anchor"></a>
|
|
1644
1648
|
<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>
|
|
1645
1649
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1651,17 +1655,17 @@ accumulating results</p>
|
|
|
1651
1655
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1652
1656
|
<ul class="tsd-parameter-list">
|
|
1653
1657
|
<li>
|
|
1654
|
-
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1658
|
+
<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>
|
|
1655
1659
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object or null. It represents the
|
|
1656
1660
|
root node of a binary tree. If it is null, the function will use the root node of the current binary tree instance.</p>
|
|
1657
1661
|
</div>
|
|
1658
1662
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1659
|
-
<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>ResultByProperty<
|
|
1663
|
+
<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>ResultByProperty<N></code> objects.</p>
|
|
1660
1664
|
|
|
1661
1665
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1662
1666
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#listLevels">listLevels</a></p>
|
|
1663
1667
|
<ul>
|
|
1664
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1668
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1141">src/data-structures/binary-tree/binary-tree.ts:1141</a></li></ul></aside></li>
|
|
1665
1669
|
<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>
|
|
1666
1670
|
<li class="tsd-description">
|
|
1667
1671
|
<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>
|
|
@@ -1670,7 +1674,7 @@ root node of a binary tree. If it is null, the function will use the root node o
|
|
|
1670
1674
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1671
1675
|
<ul class="tsd-parameter-list">
|
|
1672
1676
|
<li>
|
|
1673
|
-
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1677
|
+
<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>
|
|
1674
1678
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object or null. It represents the
|
|
1675
1679
|
root node of a binary tree. If it is null, the function will use the root node of the current binary tree instance.</p>
|
|
1676
1680
|
</div>
|
|
@@ -1682,13 +1686,13 @@ specifies the property of the <code>BinaryTreeNode</code> object to collect at e
|
|
|
1682
1686
|
values:</p>
|
|
1683
1687
|
</div>
|
|
1684
1688
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1685
|
-
<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>ResultByProperty<
|
|
1689
|
+
<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>ResultByProperty<N></code> objects.</p>
|
|
1686
1690
|
|
|
1687
1691
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1688
1692
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#listLevels">listLevels</a></p>
|
|
1689
1693
|
<ul>
|
|
1690
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1691
|
-
<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">
|
|
1694
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1143">src/data-structures/binary-tree/binary-tree.ts:1143</a></li></ul></aside></li>
|
|
1695
|
+
<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>
|
|
1692
1696
|
<li class="tsd-description">
|
|
1693
1697
|
<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>
|
|
1694
1698
|
</div>
|
|
@@ -1696,7 +1700,7 @@ values:</p>
|
|
|
1696
1700
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1697
1701
|
<ul class="tsd-parameter-list">
|
|
1698
1702
|
<li>
|
|
1699
|
-
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1703
|
+
<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>
|
|
1700
1704
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object or null. It represents the
|
|
1701
1705
|
root node of a binary tree. If it is null, the function will use the root node of the current binary tree instance.</p>
|
|
1702
1706
|
</div>
|
|
@@ -1708,13 +1712,13 @@ specifies the property of the <code>BinaryTreeNode</code> object to collect at e
|
|
|
1708
1712
|
values:</p>
|
|
1709
1713
|
</div>
|
|
1710
1714
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1711
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">
|
|
1715
|
+
<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>ResultByProperty<N></code> objects.</p>
|
|
1712
1716
|
|
|
1713
1717
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1714
1718
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#listLevels">listLevels</a></p>
|
|
1715
1719
|
<ul>
|
|
1716
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1717
|
-
<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><
|
|
1720
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1145">src/data-structures/binary-tree/binary-tree.ts:1145</a></li></ul></aside></li>
|
|
1721
|
+
<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>
|
|
1718
1722
|
<li class="tsd-description">
|
|
1719
1723
|
<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>
|
|
1720
1724
|
</div>
|
|
@@ -1722,7 +1726,7 @@ values:</p>
|
|
|
1722
1726
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1723
1727
|
<ul class="tsd-parameter-list">
|
|
1724
1728
|
<li>
|
|
1725
|
-
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1729
|
+
<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>
|
|
1726
1730
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object or null. It represents the
|
|
1727
1731
|
root node of a binary tree. If it is null, the function will use the root node of the current binary tree instance.</p>
|
|
1728
1732
|
</div>
|
|
@@ -1734,12 +1738,12 @@ specifies the property of the <code>BinaryTreeNode</code> object to collect at e
|
|
|
1734
1738
|
values:</p>
|
|
1735
1739
|
</div>
|
|
1736
1740
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1737
|
-
<h4 class="tsd-returns-title">Returns <
|
|
1741
|
+
<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>ResultByProperty<N></code> objects.</p>
|
|
1738
1742
|
|
|
1739
1743
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1740
1744
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#listLevels">listLevels</a></p>
|
|
1741
1745
|
<ul>
|
|
1742
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1746
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1147">src/data-structures/binary-tree/binary-tree.ts:1147</a></li></ul></aside></li>
|
|
1743
1747
|
<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>
|
|
1744
1748
|
<li class="tsd-description">
|
|
1745
1749
|
<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>
|
|
@@ -1748,7 +1752,7 @@ values:</p>
|
|
|
1748
1752
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1749
1753
|
<ul class="tsd-parameter-list">
|
|
1750
1754
|
<li>
|
|
1751
|
-
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1755
|
+
<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
1756
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object or null. It represents the
|
|
1753
1757
|
root node of a binary tree. If it is null, the function will use the root node of the current binary tree instance.</p>
|
|
1754
1758
|
</div>
|
|
@@ -1760,12 +1764,12 @@ specifies the property of the <code>BinaryTreeNode</code> object to collect at e
|
|
|
1760
1764
|
values:</p>
|
|
1761
1765
|
</div>
|
|
1762
1766
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1763
|
-
<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>ResultByProperty<
|
|
1767
|
+
<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>ResultByProperty<N></code> objects.</p>
|
|
1764
1768
|
|
|
1765
1769
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1766
1770
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#listLevels">listLevels</a></p>
|
|
1767
1771
|
<ul>
|
|
1768
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1772
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1149">src/data-structures/binary-tree/binary-tree.ts:1149</a></li></ul></aside></li></ul></section>
|
|
1769
1773
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="morris" class="tsd-anchor"></a>
|
|
1770
1774
|
<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>
|
|
1771
1775
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1776,12 +1780,12 @@ traversal algorithm and returns the results based on the specified property name
|
|
|
1776
1780
|
The time complexity of Morris traversal is O(n), it's may slower than others
|
|
1777
1781
|
The space complexity Morris traversal is O(1) because no using stack</p>
|
|
1778
1782
|
</div>
|
|
1779
|
-
<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>ResultsByProperty<
|
|
1783
|
+
<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>ResultsByProperty<N></code>.</p>
|
|
1780
1784
|
|
|
1781
1785
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1782
1786
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#morris">morris</a></p>
|
|
1783
1787
|
<ul>
|
|
1784
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1788
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1232">src/data-structures/binary-tree/binary-tree.ts:1232</a></li></ul></aside></li>
|
|
1785
1789
|
<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>
|
|
1786
1790
|
<li class="tsd-description">
|
|
1787
1791
|
<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
|
|
@@ -1805,13 +1809,13 @@ property of the nodes that you want to retrieve in the results. It can be either
|
|
|
1805
1809
|
property. If not provided, it defaults to <code>'id'</code>.</p>
|
|
1806
1810
|
</div>
|
|
1807
1811
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1808
|
-
<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>ResultsByProperty<
|
|
1812
|
+
<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>ResultsByProperty<N></code>.</p>
|
|
1809
1813
|
|
|
1810
1814
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1811
1815
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#morris">morris</a></p>
|
|
1812
1816
|
<ul>
|
|
1813
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1814
|
-
<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">
|
|
1817
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1234">src/data-structures/binary-tree/binary-tree.ts:1234</a></li></ul></aside></li>
|
|
1818
|
+
<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>
|
|
1815
1819
|
<li class="tsd-description">
|
|
1816
1820
|
<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
|
|
1817
1821
|
traversal algorithm and returns the results based on the specified property name.
|
|
@@ -1834,13 +1838,13 @@ property of the nodes that you want to retrieve in the results. It can be either
|
|
|
1834
1838
|
property. If not provided, it defaults to <code>'id'</code>.</p>
|
|
1835
1839
|
</div>
|
|
1836
1840
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1837
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">
|
|
1841
|
+
<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>ResultsByProperty<N></code>.</p>
|
|
1838
1842
|
|
|
1839
1843
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1840
1844
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#morris">morris</a></p>
|
|
1841
1845
|
<ul>
|
|
1842
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1843
|
-
<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><
|
|
1846
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1236">src/data-structures/binary-tree/binary-tree.ts:1236</a></li></ul></aside></li>
|
|
1847
|
+
<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>
|
|
1844
1848
|
<li class="tsd-description">
|
|
1845
1849
|
<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
|
|
1846
1850
|
traversal algorithm and returns the results based on the specified property name.
|
|
@@ -1863,12 +1867,12 @@ property of the nodes that you want to retrieve in the results. It can be either
|
|
|
1863
1867
|
property. If not provided, it defaults to <code>'id'</code>.</p>
|
|
1864
1868
|
</div>
|
|
1865
1869
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1866
|
-
<h4 class="tsd-returns-title">Returns <
|
|
1870
|
+
<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>ResultsByProperty<N></code>.</p>
|
|
1867
1871
|
|
|
1868
1872
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1869
1873
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#morris">morris</a></p>
|
|
1870
1874
|
<ul>
|
|
1871
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1875
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1238">src/data-structures/binary-tree/binary-tree.ts:1238</a></li></ul></aside></li>
|
|
1872
1876
|
<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>
|
|
1873
1877
|
<li class="tsd-description">
|
|
1874
1878
|
<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
|
|
@@ -1892,16 +1896,16 @@ property of the nodes that you want to retrieve in the results. It can be either
|
|
|
1892
1896
|
property. If not provided, it defaults to <code>'id'</code>.</p>
|
|
1893
1897
|
</div>
|
|
1894
1898
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
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>ResultsByProperty<
|
|
1899
|
+
<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>ResultsByProperty<N></code>.</p>
|
|
1896
1900
|
|
|
1897
1901
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1898
1902
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#morris">morris</a></p>
|
|
1899
1903
|
<ul>
|
|
1900
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1904
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1240">src/data-structures/binary-tree/binary-tree.ts:1240</a></li></ul></aside></li></ul></section>
|
|
1901
1905
|
<section class="tsd-panel tsd-member"><a id="remove" class="tsd-anchor"></a>
|
|
1902
1906
|
<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>
|
|
1903
1907
|
<ul class="tsd-signatures">
|
|
1904
|
-
<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">ignoreCount</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../types/BSTDeletedResult.html" class="tsd-signature-type tsd-kind-type-alias">BSTDeletedResult</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
1908
|
+
<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">ignoreCount</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../types/BSTDeletedResult.html" class="tsd-signature-type tsd-kind-type-alias">BSTDeletedResult</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>
|
|
1905
1909
|
<li class="tsd-description">
|
|
1906
1910
|
<div class="tsd-comment tsd-typography"><p>The <code>remove</code> function in this TypeScript code removes a node from a binary search tree and returns information about
|
|
1907
1911
|
the deleted node and any nodes that need to be balanced.</p>
|
|
@@ -1922,12 +1926,12 @@ set to true, the count of the node will not be considered and the node will be r
|
|
|
1922
1926
|
set to false or not provided, the count of the node will be taken into account and the</p>
|
|
1923
1927
|
</div>
|
|
1924
1928
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1925
|
-
<h4 class="tsd-returns-title">Returns <a href="../types/BSTDeletedResult.html" class="tsd-signature-type tsd-kind-type-alias">BSTDeletedResult</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
1929
|
+
<h4 class="tsd-returns-title">Returns <a href="../types/BSTDeletedResult.html" class="tsd-signature-type tsd-kind-type-alias">BSTDeletedResult</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>an array of <code>BSTDeletedResult<N></code> objects.</p>
|
|
1926
1930
|
|
|
1927
1931
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1928
1932
|
<p>Overrides <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#remove">remove</a></p>
|
|
1929
1933
|
<ul>
|
|
1930
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1934
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/bst.ts#L162">src/data-structures/binary-tree/bst.ts:162</a></li></ul></aside></li></ul></section>
|
|
1931
1935
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="setVisitedCount" class="tsd-anchor"></a>
|
|
1932
1936
|
<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>
|
|
1933
1937
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -1941,7 +1945,7 @@ set to false or not provided, the count of the node will be taken into account a
|
|
|
1941
1945
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
1942
1946
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#setVisitedCount">setVisitedCount</a></p>
|
|
1943
1947
|
<ul>
|
|
1944
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1948
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1356">src/data-structures/binary-tree/binary-tree.ts:1356</a></li></ul></aside></li></ul></section>
|
|
1945
1949
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="subTreeAdd" class="tsd-anchor"></a>
|
|
1946
1950
|
<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>
|
|
1947
1951
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1953,7 +1957,7 @@ set to false or not provided, the count of the node will be taken into account a
|
|
|
1953
1957
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1954
1958
|
<ul class="tsd-parameter-list">
|
|
1955
1959
|
<li>
|
|
1956
|
-
<h5><span class="tsd-kind-parameter">subTreeRoot</span>: <
|
|
1960
|
+
<h5><span class="tsd-kind-parameter">subTreeRoot</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1957
1961
|
<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>
|
|
1958
1962
|
</div>
|
|
1959
1963
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
@@ -1974,7 +1978,7 @@ specifies the property of the <code>BinaryTreeNode</code> that should be modifie
|
|
|
1974
1978
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1975
1979
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#subTreeAdd">subTreeAdd</a></p>
|
|
1976
1980
|
<ul>
|
|
1977
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1981
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L909">src/data-structures/binary-tree/binary-tree.ts:909</a></li></ul></aside></li></ul></section>
|
|
1978
1982
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="subTreeSum" class="tsd-anchor"></a>
|
|
1979
1983
|
<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>
|
|
1980
1984
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1987,7 +1991,7 @@ iteratively.</p>
|
|
|
1987
1991
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1988
1992
|
<ul class="tsd-parameter-list">
|
|
1989
1993
|
<li>
|
|
1990
|
-
<h5><span class="tsd-kind-parameter">subTreeRoot</span>: <
|
|
1994
|
+
<h5><span class="tsd-kind-parameter">subTreeRoot</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1991
1995
|
<div class="tsd-comment tsd-typography"><p>The subTreeRoot parameter is the root node of the subtree for which you want to calculate the
|
|
1992
1996
|
sum.</p>
|
|
1993
1997
|
</div>
|
|
@@ -2004,7 +2008,7 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
2004
2008
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
2005
2009
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#subTreeSum">subTreeSum</a></p>
|
|
2006
2010
|
<ul>
|
|
2007
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
2011
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L853">src/data-structures/binary-tree/binary-tree.ts:853</a></li></ul></aside></li></ul></section></section></div>
|
|
2008
2012
|
<div class="col-sidebar">
|
|
2009
2013
|
<div class="page-menu">
|
|
2010
2014
|
<div class="tsd-navigation settings">
|
|
@@ -2043,6 +2047,7 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
2043
2047
|
<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>
|
|
2044
2048
|
<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>
|
|
2045
2049
|
<li><a href="#_compare" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_compare</span></a></li>
|
|
2050
|
+
<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>
|
|
2046
2051
|
<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>
|
|
2047
2052
|
<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>
|
|
2048
2053
|
<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>
|
|
@@ -2063,7 +2068,6 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
2063
2068
|
<li><a href="#allGreaterNodesAdd" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>all<wbr/>Greater<wbr/>Nodes<wbr/>Add</span></a></li>
|
|
2064
2069
|
<li><a href="#balance" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>balance</span></a></li>
|
|
2065
2070
|
<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>
|
|
2066
|
-
<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>
|
|
2067
2071
|
<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>
|
|
2068
2072
|
<li><a href="#get" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get</span></a></li>
|
|
2069
2073
|
<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>
|
|
@@ -2095,6 +2099,7 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
2095
2099
|
<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>
|
|
2096
2100
|
<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>
|
|
2097
2101
|
<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>
|
|
2102
|
+
<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>
|
|
2098
2103
|
<li><a href="AVLTree.html"><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>
|
|
2099
2104
|
<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>
|
|
2100
2105
|
<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>
|
|
@@ -2131,7 +2136,6 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
2131
2136
|
<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>
|
|
2132
2137
|
<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>
|
|
2133
2138
|
<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>
|
|
2134
|
-
<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>
|
|
2135
2139
|
<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>
|
|
2136
2140
|
<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>
|
|
2137
2141
|
<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>
|
|
@@ -2150,13 +2154,13 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
2150
2154
|
<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>
|
|
2151
2155
|
<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>
|
|
2152
2156
|
<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>
|
|
2153
|
-
<li><a href="../interfaces/
|
|
2154
|
-
<li><a href="../interfaces/
|
|
2157
|
+
<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>
|
|
2158
|
+
<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>
|
|
2155
2159
|
<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>
|
|
2156
2160
|
<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>
|
|
2157
|
-
<li><a href="../interfaces/
|
|
2158
|
-
<li><a href="../
|
|
2159
|
-
<li><a href="../types/BSTComparator.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><
|
|
2161
|
+
<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>
|
|
2162
|
+
<li><a href="../types/AVLTreeDeleted.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/>Deleted</span></a></li>
|
|
2163
|
+
<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>
|
|
2160
2164
|
<li><a href="../types/BSTDeletedResult.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>BSTDeleted<wbr/>Result</span></a></li>
|
|
2161
2165
|
<li><a href="../types/BinaryTreeDeleted.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Binary<wbr/>Tree<wbr/>Deleted</span></a></li>
|
|
2162
2166
|
<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>
|
|
@@ -2164,19 +2168,21 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
2164
2168
|
<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>
|
|
2165
2169
|
<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>
|
|
2166
2170
|
<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>
|
|
2171
|
+
<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>
|
|
2172
|
+
<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>
|
|
2173
|
+
<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>
|
|
2167
2174
|
<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>
|
|
2168
2175
|
<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>
|
|
2169
2176
|
<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>
|
|
2177
|
+
<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>
|
|
2178
|
+
<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>
|
|
2179
|
+
<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>
|
|
2180
|
+
<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>
|
|
2170
2181
|
<li><a href="../types/ResultByProperty.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Result<wbr/>By<wbr/>Property</span></a></li>
|
|
2171
2182
|
<li><a href="../types/ResultsByProperty.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Results<wbr/>By<wbr/>Property</span></a></li>
|
|
2172
2183
|
<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>
|
|
2173
|
-
<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>
|
|
2174
|
-
<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>
|
|
2175
|
-
<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>
|
|
2176
2184
|
<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>
|
|
2177
2185
|
<li><a href="../types/TreeMultiSetDeletedResult.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Tree<wbr/>Multi<wbr/>Set<wbr/>Deleted<wbr/>Result</span></a></li>
|
|
2178
|
-
<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>
|
|
2179
|
-
<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>
|
|
2180
2186
|
<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>
|
|
2181
2187
|
<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>
|
|
2182
2188
|
<div class="tsd-generator">
|