data-structure-typed 1.18.6 → 1.18.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/data-structures/binary-tree/abstract-binary-tree.d.ts +48 -24
- package/dist/data-structures/binary-tree/abstract-binary-tree.js +51 -26
- package/dist/data-structures/binary-tree/avl-tree.d.ts +5 -4
- package/dist/data-structures/binary-tree/avl-tree.js +5 -3
- package/dist/data-structures/binary-tree/binary-tree.d.ts +13 -3
- package/dist/data-structures/binary-tree/binary-tree.js +14 -5
- package/dist/data-structures/binary-tree/bst.d.ts +26 -5
- package/dist/data-structures/binary-tree/bst.js +26 -4
- package/dist/data-structures/binary-tree/rb-tree.d.ts +30 -1
- package/dist/data-structures/binary-tree/rb-tree.js +27 -14
- package/dist/data-structures/binary-tree/tree-multiset.d.ts +15 -4
- package/dist/data-structures/binary-tree/tree-multiset.js +15 -3
- package/dist/data-structures/graph/abstract-graph.d.ts +20 -21
- package/dist/data-structures/graph/abstract-graph.js +24 -19
- package/dist/data-structures/graph/directed-graph.d.ts +10 -9
- package/dist/data-structures/graph/directed-graph.js +18 -18
- package/dist/data-structures/graph/undirected-graph.d.ts +5 -11
- package/dist/data-structures/graph/undirected-graph.js +4 -17
- package/dist/data-structures/interfaces/abstract-binary-tree.d.ts +101 -0
- package/dist/data-structures/interfaces/abstract-binary-tree.js +2 -0
- package/dist/data-structures/interfaces/abstract-graph.d.ts +1 -4
- package/dist/data-structures/interfaces/avl-tree.d.ts +16 -1
- package/dist/data-structures/interfaces/binary-tree.d.ts +4 -24
- package/dist/data-structures/interfaces/bst.d.ts +18 -1
- package/dist/data-structures/interfaces/directed-graph.d.ts +4 -1
- package/dist/data-structures/interfaces/index.d.ts +1 -1
- package/dist/data-structures/interfaces/index.js +1 -1
- package/dist/data-structures/interfaces/rb-tree.d.ts +9 -0
- package/dist/data-structures/interfaces/rb-tree.js +2 -0
- package/dist/data-structures/interfaces/undirected-graph.d.ts +4 -1
- package/dist/data-structures/types/abstract-binary-tree.d.ts +2 -2
- package/dist/utils/utils.js +62 -0
- package/docs/assets/search.js +1 -1
- package/docs/classes/AVLTree.html +292 -180
- package/docs/classes/AVLTreeNode.html +126 -77
- package/docs/classes/AaTree.html +12 -6
- package/docs/classes/AbstractBinaryTree.html +258 -163
- package/docs/classes/AbstractBinaryTreeNode.html +117 -84
- package/docs/classes/AbstractEdge.html +22 -16
- package/docs/classes/AbstractGraph.html +137 -140
- package/docs/classes/AbstractVertex.html +19 -13
- package/docs/classes/ArrayDeque.html +25 -19
- package/docs/classes/BST.html +275 -174
- package/docs/classes/BSTNode.html +127 -77
- package/docs/classes/BTree.html +12 -6
- package/docs/classes/BinaryIndexedTree.html +20 -14
- package/docs/classes/BinaryTree.html +265 -169
- package/docs/classes/BinaryTreeNode.html +110 -61
- package/docs/classes/Character.html +15 -9
- package/docs/classes/CoordinateMap.html +20 -14
- package/docs/classes/CoordinateSet.html +19 -13
- package/docs/classes/Deque.html +45 -39
- package/docs/classes/DirectedEdge.html +26 -20
- package/docs/classes/DirectedGraph.html +189 -154
- package/docs/classes/DirectedVertex.html +17 -11
- package/docs/classes/DoublyLinkedList.html +48 -42
- package/docs/classes/DoublyLinkedListNode.html +22 -16
- package/docs/classes/HashTable.html +12 -6
- package/docs/classes/Heap.html +26 -20
- package/docs/classes/HeapItem.html +19 -13
- package/docs/classes/Matrix2D.html +27 -21
- package/docs/classes/MatrixNTI2D.html +15 -9
- package/docs/classes/MaxHeap.html +26 -20
- package/docs/classes/MaxPriorityQueue.html +45 -39
- package/docs/classes/MinHeap.html +26 -20
- package/docs/classes/MinPriorityQueue.html +45 -39
- package/docs/classes/Navigator.html +21 -15
- package/docs/classes/ObjectDeque.html +36 -30
- package/docs/classes/Pair.html +12 -6
- package/docs/classes/PriorityQueue.html +43 -37
- package/docs/classes/Queue.html +25 -19
- package/docs/classes/RBTree.html +2388 -0
- package/docs/classes/RBTreeNode.html +516 -0
- package/docs/classes/SegmentTree.html +28 -22
- package/docs/classes/SegmentTreeNode.html +31 -25
- package/docs/classes/SinglyLinkedList.html +45 -39
- package/docs/classes/SinglyLinkedListNode.html +19 -13
- package/docs/classes/SkipLinkedList.html +12 -6
- package/docs/classes/SplayTree.html +12 -6
- package/docs/classes/Stack.html +23 -17
- package/docs/classes/TreeMap.html +12 -6
- package/docs/classes/TreeMultiSet.html +273 -172
- package/docs/classes/TreeMultiSetNode.html +126 -77
- package/docs/classes/TreeNode.html +27 -21
- package/docs/classes/TreeSet.html +12 -6
- package/docs/classes/Trie.html +24 -18
- package/docs/classes/TrieNode.html +22 -16
- package/docs/classes/TwoThreeTree.html +12 -6
- package/docs/classes/UndirectedEdge.html +23 -17
- package/docs/classes/UndirectedGraph.html +160 -146
- package/docs/classes/UndirectedVertex.html +17 -11
- package/docs/classes/Vector2D.html +39 -33
- package/docs/enums/CP.html +15 -9
- package/docs/enums/FamilyPosition.html +15 -9
- package/docs/enums/LoopType.html +14 -8
- package/docs/enums/RBColor.html +14 -8
- package/docs/enums/TopologicalProperty.html +15 -9
- package/docs/index.html +11 -5
- package/docs/interfaces/IAVLTree.html +1378 -0
- package/docs/interfaces/IAVLTreeNode.html +405 -0
- package/docs/interfaces/IAbstractBinaryTree.html +1124 -0
- package/docs/interfaces/{IBinaryTreeNode.html → IAbstractBinaryTreeNode.html} +61 -73
- package/docs/interfaces/{IGraph.html → IAbstractGraph.html} +52 -90
- package/docs/interfaces/IBST.html +1271 -0
- package/docs/interfaces/IBSTNode.html +408 -0
- package/docs/interfaces/IDirectedGraph.html +329 -16
- package/docs/interfaces/IUNDirectedGraph.html +322 -8
- package/docs/modules.html +22 -10
- package/docs/types/AVLTreeOptions.html +12 -6
- package/docs/types/{AbstractResultsByProperty.html → AbstractBinaryTreeNodeProperties.html} +16 -10
- package/docs/types/{AbstractResultByProperty.html → AbstractBinaryTreeNodeProperty.html} +16 -10
- package/docs/types/AbstractBinaryTreeOptions.html +12 -6
- package/docs/types/AbstractRecursiveBinaryTreeNode.html +12 -6
- package/docs/types/BSTComparator.html +12 -6
- package/docs/types/BSTOptions.html +12 -6
- package/docs/types/BinaryTreeDeletedResult.html +12 -6
- package/docs/types/BinaryTreeNodeId.html +12 -6
- package/docs/types/BinaryTreeNodePropertyName.html +12 -6
- package/docs/types/BinaryTreeOptions.html +12 -6
- package/docs/types/DFSOrderPattern.html +12 -6
- package/docs/types/DijkstraResult.html +12 -6
- package/docs/types/Direction.html +12 -6
- package/docs/types/EdgeId.html +12 -6
- package/docs/types/HeapOptions.html +12 -6
- package/docs/types/IdObject.html +12 -6
- package/docs/types/KeyValObject.html +12 -6
- package/docs/types/NavigatorParams.html +12 -6
- package/docs/types/NodeOrPropertyName.html +12 -6
- package/docs/types/PriorityQueueComparator.html +12 -6
- package/docs/types/PriorityQueueDFSOrderPattern.html +12 -6
- package/docs/types/PriorityQueueOptions.html +12 -6
- package/docs/types/RBTreeOptions.html +12 -6
- package/docs/types/RecursiveAVLTreeNode.html +12 -6
- package/docs/types/RecursiveBSTNode.html +12 -6
- package/docs/types/RecursiveBinaryTreeNode.html +12 -6
- package/docs/types/RecursiveTreeMultiSetNode.html +12 -6
- package/docs/types/SegmentTreeNodeVal.html +12 -6
- package/docs/types/TopologicalStatus.html +12 -6
- package/docs/types/TreeMultiSetOptions.html +12 -6
- package/docs/types/Turning.html +12 -6
- package/docs/types/VertexId.html +12 -6
- package/package.json +2 -2
- package/docs/interfaces/IBinaryTree.html +0 -189
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
<section class="tsd-panel">
|
|
32
32
|
<h4>Implements</h4>
|
|
33
33
|
<ul class="tsd-hierarchy">
|
|
34
|
-
<li><
|
|
34
|
+
<li><span class="tsd-signature-type ">IBinaryTree</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></ul></section><aside class="tsd-sources">
|
|
35
35
|
<ul>
|
|
36
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
36
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/binary-tree.ts#L32">src/data-structures/binary-tree/binary-tree.ts:32</a></li></ul></aside>
|
|
37
37
|
<section class="tsd-panel-group tsd-index-group">
|
|
38
38
|
<section class="tsd-panel tsd-index-panel">
|
|
39
39
|
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
|
|
@@ -64,7 +64,6 @@
|
|
|
64
64
|
<a href="BinaryTree.html#DFS" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>DFS</span></a>
|
|
65
65
|
<a href="BinaryTree.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>
|
|
66
66
|
<a href="BinaryTree.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>
|
|
67
|
-
<a href="BinaryTree.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>
|
|
68
67
|
<a href="BinaryTree.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>
|
|
69
68
|
<a href="BinaryTree.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>
|
|
70
69
|
<a href="BinaryTree.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>
|
|
@@ -83,6 +82,7 @@
|
|
|
83
82
|
<a href="BinaryTree.html#addMany" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>add<wbr/>Many</span></a>
|
|
84
83
|
<a href="BinaryTree.html#addTo" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>add<wbr/>To</span></a>
|
|
85
84
|
<a href="BinaryTree.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>
|
|
85
|
+
<a href="BinaryTree.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>
|
|
86
86
|
<a href="BinaryTree.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>
|
|
87
87
|
<a href="BinaryTree.html#get" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get</span></a>
|
|
88
88
|
<a href="BinaryTree.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>
|
|
@@ -96,6 +96,7 @@
|
|
|
96
96
|
<a href="BinaryTree.html#getSubTreeSizeAndCount" 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/>Sub<wbr/>Tree<wbr/>Size<wbr/>And<wbr/>Count</span></a>
|
|
97
97
|
<a href="BinaryTree.html#has" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>has</span></a>
|
|
98
98
|
<a href="BinaryTree.html#isBST" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>isBST</span></a>
|
|
99
|
+
<a href="BinaryTree.html#isBSTByRooted" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>isBSTBy<wbr/>Rooted</span></a>
|
|
99
100
|
<a href="BinaryTree.html#isBalanced" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>is<wbr/>Balanced</span></a>
|
|
100
101
|
<a href="BinaryTree.html#isEmpty" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>is<wbr/>Empty</span></a>
|
|
101
102
|
<a href="BinaryTree.html#levelIterative" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>level<wbr/>Iterative</span></a>
|
|
@@ -120,7 +121,7 @@ isDuplicatedVal based on the provided options.</p>
|
|
|
120
121
|
<h4>Type Parameters</h4>
|
|
121
122
|
<ul class="tsd-type-parameter-list">
|
|
122
123
|
<li>
|
|
123
|
-
<h4><span class="tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol"> extends </span><a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span><a href="../types/RecursiveBinaryTreeNode.html" class="tsd-signature-type tsd-kind-type-alias">RecursiveBinaryTreeNode</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>
|
|
124
|
+
<h4><span class="tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol"> extends </span><a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">></span> = <a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span><a href="../types/RecursiveBinaryTreeNode.html" class="tsd-signature-type tsd-kind-type-alias">RecursiveBinaryTreeNode</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>
|
|
124
125
|
<div class="tsd-parameters">
|
|
125
126
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
126
127
|
<ul class="tsd-parameter-list">
|
|
@@ -133,7 +134,7 @@ isDuplicatedVal based on the provided options.</p>
|
|
|
133
134
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
134
135
|
<p>Overrides <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#constructor">constructor</a></p>
|
|
135
136
|
<ul>
|
|
136
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
137
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/binary-tree.ts#L39">src/data-structures/binary-tree/binary-tree.ts:39</a></li></ul></aside></li></ul></section></section>
|
|
137
138
|
<section class="tsd-panel-group tsd-member-group">
|
|
138
139
|
<h2>Accessors</h2>
|
|
139
140
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="autoIncrementId" class="tsd-anchor"></a>
|
|
@@ -142,108 +143,120 @@ isDuplicatedVal based on the provided options.</p>
|
|
|
142
143
|
<li class="tsd-signature" id="autoIncrementId.autoIncrementId-1"><span class="tsd-signature-symbol">get</span> autoIncrementId<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
|
|
143
144
|
<li class="tsd-description">
|
|
144
145
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources">
|
|
146
|
+
<p>Implementation of IBinaryTree.autoIncrementId</p>
|
|
145
147
|
<p>Inherited from AbstractBinaryTree.autoIncrementId</p>
|
|
146
148
|
<ul>
|
|
147
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
149
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L224">src/data-structures/binary-tree/abstract-binary-tree.ts:224</a></li></ul></aside></li></ul></section>
|
|
148
150
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="count" class="tsd-anchor"></a>
|
|
149
151
|
<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>
|
|
150
152
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
151
153
|
<li class="tsd-signature" id="count.count-1"><span class="tsd-signature-symbol">get</span> count<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></li>
|
|
152
154
|
<li class="tsd-description">
|
|
153
155
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
|
|
156
|
+
<p>Implementation of IBinaryTree.count</p>
|
|
154
157
|
<p>Inherited from AbstractBinaryTree.count</p>
|
|
155
158
|
<ul>
|
|
156
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
159
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L254">src/data-structures/binary-tree/abstract-binary-tree.ts:254</a></li></ul></aside></li></ul></section>
|
|
157
160
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="isDuplicatedVal" class="tsd-anchor"></a>
|
|
158
161
|
<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>
|
|
159
162
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
160
163
|
<li class="tsd-signature" id="isDuplicatedVal.isDuplicatedVal-1"><span class="tsd-signature-symbol">get</span> isDuplicatedVal<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
|
|
161
164
|
<li class="tsd-description">
|
|
162
165
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources">
|
|
166
|
+
<p>Implementation of IBinaryTree.isDuplicatedVal</p>
|
|
163
167
|
<p>Inherited from AbstractBinaryTree.isDuplicatedVal</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/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L236">src/data-structures/binary-tree/abstract-binary-tree.ts:236</a></li></ul></aside></li></ul></section>
|
|
166
170
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="loopType" class="tsd-anchor"></a>
|
|
167
171
|
<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>
|
|
168
172
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
169
173
|
<li class="tsd-signature" id="loopType.loopType-1"><span class="tsd-signature-symbol">get</span> loopType<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../enums/LoopType.html" class="tsd-signature-type tsd-kind-enum">LoopType</a></li>
|
|
170
174
|
<li class="tsd-description">
|
|
171
175
|
<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">
|
|
176
|
+
<p>Implementation of IBinaryTree.loopType</p>
|
|
172
177
|
<p>Inherited from AbstractBinaryTree.loopType</p>
|
|
173
178
|
<ul>
|
|
174
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
179
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L189">src/data-structures/binary-tree/abstract-binary-tree.ts:189</a></li></ul></aside></li></ul></section>
|
|
175
180
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="maxId" class="tsd-anchor"></a>
|
|
176
181
|
<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>
|
|
177
182
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
178
183
|
<li class="tsd-signature" id="maxId.maxId-1"><span class="tsd-signature-symbol">get</span> maxId<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></li>
|
|
179
184
|
<li class="tsd-description">
|
|
180
185
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
|
|
186
|
+
<p>Implementation of IBinaryTree.maxId</p>
|
|
181
187
|
<p>Inherited from AbstractBinaryTree.maxId</p>
|
|
182
188
|
<ul>
|
|
183
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
189
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L230">src/data-structures/binary-tree/abstract-binary-tree.ts:230</a></li></ul></aside></li></ul></section>
|
|
184
190
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="root" class="tsd-anchor"></a>
|
|
185
191
|
<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>
|
|
186
192
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
187
193
|
<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>
|
|
188
194
|
<li class="tsd-description">
|
|
189
195
|
<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">
|
|
196
|
+
<p>Implementation of IBinaryTree.root</p>
|
|
190
197
|
<p>Inherited from AbstractBinaryTree.root</p>
|
|
191
198
|
<ul>
|
|
192
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
199
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L242">src/data-structures/binary-tree/abstract-binary-tree.ts:242</a></li></ul></aside></li></ul></section>
|
|
193
200
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="size" class="tsd-anchor"></a>
|
|
194
201
|
<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>
|
|
195
202
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
196
203
|
<li class="tsd-signature" id="size.size-1"><span class="tsd-signature-symbol">get</span> size<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></li>
|
|
197
204
|
<li class="tsd-description">
|
|
198
205
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
|
|
206
|
+
<p>Implementation of IBinaryTree.size</p>
|
|
199
207
|
<p>Inherited from AbstractBinaryTree.size</p>
|
|
200
208
|
<ul>
|
|
201
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
209
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L248">src/data-structures/binary-tree/abstract-binary-tree.ts:248</a></li></ul></aside></li></ul></section>
|
|
202
210
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="visitedCount" class="tsd-anchor"></a>
|
|
203
211
|
<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>
|
|
204
212
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
205
213
|
<li class="tsd-signature" id="visitedCount.visitedCount-1"><span class="tsd-signature-symbol">get</span> visitedCount<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></li>
|
|
206
214
|
<li class="tsd-description">
|
|
207
215
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources">
|
|
216
|
+
<p>Implementation of IBinaryTree.visitedCount</p>
|
|
208
217
|
<p>Inherited from AbstractBinaryTree.visitedCount</p>
|
|
209
218
|
<ul>
|
|
210
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
219
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L212">src/data-structures/binary-tree/abstract-binary-tree.ts:212</a></li></ul></aside></li></ul></section>
|
|
211
220
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="visitedId" class="tsd-anchor"></a>
|
|
212
221
|
<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>
|
|
213
222
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
214
223
|
<li class="tsd-signature" id="visitedId.visitedId-1"><span class="tsd-signature-symbol">get</span> visitedId<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></li>
|
|
215
224
|
<li class="tsd-description">
|
|
216
225
|
<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
|
+
<p>Implementation of IBinaryTree.visitedId</p>
|
|
217
227
|
<p>Inherited from AbstractBinaryTree.visitedId</p>
|
|
218
228
|
<ul>
|
|
219
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
229
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L194">src/data-structures/binary-tree/abstract-binary-tree.ts:194</a></li></ul></aside></li></ul></section>
|
|
220
230
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="visitedLeftSum" class="tsd-anchor"></a>
|
|
221
231
|
<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>
|
|
222
232
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
223
233
|
<li class="tsd-signature" id="visitedLeftSum.visitedLeftSum-1"><span class="tsd-signature-symbol">get</span> visitedLeftSum<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></li>
|
|
224
234
|
<li class="tsd-description">
|
|
225
235
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources">
|
|
236
|
+
<p>Implementation of IBinaryTree.visitedLeftSum</p>
|
|
226
237
|
<p>Inherited from AbstractBinaryTree.visitedLeftSum</p>
|
|
227
238
|
<ul>
|
|
228
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
239
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L218">src/data-structures/binary-tree/abstract-binary-tree.ts:218</a></li></ul></aside></li></ul></section>
|
|
229
240
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="visitedNode" class="tsd-anchor"></a>
|
|
230
241
|
<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>
|
|
231
242
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
232
243
|
<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>
|
|
233
244
|
<li class="tsd-description">
|
|
234
245
|
<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">
|
|
246
|
+
<p>Implementation of IBinaryTree.visitedNode</p>
|
|
235
247
|
<p>Inherited from AbstractBinaryTree.visitedNode</p>
|
|
236
248
|
<ul>
|
|
237
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
249
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L206">src/data-structures/binary-tree/abstract-binary-tree.ts:206</a></li></ul></aside></li></ul></section>
|
|
238
250
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="visitedVal" class="tsd-anchor"></a>
|
|
239
251
|
<h3 class="tsd-anchor-link"><span>visited<wbr/>Val</span><a href="#visitedVal" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
240
252
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
241
253
|
<li class="tsd-signature" id="visitedVal.visitedVal-1"><span class="tsd-signature-symbol">get</span> visitedVal<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[]</span></li>
|
|
242
254
|
<li class="tsd-description">
|
|
243
255
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources">
|
|
256
|
+
<p>Implementation of IBinaryTree.visitedVal</p>
|
|
244
257
|
<p>Inherited from AbstractBinaryTree.visitedVal</p>
|
|
245
258
|
<ul>
|
|
246
|
-
<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/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L200">src/data-structures/binary-tree/abstract-binary-tree.ts:200</a></li></ul></aside></li></ul></section></section>
|
|
247
260
|
<section class="tsd-panel-group tsd-member-group">
|
|
248
261
|
<h2>Methods</h2>
|
|
249
262
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="BFS" class="tsd-anchor"></a>
|
|
@@ -254,12 +267,13 @@ isDuplicatedVal based on the provided options.</p>
|
|
|
254
267
|
<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
|
|
255
268
|
or property name.</p>
|
|
256
269
|
</div>
|
|
257
|
-
<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>
|
|
270
|
+
<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>AbstractBinaryTreeNodeProperties<N></code>.</p>
|
|
258
271
|
|
|
259
272
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
273
|
+
<p>Implementation of IBinaryTree.BFS</p>
|
|
260
274
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#BFS">BFS</a></p>
|
|
261
275
|
<ul>
|
|
262
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
276
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L963">src/data-structures/binary-tree/abstract-binary-tree.ts:963</a></li></ul></aside></li>
|
|
263
277
|
<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>
|
|
264
278
|
<li class="tsd-description">
|
|
265
279
|
<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
|
|
@@ -276,12 +290,13 @@ performed starting from that node. If a property name is provided, the breadth-f
|
|
|
276
290
|
performed starting from the root node</p>
|
|
277
291
|
</div>
|
|
278
292
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
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>
|
|
293
|
+
<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>AbstractBinaryTreeNodeProperties<N></code>.</p>
|
|
280
294
|
|
|
281
295
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
296
|
+
<p>Implementation of IBinaryTree.BFS</p>
|
|
282
297
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#BFS">BFS</a></p>
|
|
283
298
|
<ul>
|
|
284
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
299
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L965">src/data-structures/binary-tree/abstract-binary-tree.ts:965</a></li></ul></aside></li>
|
|
285
300
|
<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>
|
|
286
301
|
<li class="tsd-description">
|
|
287
302
|
<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
|
|
@@ -298,12 +313,13 @@ performed starting from that node. If a property name is provided, the breadth-f
|
|
|
298
313
|
performed starting from the root node</p>
|
|
299
314
|
</div>
|
|
300
315
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
301
|
-
<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>
|
|
316
|
+
<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>AbstractBinaryTreeNodeProperties<N></code>.</p>
|
|
302
317
|
|
|
303
318
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
319
|
+
<p>Implementation of IBinaryTree.BFS</p>
|
|
304
320
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#BFS">BFS</a></p>
|
|
305
321
|
<ul>
|
|
306
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
322
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L967">src/data-structures/binary-tree/abstract-binary-tree.ts:967</a></li></ul></aside></li>
|
|
307
323
|
<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>
|
|
308
324
|
<li class="tsd-description">
|
|
309
325
|
<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
|
|
@@ -320,12 +336,13 @@ performed starting from that node. If a property name is provided, the breadth-f
|
|
|
320
336
|
performed starting from the root node</p>
|
|
321
337
|
</div>
|
|
322
338
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
323
|
-
<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>
|
|
339
|
+
<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>AbstractBinaryTreeNodeProperties<N></code>.</p>
|
|
324
340
|
|
|
325
341
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
342
|
+
<p>Implementation of IBinaryTree.BFS</p>
|
|
326
343
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#BFS">BFS</a></p>
|
|
327
344
|
<ul>
|
|
328
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
345
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L969">src/data-structures/binary-tree/abstract-binary-tree.ts:969</a></li></ul></aside></li>
|
|
329
346
|
<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>
|
|
330
347
|
<li class="tsd-description">
|
|
331
348
|
<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
|
|
@@ -342,12 +359,13 @@ performed starting from that node. If a property name is provided, the breadth-f
|
|
|
342
359
|
performed starting from the root node</p>
|
|
343
360
|
</div>
|
|
344
361
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
345
|
-
<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>
|
|
362
|
+
<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>AbstractBinaryTreeNodeProperties<N></code>.</p>
|
|
346
363
|
|
|
347
364
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
365
|
+
<p>Implementation of IBinaryTree.BFS</p>
|
|
348
366
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#BFS">BFS</a></p>
|
|
349
367
|
<ul>
|
|
350
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
368
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L971">src/data-structures/binary-tree/abstract-binary-tree.ts:971</a></li></ul></aside></li></ul></section>
|
|
351
369
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="DFS" class="tsd-anchor"></a>
|
|
352
370
|
<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>
|
|
353
371
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -356,12 +374,13 @@ performed starting from the root node</p>
|
|
|
356
374
|
<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
|
|
357
375
|
specified pattern and node or property name.</p>
|
|
358
376
|
</div>
|
|
359
|
-
<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>
|
|
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>AbstractBinaryTreeNodeProperties<N></code>.</p>
|
|
360
378
|
|
|
361
379
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
380
|
+
<p>Implementation of IBinaryTree.DFS</p>
|
|
362
381
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#DFS">DFS</a></p>
|
|
363
382
|
<ul>
|
|
364
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
383
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L999">src/data-structures/binary-tree/abstract-binary-tree.ts:999</a></li></ul></aside></li>
|
|
365
384
|
<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>
|
|
366
385
|
<li class="tsd-description">
|
|
367
386
|
<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
|
|
@@ -385,12 +404,13 @@ either the name of a property in the <code>BinaryTreeNode</code> object or the v
|
|
|
385
404
|
no value</p>
|
|
386
405
|
</div>
|
|
387
406
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
388
|
-
<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>
|
|
407
|
+
<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>AbstractBinaryTreeNodeProperties<N></code>.</p>
|
|
389
408
|
|
|
390
409
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
410
|
+
<p>Implementation of IBinaryTree.DFS</p>
|
|
391
411
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#DFS">DFS</a></p>
|
|
392
412
|
<ul>
|
|
393
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
413
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1001">src/data-structures/binary-tree/abstract-binary-tree.ts:1001</a></li></ul></aside></li>
|
|
394
414
|
<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>
|
|
395
415
|
<li class="tsd-description">
|
|
396
416
|
<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
|
|
@@ -414,12 +434,13 @@ either the name of a property in the <code>BinaryTreeNode</code> object or the v
|
|
|
414
434
|
no value</p>
|
|
415
435
|
</div>
|
|
416
436
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
417
|
-
<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>
|
|
437
|
+
<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>AbstractBinaryTreeNodeProperties<N></code>.</p>
|
|
418
438
|
|
|
419
439
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
440
|
+
<p>Implementation of IBinaryTree.DFS</p>
|
|
420
441
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#DFS">DFS</a></p>
|
|
421
442
|
<ul>
|
|
422
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
443
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1003">src/data-structures/binary-tree/abstract-binary-tree.ts:1003</a></li></ul></aside></li>
|
|
423
444
|
<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>
|
|
424
445
|
<li class="tsd-description">
|
|
425
446
|
<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
|
|
@@ -443,12 +464,13 @@ either the name of a property in the <code>BinaryTreeNode</code> object or the v
|
|
|
443
464
|
no value</p>
|
|
444
465
|
</div>
|
|
445
466
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
446
|
-
<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>
|
|
467
|
+
<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>AbstractBinaryTreeNodeProperties<N></code>.</p>
|
|
447
468
|
|
|
448
469
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
470
|
+
<p>Implementation of IBinaryTree.DFS</p>
|
|
449
471
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#DFS">DFS</a></p>
|
|
450
472
|
<ul>
|
|
451
|
-
<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/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1005">src/data-structures/binary-tree/abstract-binary-tree.ts:1005</a></li></ul></aside></li>
|
|
452
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>
|
|
453
475
|
<li class="tsd-description">
|
|
454
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
|
|
@@ -472,12 +494,13 @@ either the name of a property in the <code>BinaryTreeNode</code> object or the v
|
|
|
472
494
|
no value</p>
|
|
473
495
|
</div>
|
|
474
496
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
475
|
-
<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>
|
|
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>AbstractBinaryTreeNodeProperties<N></code>.</p>
|
|
476
498
|
|
|
477
499
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
500
|
+
<p>Implementation of IBinaryTree.DFS</p>
|
|
478
501
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#DFS">DFS</a></p>
|
|
479
502
|
<ul>
|
|
480
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
503
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1007">src/data-structures/binary-tree/abstract-binary-tree.ts:1007</a></li></ul></aside></li></ul></section>
|
|
481
504
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="DFSIterative" class="tsd-anchor"></a>
|
|
482
505
|
<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>
|
|
483
506
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -488,9 +511,10 @@ Space complexity of Iterative DFS equals to recursive DFS which is O(n) because
|
|
|
488
511
|
</div>
|
|
489
512
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4>
|
|
490
513
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
514
|
+
<p>Implementation of IBinaryTree.DFSIterative</p>
|
|
491
515
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#DFSIterative">DFSIterative</a></p>
|
|
492
516
|
<ul>
|
|
493
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
517
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1049">src/data-structures/binary-tree/abstract-binary-tree.ts:1049</a></li></ul></aside></li>
|
|
494
518
|
<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>
|
|
495
519
|
<li class="tsd-description">
|
|
496
520
|
<div class="tsd-comment tsd-typography"><p>Time complexity is O(n)
|
|
@@ -507,9 +531,10 @@ Space complexity of Iterative DFS equals to recursive DFS which is O(n) because
|
|
|
507
531
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
508
532
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4>
|
|
509
533
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
534
|
+
<p>Implementation of IBinaryTree.DFSIterative</p>
|
|
510
535
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#DFSIterative">DFSIterative</a></p>
|
|
511
536
|
<ul>
|
|
512
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
537
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1051">src/data-structures/binary-tree/abstract-binary-tree.ts:1051</a></li></ul></aside></li>
|
|
513
538
|
<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>
|
|
514
539
|
<li class="tsd-description">
|
|
515
540
|
<div class="tsd-comment tsd-typography"><p>Time complexity is O(n)
|
|
@@ -526,9 +551,10 @@ Space complexity of Iterative DFS equals to recursive DFS which is O(n) because
|
|
|
526
551
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
527
552
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4>
|
|
528
553
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
554
|
+
<p>Implementation of IBinaryTree.DFSIterative</p>
|
|
529
555
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#DFSIterative">DFSIterative</a></p>
|
|
530
556
|
<ul>
|
|
531
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
557
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1053">src/data-structures/binary-tree/abstract-binary-tree.ts:1053</a></li></ul></aside></li>
|
|
532
558
|
<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>
|
|
533
559
|
<li class="tsd-description">
|
|
534
560
|
<div class="tsd-comment tsd-typography"><p>Time complexity is O(n)
|
|
@@ -545,9 +571,10 @@ Space complexity of Iterative DFS equals to recursive DFS which is O(n) because
|
|
|
545
571
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
546
572
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4>
|
|
547
573
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
574
|
+
<p>Implementation of IBinaryTree.DFSIterative</p>
|
|
548
575
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#DFSIterative">DFSIterative</a></p>
|
|
549
576
|
<ul>
|
|
550
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
577
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1055">src/data-structures/binary-tree/abstract-binary-tree.ts:1055</a></li></ul></aside></li>
|
|
551
578
|
<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>
|
|
552
579
|
<li class="tsd-description">
|
|
553
580
|
<div class="tsd-comment tsd-typography"><p>Time complexity is O(n)
|
|
@@ -564,9 +591,10 @@ Space complexity of Iterative DFS equals to recursive DFS which is O(n) because
|
|
|
564
591
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
565
592
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4>
|
|
566
593
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
594
|
+
<p>Implementation of IBinaryTree.DFSIterative</p>
|
|
567
595
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#DFSIterative">DFSIterative</a></p>
|
|
568
596
|
<ul>
|
|
569
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
597
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1057">src/data-structures/binary-tree/abstract-binary-tree.ts:1057</a></li></ul></aside></li></ul></section>
|
|
570
598
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_accumulatedByPropertyName" class="tsd-anchor"></a>
|
|
571
599
|
<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>
|
|
572
600
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -594,47 +622,11 @@ the property name of the node that should be accumulated. If it is a node object
|
|
|
594
622
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
595
623
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#_accumulatedByPropertyName">_accumulatedByPropertyName</a></p>
|
|
596
624
|
<ul>
|
|
597
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
598
|
-
<section class="tsd-panel tsd-member"><a id="_createNode" class="tsd-anchor"></a>
|
|
599
|
-
<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>
|
|
600
|
-
<ul class="tsd-signatures">
|
|
601
|
-
<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>
|
|
602
|
-
<li class="tsd-description">
|
|
603
|
-
<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
|
|
604
|
-
it returns null.</p>
|
|
605
|
-
</div>
|
|
606
|
-
<div class="tsd-parameters">
|
|
607
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
608
|
-
<ul class="tsd-parameter-list">
|
|
609
|
-
<li>
|
|
610
|
-
<h5><span class="tsd-kind-parameter">id</span>: <span class="tsd-signature-type">number</span></h5>
|
|
611
|
-
<div class="tsd-comment tsd-typography"><p>The <code>id</code> parameter is the identifier for the binary tree node. It is of type
|
|
612
|
-
<code>BinaryTreeNodeId</code>.</p>
|
|
613
|
-
</div>
|
|
614
|
-
<div class="tsd-comment tsd-typography"></div></li>
|
|
615
|
-
<li>
|
|
616
|
-
<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>
|
|
617
|
-
<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)
|
|
618
|
-
or <code>null</code>.</p>
|
|
619
|
-
</div>
|
|
620
|
-
<div class="tsd-comment tsd-typography"></div></li>
|
|
621
|
-
<li>
|
|
622
|
-
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">count</span>: <span class="tsd-signature-type">number</span></h5>
|
|
623
|
-
<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
|
|
624
|
-
of occurrences of the value in the binary tree node. If not provided, the default value is <code>undefined</code>.</p>
|
|
625
|
-
</div>
|
|
626
|
-
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
627
|
-
<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>
|
|
628
|
-
|
|
629
|
-
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
630
|
-
<p>Implementation of <a href="../interfaces/IBinaryTree.html">IBinaryTree</a>.<a href="../interfaces/IBinaryTree.html#_createNode">_createNode</a></p>
|
|
631
|
-
<p>Overrides <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#_createNode">_createNode</a></p>
|
|
632
|
-
<ul>
|
|
633
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/binary-tree.ts#L46">src/data-structures/binary-tree/binary-tree.ts:46</a></li></ul></aside></li></ul></section>
|
|
625
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1469">src/data-structures/binary-tree/abstract-binary-tree.ts:1469</a></li></ul></aside></li></ul></section>
|
|
634
626
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_getResultByPropertyName" class="tsd-anchor"></a>
|
|
635
627
|
<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>
|
|
636
628
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
637
|
-
<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/
|
|
629
|
+
<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/AbstractBinaryTreeNodeProperties.html" class="tsd-signature-type tsd-kind-type-alias">AbstractBinaryTreeNodeProperties</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>
|
|
638
630
|
<li class="tsd-description">
|
|
639
631
|
<div class="tsd-comment tsd-typography"><p>The function <code>_getResultByPropertyName</code> returns different results based on the provided property name or defaulting
|
|
640
632
|
to 'id'.</p>
|
|
@@ -648,12 +640,12 @@ to 'id'.</p>
|
|
|
648
640
|
can accept a value of type <code>NodeOrPropertyName</code>.</p>
|
|
649
641
|
</div>
|
|
650
642
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
651
|
-
<h4 class="tsd-returns-title">Returns <a href="../types/
|
|
643
|
+
<h4 class="tsd-returns-title">Returns <a href="../types/AbstractBinaryTreeNodeProperties.html" class="tsd-signature-type tsd-kind-type-alias">AbstractBinaryTreeNodeProperties</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>AbstractBinaryTreeNodeProperties<T></code>.</p>
|
|
652
644
|
|
|
653
645
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
654
646
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#_getResultByPropertyName">_getResultByPropertyName</a></p>
|
|
655
647
|
<ul>
|
|
656
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
648
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1498">src/data-structures/binary-tree/abstract-binary-tree.ts:1498</a></li></ul></aside></li></ul></section>
|
|
657
649
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_pushByPropertyNameStopOrNot" class="tsd-anchor"></a>
|
|
658
650
|
<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>
|
|
659
651
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -701,7 +693,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
701
693
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
702
694
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#_pushByPropertyNameStopOrNot">_pushByPropertyNameStopOrNot</a></p>
|
|
703
695
|
<ul>
|
|
704
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
696
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1432">src/data-structures/binary-tree/abstract-binary-tree.ts:1432</a></li></ul></aside></li></ul></section>
|
|
705
697
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_resetResults" class="tsd-anchor"></a>
|
|
706
698
|
<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>
|
|
707
699
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -713,7 +705,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
713
705
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
714
706
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#_resetResults">_resetResults</a></p>
|
|
715
707
|
<ul>
|
|
716
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
708
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1408">src/data-structures/binary-tree/abstract-binary-tree.ts:1408</a></li></ul></aside></li></ul></section>
|
|
717
709
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setAutoIncrementId" class="tsd-anchor"></a>
|
|
718
710
|
<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>
|
|
719
711
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -727,7 +719,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
727
719
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
728
720
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#_setAutoIncrementId">_setAutoIncrementId</a></p>
|
|
729
721
|
<ul>
|
|
730
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
722
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1377">src/data-structures/binary-tree/abstract-binary-tree.ts:1377</a></li></ul></aside></li></ul></section>
|
|
731
723
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setCount" class="tsd-anchor"></a>
|
|
732
724
|
<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>
|
|
733
725
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -741,7 +733,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
741
733
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
742
734
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#_setCount">_setCount</a></p>
|
|
743
735
|
<ul>
|
|
744
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
736
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1401">src/data-structures/binary-tree/abstract-binary-tree.ts:1401</a></li></ul></aside></li></ul></section>
|
|
745
737
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setIsDuplicatedVal" class="tsd-anchor"></a>
|
|
746
738
|
<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>
|
|
747
739
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -755,7 +747,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
755
747
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
756
748
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#_setIsDuplicatedVal">_setIsDuplicatedVal</a></p>
|
|
757
749
|
<ul>
|
|
758
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
750
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1385">src/data-structures/binary-tree/abstract-binary-tree.ts:1385</a></li></ul></aside></li></ul></section>
|
|
759
751
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setLoopType" class="tsd-anchor"></a>
|
|
760
752
|
<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>
|
|
761
753
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -769,7 +761,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
769
761
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
770
762
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#_setLoopType">_setLoopType</a></p>
|
|
771
763
|
<ul>
|
|
772
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
764
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1353">src/data-structures/binary-tree/abstract-binary-tree.ts:1353</a></li></ul></aside></li></ul></section>
|
|
773
765
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setMaxId" class="tsd-anchor"></a>
|
|
774
766
|
<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>
|
|
775
767
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -783,7 +775,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
783
775
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
784
776
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#_setMaxId">_setMaxId</a></p>
|
|
785
777
|
<ul>
|
|
786
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
778
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1381">src/data-structures/binary-tree/abstract-binary-tree.ts:1381</a></li></ul></aside></li></ul></section>
|
|
787
779
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setRoot" class="tsd-anchor"></a>
|
|
788
780
|
<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>
|
|
789
781
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -797,7 +789,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
797
789
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
798
790
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#_setRoot">_setRoot</a></p>
|
|
799
791
|
<ul>
|
|
800
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
792
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1389">src/data-structures/binary-tree/abstract-binary-tree.ts:1389</a></li></ul></aside></li></ul></section>
|
|
801
793
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setSize" class="tsd-anchor"></a>
|
|
802
794
|
<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>
|
|
803
795
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -811,7 +803,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
811
803
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
812
804
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#_setSize">_setSize</a></p>
|
|
813
805
|
<ul>
|
|
814
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
806
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1397">src/data-structures/binary-tree/abstract-binary-tree.ts:1397</a></li></ul></aside></li></ul></section>
|
|
815
807
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setVisitedId" class="tsd-anchor"></a>
|
|
816
808
|
<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>
|
|
817
809
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -825,7 +817,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
825
817
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
826
818
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#_setVisitedId">_setVisitedId</a></p>
|
|
827
819
|
<ul>
|
|
828
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
820
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1357">src/data-structures/binary-tree/abstract-binary-tree.ts:1357</a></li></ul></aside></li></ul></section>
|
|
829
821
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setVisitedLeftSum" class="tsd-anchor"></a>
|
|
830
822
|
<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>
|
|
831
823
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -839,7 +831,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
839
831
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
840
832
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#_setVisitedLeftSum">_setVisitedLeftSum</a></p>
|
|
841
833
|
<ul>
|
|
842
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
834
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1373">src/data-structures/binary-tree/abstract-binary-tree.ts:1373</a></li></ul></aside></li></ul></section>
|
|
843
835
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setVisitedNode" class="tsd-anchor"></a>
|
|
844
836
|
<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>
|
|
845
837
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -853,7 +845,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
853
845
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
854
846
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#_setVisitedNode">_setVisitedNode</a></p>
|
|
855
847
|
<ul>
|
|
856
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
848
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1365">src/data-structures/binary-tree/abstract-binary-tree.ts:1365</a></li></ul></aside></li></ul></section>
|
|
857
849
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setVisitedVal" class="tsd-anchor"></a>
|
|
858
850
|
<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>
|
|
859
851
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -867,7 +859,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
867
859
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
868
860
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#_setVisitedVal">_setVisitedVal</a></p>
|
|
869
861
|
<ul>
|
|
870
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
862
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1361">src/data-structures/binary-tree/abstract-binary-tree.ts:1361</a></li></ul></aside></li></ul></section>
|
|
871
863
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="add" class="tsd-anchor"></a>
|
|
872
864
|
<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>
|
|
873
865
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -900,9 +892,10 @@ value should be inserted into the binary tree. If not provided, it defaults to 1
|
|
|
900
892
|
is inserted, or <code>undefined</code> if the insertion fails.</p>
|
|
901
893
|
|
|
902
894
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
895
|
+
<p>Implementation of IBinaryTree.add</p>
|
|
903
896
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#add">add</a></p>
|
|
904
897
|
<ul>
|
|
905
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
898
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L289">src/data-structures/binary-tree/abstract-binary-tree.ts:289</a></li></ul></aside></li></ul></section>
|
|
906
899
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="addMany" class="tsd-anchor"></a>
|
|
907
900
|
<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>
|
|
908
901
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -923,37 +916,40 @@ array of <code>N</code> objects.</p>
|
|
|
923
916
|
<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>
|
|
924
917
|
|
|
925
918
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
919
|
+
<p>Implementation of IBinaryTree.addMany</p>
|
|
926
920
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#addMany">addMany</a></p>
|
|
927
921
|
<ul>
|
|
928
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
922
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L380">src/data-structures/binary-tree/abstract-binary-tree.ts:380</a></li></ul></aside></li></ul></section>
|
|
929
923
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="addTo" class="tsd-anchor"></a>
|
|
930
924
|
<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>
|
|
931
925
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
932
926
|
<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>
|
|
933
927
|
<li class="tsd-description">
|
|
934
|
-
<div class="tsd-comment tsd-typography"><p>The function
|
|
928
|
+
<div class="tsd-comment tsd-typography"><p>The function adds a new node to a binary tree as the left or right child of a given parent node.</p>
|
|
935
929
|
</div>
|
|
936
930
|
<div class="tsd-parameters">
|
|
937
931
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
938
932
|
<ul class="tsd-parameter-list">
|
|
939
933
|
<li>
|
|
940
934
|
<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>
|
|
941
|
-
<div class="tsd-comment tsd-typography"><p>The <code>newNode</code> parameter
|
|
942
|
-
<code>
|
|
935
|
+
<div class="tsd-comment tsd-typography"><p>The <code>newNode</code> parameter represents the node that you want to add to the tree. It can be
|
|
936
|
+
either a node object (<code>N</code>) or <code>null</code>.</p>
|
|
943
937
|
</div>
|
|
944
938
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
945
939
|
<li>
|
|
946
940
|
<h5><span class="tsd-kind-parameter">parent</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
947
|
-
<div class="tsd-comment tsd-typography"><p>The <code>parent</code> parameter
|
|
948
|
-
|
|
941
|
+
<div class="tsd-comment tsd-typography"><p>The <code>parent</code> parameter represents the parent node to which the new node will be added as a
|
|
942
|
+
child.</p>
|
|
949
943
|
</div>
|
|
950
944
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
951
|
-
<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>
|
|
945
|
+
<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>either the left or right child node that was added to the parent node. It can also return <code>null</code> or
|
|
946
|
+
<code>undefined</code> in certain cases.</p>
|
|
952
947
|
|
|
953
948
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
949
|
+
<p>Implementation of IBinaryTree.addTo</p>
|
|
954
950
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#addTo">addTo</a></p>
|
|
955
951
|
<ul>
|
|
956
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
952
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L340">src/data-structures/binary-tree/abstract-binary-tree.ts:340</a></li></ul></aside></li></ul></section>
|
|
957
953
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="clear" class="tsd-anchor"></a>
|
|
958
954
|
<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>
|
|
959
955
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -963,9 +959,46 @@ will be inserted as a child.</p>
|
|
|
963
959
|
</div>
|
|
964
960
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
965
961
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
962
|
+
<p>Implementation of IBinaryTree.clear</p>
|
|
966
963
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#clear">clear</a></p>
|
|
967
964
|
<ul>
|
|
968
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
965
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L263">src/data-structures/binary-tree/abstract-binary-tree.ts:263</a></li></ul></aside></li></ul></section>
|
|
966
|
+
<section class="tsd-panel tsd-member"><a id="createNode" class="tsd-anchor"></a>
|
|
967
|
+
<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>
|
|
968
|
+
<ul class="tsd-signatures">
|
|
969
|
+
<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-signature-symbol">?</span>, <span class="tsd-kind-parameter">count</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><a href="#createNode.createNode-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
970
|
+
<li class="tsd-description">
|
|
971
|
+
<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
|
|
972
|
+
it returns null.</p>
|
|
973
|
+
</div>
|
|
974
|
+
<div class="tsd-parameters">
|
|
975
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
976
|
+
<ul class="tsd-parameter-list">
|
|
977
|
+
<li>
|
|
978
|
+
<h5><span class="tsd-kind-parameter">id</span>: <span class="tsd-signature-type">number</span></h5>
|
|
979
|
+
<div class="tsd-comment tsd-typography"><p>The <code>id</code> parameter is the identifier for the binary tree node. It is of type
|
|
980
|
+
<code>BinaryTreeNodeId</code>.</p>
|
|
981
|
+
</div>
|
|
982
|
+
<div class="tsd-comment tsd-typography"></div></li>
|
|
983
|
+
<li>
|
|
984
|
+
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span></h5>
|
|
985
|
+
<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)
|
|
986
|
+
or <code>null</code>.</p>
|
|
987
|
+
</div>
|
|
988
|
+
<div class="tsd-comment tsd-typography"></div></li>
|
|
989
|
+
<li>
|
|
990
|
+
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">count</span>: <span class="tsd-signature-type">number</span></h5>
|
|
991
|
+
<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
|
|
992
|
+
of occurrences of the value in the binary tree node. If not provided, the default value is <code>undefined</code>.</p>
|
|
993
|
+
</div>
|
|
994
|
+
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
995
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h4><p>a BinaryTreeNode object if the value is not null, otherwise it returns null.</p>
|
|
996
|
+
|
|
997
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
998
|
+
<p>Implementation of IBinaryTree.createNode</p>
|
|
999
|
+
<p>Overrides <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#createNode">createNode</a></p>
|
|
1000
|
+
<ul>
|
|
1001
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/binary-tree.ts#L55">src/data-structures/binary-tree/binary-tree.ts:55</a></li></ul></aside></li></ul></section>
|
|
969
1002
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="fill" class="tsd-anchor"></a>
|
|
970
1003
|
<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>
|
|
971
1004
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -986,9 +1019,10 @@ array of <code>N</code> objects.</p>
|
|
|
986
1019
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>The method is returning a boolean value.</p>
|
|
987
1020
|
|
|
988
1021
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1022
|
+
<p>Implementation of IBinaryTree.fill</p>
|
|
989
1023
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#fill">fill</a></p>
|
|
990
1024
|
<ul>
|
|
991
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1025
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L441">src/data-structures/binary-tree/abstract-binary-tree.ts:441</a></li></ul></aside></li></ul></section>
|
|
992
1026
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="get" class="tsd-anchor"></a>
|
|
993
1027
|
<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>
|
|
994
1028
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1015,9 +1049,10 @@ specifies the property of the binary tree node to search for. If not provided, i
|
|
|
1015
1049
|
<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 or null.</p>
|
|
1016
1050
|
|
|
1017
1051
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1052
|
+
<p>Implementation of IBinaryTree.get</p>
|
|
1018
1053
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#get">get</a></p>
|
|
1019
1054
|
<ul>
|
|
1020
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1055
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L681">src/data-structures/binary-tree/abstract-binary-tree.ts:681</a></li></ul></aside></li></ul></section>
|
|
1021
1056
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getDepth" class="tsd-anchor"></a>
|
|
1022
1057
|
<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>
|
|
1023
1058
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1037,9 +1072,10 @@ meaning it can represent any type of data that we want to store in the node.</p>
|
|
|
1037
1072
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>The depth of the given binary tree node.</p>
|
|
1038
1073
|
|
|
1039
1074
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1075
|
+
<p>Implementation of IBinaryTree.getDepth</p>
|
|
1040
1076
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#getDepth">getDepth</a></p>
|
|
1041
1077
|
<ul>
|
|
1042
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1078
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L499">src/data-structures/binary-tree/abstract-binary-tree.ts:499</a></li></ul></aside></li></ul></section>
|
|
1043
1079
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getHeight" class="tsd-anchor"></a>
|
|
1044
1080
|
<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>
|
|
1045
1081
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1061,9 +1097,10 @@ If no value is provided for <code>beginRoot</code>, the function will use the <c
|
|
|
1061
1097
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>the height of the binary tree.</p>
|
|
1062
1098
|
|
|
1063
1099
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1100
|
+
<p>Implementation of IBinaryTree.getHeight</p>
|
|
1064
1101
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#getHeight">getHeight</a></p>
|
|
1065
1102
|
<ul>
|
|
1066
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1103
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L516">src/data-structures/binary-tree/abstract-binary-tree.ts:516</a></li></ul></aside></li></ul></section>
|
|
1067
1104
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getLeftMost" class="tsd-anchor"></a>
|
|
1068
1105
|
<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>
|
|
1069
1106
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1075,9 +1112,10 @@ recursion optimization.</p>
|
|
|
1075
1112
|
<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>
|
|
1076
1113
|
|
|
1077
1114
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1115
|
+
<p>Implementation of IBinaryTree.getLeftMost</p>
|
|
1078
1116
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#getLeftMost">getLeftMost</a></p>
|
|
1079
1117
|
<ul>
|
|
1080
|
-
<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/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L703">src/data-structures/binary-tree/abstract-binary-tree.ts:703</a></li></ul></aside></li>
|
|
1081
1119
|
<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>
|
|
1082
1120
|
<li class="tsd-description">
|
|
1083
1121
|
<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
|
|
@@ -1095,9 +1133,10 @@ provided, the function will use the root node of the binary tree.</p>
|
|
|
1095
1133
|
<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>
|
|
1096
1134
|
|
|
1097
1135
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1136
|
+
<p>Implementation of IBinaryTree.getLeftMost</p>
|
|
1098
1137
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#getLeftMost">getLeftMost</a></p>
|
|
1099
1138
|
<ul>
|
|
1100
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1139
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L705">src/data-structures/binary-tree/abstract-binary-tree.ts:705</a></li></ul></aside></li></ul></section>
|
|
1101
1140
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getMinHeight" class="tsd-anchor"></a>
|
|
1102
1141
|
<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>
|
|
1103
1142
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1119,13 +1158,14 @@ tree. If no value is provided for <code>beginRoot</code>, the function will use
|
|
|
1119
1158
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>The function <code>getMinHeight</code> returns the minimum height of the binary tree.</p>
|
|
1120
1159
|
|
|
1121
1160
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1161
|
+
<p>Implementation of IBinaryTree.getMinHeight</p>
|
|
1122
1162
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#getMinHeight">getMinHeight</a></p>
|
|
1123
1163
|
<ul>
|
|
1124
|
-
<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/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L565">src/data-structures/binary-tree/abstract-binary-tree.ts:565</a></li></ul></aside></li></ul></section>
|
|
1125
1165
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getNodes" class="tsd-anchor"></a>
|
|
1126
1166
|
<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>
|
|
1127
1167
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
1128
|
-
<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-
|
|
1168
|
+
<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>
|
|
1129
1169
|
<li class="tsd-description">
|
|
1130
1170
|
<div class="tsd-comment tsd-typography"><p>The function <code>getNodes</code> returns an array of binary tree nodes that match a given property value, with options for
|
|
1131
1171
|
searching recursively or iteratively.</p>
|
|
@@ -1152,11 +1192,12 @@ return only one node that matches the <code>nodeProperty</code> or <code>propert
|
|
|
1152
1192
|
function will stop traversing the tree and return the first matching node. If <code>@returns The function</code>getNodes<code>returns an array of</code>N | null | undefined` objects.</p>
|
|
1153
1193
|
</div>
|
|
1154
1194
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1155
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-
|
|
1195
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4>
|
|
1156
1196
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1197
|
+
<p>Implementation of IBinaryTree.getNodes</p>
|
|
1157
1198
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#getNodes">getNodes</a></p>
|
|
1158
1199
|
<ul>
|
|
1159
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1200
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L629">src/data-structures/binary-tree/abstract-binary-tree.ts:629</a></li></ul></aside></li></ul></section>
|
|
1160
1201
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getPathToRoot" class="tsd-anchor"></a>
|
|
1161
1202
|
<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>
|
|
1162
1203
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1177,9 +1218,10 @@ root of a binary tree.</p>
|
|
|
1177
1218
|
the given <code>node</code> to the root of the binary tree.</p>
|
|
1178
1219
|
|
|
1179
1220
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1221
|
+
<p>Implementation of IBinaryTree.getPathToRoot</p>
|
|
1180
1222
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#getPathToRoot">getPathToRoot</a></p>
|
|
1181
1223
|
<ul>
|
|
1182
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1224
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L693">src/data-structures/binary-tree/abstract-binary-tree.ts:693</a></li></ul></aside></li></ul></section>
|
|
1183
1225
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getPredecessor" class="tsd-anchor"></a>
|
|
1184
1226
|
<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>
|
|
1185
1227
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1198,9 +1240,10 @@ the given <code>node</code> to the root of the binary tree.</p>
|
|
|
1198
1240
|
<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>
|
|
1199
1241
|
|
|
1200
1242
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1243
|
+
<p>Implementation of IBinaryTree.getPredecessor</p>
|
|
1201
1244
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#getPredecessor">getPredecessor</a></p>
|
|
1202
1245
|
<ul>
|
|
1203
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1246
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1231">src/data-structures/binary-tree/abstract-binary-tree.ts:1231</a></li></ul></aside></li></ul></section>
|
|
1204
1247
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getRightMost" class="tsd-anchor"></a>
|
|
1205
1248
|
<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>
|
|
1206
1249
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1212,9 +1255,10 @@ tail recursion optimization.</p>
|
|
|
1212
1255
|
<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>
|
|
1213
1256
|
|
|
1214
1257
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1258
|
+
<p>Implementation of IBinaryTree.getRightMost</p>
|
|
1215
1259
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#getRightMost">getRightMost</a></p>
|
|
1216
1260
|
<ul>
|
|
1217
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1261
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L738">src/data-structures/binary-tree/abstract-binary-tree.ts:738</a></li></ul></aside></li>
|
|
1218
1262
|
<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>
|
|
1219
1263
|
<li class="tsd-description">
|
|
1220
1264
|
<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
|
|
@@ -1232,9 +1276,10 @@ provided, the function will use the root node of the binary tree.</p>
|
|
|
1232
1276
|
<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>
|
|
1233
1277
|
|
|
1234
1278
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1279
|
+
<p>Implementation of IBinaryTree.getRightMost</p>
|
|
1235
1280
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#getRightMost">getRightMost</a></p>
|
|
1236
1281
|
<ul>
|
|
1237
|
-
<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/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L740">src/data-structures/binary-tree/abstract-binary-tree.ts:740</a></li></ul></aside></li></ul></section>
|
|
1238
1283
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getSubTreeSizeAndCount" class="tsd-anchor"></a>
|
|
1239
1284
|
<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>
|
|
1240
1285
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1256,9 +1301,10 @@ tree.</p>
|
|
|
1256
1301
|
represents the size of the subtree, and the second element represents the count of the nodes in the subtree.</p>
|
|
1257
1302
|
|
|
1258
1303
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1304
|
+
<p>Implementation of IBinaryTree.getSubTreeSizeAndCount</p>
|
|
1259
1305
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#getSubTreeSizeAndCount">getSubTreeSizeAndCount</a></p>
|
|
1260
1306
|
<ul>
|
|
1261
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1307
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L825">src/data-structures/binary-tree/abstract-binary-tree.ts:825</a></li></ul></aside></li></ul></section>
|
|
1262
1308
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="has" class="tsd-anchor"></a>
|
|
1263
1309
|
<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>
|
|
1264
1310
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1285,32 +1331,55 @@ specifies the name of the property to check for in the nodes.</p>
|
|
|
1285
1331
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>a boolean value.</p>
|
|
1286
1332
|
|
|
1287
1333
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1334
|
+
<p>Implementation of IBinaryTree.has</p>
|
|
1288
1335
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#has">has</a></p>
|
|
1289
1336
|
<ul>
|
|
1290
|
-
<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/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L668">src/data-structures/binary-tree/abstract-binary-tree.ts:668</a></li></ul></aside></li></ul></section>
|
|
1291
1338
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="isBST" class="tsd-anchor"></a>
|
|
1292
1339
|
<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>
|
|
1293
1340
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
1294
1341
|
<li class="tsd-signature tsd-anchor-link" id="isBST.isBST-1"><span class="tsd-kind-call-signature">isBST</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-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#isBST.isBST-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1295
1342
|
<li class="tsd-description">
|
|
1296
|
-
<div class="tsd-comment tsd-typography"><p>The
|
|
1343
|
+
<div class="tsd-comment tsd-typography"><p>The function checks if a binary tree is a binary search tree.</p>
|
|
1297
1344
|
</div>
|
|
1298
1345
|
<div class="tsd-parameters">
|
|
1299
1346
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1300
1347
|
<ul class="tsd-parameter-list">
|
|
1301
1348
|
<li>
|
|
1302
1349
|
<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>
|
|
1303
|
-
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is
|
|
1304
|
-
|
|
1350
|
+
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is of type <code>N</code> or <code>null</code>. It represents the root node of a binary
|
|
1351
|
+
search tree (BST).</p>
|
|
1305
1352
|
</div>
|
|
1306
1353
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1307
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>
|
|
1308
|
-
tree, and <code>false</code> otherwise.</p>
|
|
1354
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>a boolean value.</p>
|
|
1309
1355
|
|
|
1310
1356
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1357
|
+
<p>Implementation of IBinaryTree.isBST</p>
|
|
1311
1358
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#isBST">isBST</a></p>
|
|
1312
1359
|
<ul>
|
|
1313
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1360
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L813">src/data-structures/binary-tree/abstract-binary-tree.ts:813</a></li></ul></aside></li></ul></section>
|
|
1361
|
+
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="isBSTByRooted" class="tsd-anchor"></a>
|
|
1362
|
+
<h3 class="tsd-anchor-link"><span>isBSTBy<wbr/>Rooted</span><a href="#isBSTByRooted" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1363
|
+
<ul class="tsd-signatures tsd-is-inherited">
|
|
1364
|
+
<li class="tsd-signature tsd-anchor-link" id="isBSTByRooted.isBSTByRooted-1"><span class="tsd-kind-call-signature">isBSTBy<wbr/>Rooted</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">boolean</span><a href="#isBSTByRooted.isBSTByRooted-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1365
|
+
<li class="tsd-description">
|
|
1366
|
+
<div class="tsd-comment tsd-typography"><p>The function <code>isBSTByRooted</code> checks if a binary tree is a binary search tree (BST) by rooted traversal.</p>
|
|
1367
|
+
</div>
|
|
1368
|
+
<div class="tsd-parameters">
|
|
1369
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1370
|
+
<ul class="tsd-parameter-list">
|
|
1371
|
+
<li>
|
|
1372
|
+
<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>
|
|
1373
|
+
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter represents the root node of a binary search tree (BST).</p>
|
|
1374
|
+
</div>
|
|
1375
|
+
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1376
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>a boolean value.</p>
|
|
1377
|
+
|
|
1378
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1379
|
+
<p>Implementation of IBinaryTree.isBSTByRooted</p>
|
|
1380
|
+
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#isBSTByRooted">isBSTByRooted</a></p>
|
|
1381
|
+
<ul>
|
|
1382
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L778">src/data-structures/binary-tree/abstract-binary-tree.ts:778</a></li></ul></aside></li></ul></section>
|
|
1314
1383
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="isBalanced" class="tsd-anchor"></a>
|
|
1315
1384
|
<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>
|
|
1316
1385
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1330,9 +1399,10 @@ of type <code>N | null</code>, which means it can either be a <code>BinaryTreeNo
|
|
|
1330
1399
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>The method is returning a boolean value.</p>
|
|
1331
1400
|
|
|
1332
1401
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1402
|
+
<p>Implementation of IBinaryTree.isBalanced</p>
|
|
1333
1403
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#isBalanced">isBalanced</a></p>
|
|
1334
1404
|
<ul>
|
|
1335
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1405
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L613">src/data-structures/binary-tree/abstract-binary-tree.ts:613</a></li></ul></aside></li></ul></section>
|
|
1336
1406
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="isEmpty" class="tsd-anchor"></a>
|
|
1337
1407
|
<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>
|
|
1338
1408
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1343,9 +1413,10 @@ of type <code>N | null</code>, which means it can either be a <code>BinaryTreeNo
|
|
|
1343
1413
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>A boolean value indicating whether the size of the object is 0 or not.</p>
|
|
1344
1414
|
|
|
1345
1415
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1416
|
+
<p>Implementation of IBinaryTree.isEmpty</p>
|
|
1346
1417
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#isEmpty">isEmpty</a></p>
|
|
1347
1418
|
<ul>
|
|
1348
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1419
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L274">src/data-structures/binary-tree/abstract-binary-tree.ts:274</a></li></ul></aside></li></ul></section>
|
|
1349
1420
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="levelIterative" class="tsd-anchor"></a>
|
|
1350
1421
|
<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>
|
|
1351
1422
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1364,12 +1435,13 @@ node for the level order traversal. It can be null if no specific node is provid
|
|
|
1364
1435
|
the tree is used as the starting node.</p>
|
|
1365
1436
|
</div>
|
|
1366
1437
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1367
|
-
<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>
|
|
1438
|
+
<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>AbstractBinaryTreeNodeProperties<N></code>.</p>
|
|
1368
1439
|
|
|
1369
1440
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1441
|
+
<p>Implementation of IBinaryTree.levelIterative</p>
|
|
1370
1442
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#levelIterative">levelIterative</a></p>
|
|
1371
1443
|
<ul>
|
|
1372
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1444
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1108">src/data-structures/binary-tree/abstract-binary-tree.ts:1108</a></li></ul></aside></li>
|
|
1373
1445
|
<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>
|
|
1374
1446
|
<li class="tsd-description">
|
|
1375
1447
|
<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
|
|
@@ -1393,12 +1465,13 @@ will accumulate results based on that property. If no property name is provided,
|
|
|
1393
1465
|
accumulating results</p>
|
|
1394
1466
|
</div>
|
|
1395
1467
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1396
|
-
<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>
|
|
1468
|
+
<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>AbstractBinaryTreeNodeProperties<N></code>.</p>
|
|
1397
1469
|
|
|
1398
1470
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1471
|
+
<p>Implementation of IBinaryTree.levelIterative</p>
|
|
1399
1472
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#levelIterative">levelIterative</a></p>
|
|
1400
1473
|
<ul>
|
|
1401
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1474
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1110">src/data-structures/binary-tree/abstract-binary-tree.ts:1110</a></li></ul></aside></li>
|
|
1402
1475
|
<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>
|
|
1403
1476
|
<li class="tsd-description">
|
|
1404
1477
|
<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
|
|
@@ -1422,12 +1495,13 @@ will accumulate results based on that property. If no property name is provided,
|
|
|
1422
1495
|
accumulating results</p>
|
|
1423
1496
|
</div>
|
|
1424
1497
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1425
|
-
<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>
|
|
1498
|
+
<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>AbstractBinaryTreeNodeProperties<N></code>.</p>
|
|
1426
1499
|
|
|
1427
1500
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1501
|
+
<p>Implementation of IBinaryTree.levelIterative</p>
|
|
1428
1502
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#levelIterative">levelIterative</a></p>
|
|
1429
1503
|
<ul>
|
|
1430
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1504
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1112">src/data-structures/binary-tree/abstract-binary-tree.ts:1112</a></li></ul></aside></li>
|
|
1431
1505
|
<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>
|
|
1432
1506
|
<li class="tsd-description">
|
|
1433
1507
|
<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
|
|
@@ -1451,12 +1525,13 @@ will accumulate results based on that property. If no property name is provided,
|
|
|
1451
1525
|
accumulating results</p>
|
|
1452
1526
|
</div>
|
|
1453
1527
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1454
|
-
<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>
|
|
1528
|
+
<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>AbstractBinaryTreeNodeProperties<N></code>.</p>
|
|
1455
1529
|
|
|
1456
1530
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1531
|
+
<p>Implementation of IBinaryTree.levelIterative</p>
|
|
1457
1532
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#levelIterative">levelIterative</a></p>
|
|
1458
1533
|
<ul>
|
|
1459
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1534
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1114">src/data-structures/binary-tree/abstract-binary-tree.ts:1114</a></li></ul></aside></li>
|
|
1460
1535
|
<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>
|
|
1461
1536
|
<li class="tsd-description">
|
|
1462
1537
|
<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
|
|
@@ -1480,12 +1555,13 @@ will accumulate results based on that property. If no property name is provided,
|
|
|
1480
1555
|
accumulating results</p>
|
|
1481
1556
|
</div>
|
|
1482
1557
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1483
|
-
<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>
|
|
1558
|
+
<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>AbstractBinaryTreeNodeProperties<N></code>.</p>
|
|
1484
1559
|
|
|
1485
1560
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1561
|
+
<p>Implementation of IBinaryTree.levelIterative</p>
|
|
1486
1562
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#levelIterative">levelIterative</a></p>
|
|
1487
1563
|
<ul>
|
|
1488
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1564
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1116">src/data-structures/binary-tree/abstract-binary-tree.ts:1116</a></li></ul></aside></li></ul></section>
|
|
1489
1565
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="listLevels" class="tsd-anchor"></a>
|
|
1490
1566
|
<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>
|
|
1491
1567
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1502,12 +1578,13 @@ accumulating results</p>
|
|
|
1502
1578
|
root node of a binary tree. If it is null, the function will use the root node of the current binary tree instance.</p>
|
|
1503
1579
|
</div>
|
|
1504
1580
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1505
|
-
<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>
|
|
1581
|
+
<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>AbstractBinaryTreeNodeProperty<N></code> objects.</p>
|
|
1506
1582
|
|
|
1507
1583
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1584
|
+
<p>Implementation of IBinaryTree.listLevels</p>
|
|
1508
1585
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#listLevels">listLevels</a></p>
|
|
1509
1586
|
<ul>
|
|
1510
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1587
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1154">src/data-structures/binary-tree/abstract-binary-tree.ts:1154</a></li></ul></aside></li>
|
|
1511
1588
|
<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>
|
|
1512
1589
|
<li class="tsd-description">
|
|
1513
1590
|
<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>
|
|
@@ -1528,12 +1605,13 @@ specifies the property of the <code>BinaryTreeNode</code> object to collect at e
|
|
|
1528
1605
|
values:</p>
|
|
1529
1606
|
</div>
|
|
1530
1607
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1531
|
-
<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>
|
|
1608
|
+
<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>AbstractBinaryTreeNodeProperty<N></code> objects.</p>
|
|
1532
1609
|
|
|
1533
1610
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1611
|
+
<p>Implementation of IBinaryTree.listLevels</p>
|
|
1534
1612
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#listLevels">listLevels</a></p>
|
|
1535
1613
|
<ul>
|
|
1536
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1614
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1156">src/data-structures/binary-tree/abstract-binary-tree.ts:1156</a></li></ul></aside></li>
|
|
1537
1615
|
<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>
|
|
1538
1616
|
<li class="tsd-description">
|
|
1539
1617
|
<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>
|
|
@@ -1554,12 +1632,13 @@ specifies the property of the <code>BinaryTreeNode</code> object to collect at e
|
|
|
1554
1632
|
values:</p>
|
|
1555
1633
|
</div>
|
|
1556
1634
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1557
|
-
<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>
|
|
1635
|
+
<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>AbstractBinaryTreeNodeProperty<N></code> objects.</p>
|
|
1558
1636
|
|
|
1559
1637
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1638
|
+
<p>Implementation of IBinaryTree.listLevels</p>
|
|
1560
1639
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#listLevels">listLevels</a></p>
|
|
1561
1640
|
<ul>
|
|
1562
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1641
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1158">src/data-structures/binary-tree/abstract-binary-tree.ts:1158</a></li></ul></aside></li>
|
|
1563
1642
|
<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>
|
|
1564
1643
|
<li class="tsd-description">
|
|
1565
1644
|
<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>
|
|
@@ -1580,12 +1659,13 @@ specifies the property of the <code>BinaryTreeNode</code> object to collect at e
|
|
|
1580
1659
|
values:</p>
|
|
1581
1660
|
</div>
|
|
1582
1661
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
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-symbol">[]</span></h4><p>The function <code>listLevels</code> returns a 2D array of <code>
|
|
1662
|
+
<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>AbstractBinaryTreeNodeProperty<N></code> objects.</p>
|
|
1584
1663
|
|
|
1585
1664
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1665
|
+
<p>Implementation of IBinaryTree.listLevels</p>
|
|
1586
1666
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#listLevels">listLevels</a></p>
|
|
1587
1667
|
<ul>
|
|
1588
|
-
<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/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1160">src/data-structures/binary-tree/abstract-binary-tree.ts:1160</a></li></ul></aside></li>
|
|
1589
1669
|
<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>
|
|
1590
1670
|
<li class="tsd-description">
|
|
1591
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>
|
|
@@ -1606,12 +1686,13 @@ specifies the property of the <code>BinaryTreeNode</code> object to collect at e
|
|
|
1606
1686
|
values:</p>
|
|
1607
1687
|
</div>
|
|
1608
1688
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1609
|
-
<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>
|
|
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>AbstractBinaryTreeNodeProperty<N></code> objects.</p>
|
|
1610
1690
|
|
|
1611
1691
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1692
|
+
<p>Implementation of IBinaryTree.listLevels</p>
|
|
1612
1693
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#listLevels">listLevels</a></p>
|
|
1613
1694
|
<ul>
|
|
1614
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1695
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1162">src/data-structures/binary-tree/abstract-binary-tree.ts:1162</a></li></ul></aside></li></ul></section>
|
|
1615
1696
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="morris" class="tsd-anchor"></a>
|
|
1616
1697
|
<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>
|
|
1617
1698
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1622,12 +1703,13 @@ traversal algorithm and returns the results based on the specified property name
|
|
|
1622
1703
|
The time complexity of Morris traversal is O(n), it's may slower than others
|
|
1623
1704
|
The space complexity Morris traversal is O(1) because no using stack</p>
|
|
1624
1705
|
</div>
|
|
1625
|
-
<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>
|
|
1706
|
+
<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>AbstractBinaryTreeNodeProperties<N></code>.</p>
|
|
1626
1707
|
|
|
1627
1708
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1709
|
+
<p>Implementation of IBinaryTree.morris</p>
|
|
1628
1710
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#morris">morris</a></p>
|
|
1629
1711
|
<ul>
|
|
1630
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1712
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1245">src/data-structures/binary-tree/abstract-binary-tree.ts:1245</a></li></ul></aside></li>
|
|
1631
1713
|
<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>
|
|
1632
1714
|
<li class="tsd-description">
|
|
1633
1715
|
<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
|
|
@@ -1651,12 +1733,13 @@ property of the nodes that you want to retrieve in the results. It can be either
|
|
|
1651
1733
|
property. If not provided, it defaults to <code>'id'</code>.</p>
|
|
1652
1734
|
</div>
|
|
1653
1735
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1654
|
-
<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>
|
|
1736
|
+
<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>AbstractBinaryTreeNodeProperties<N></code>.</p>
|
|
1655
1737
|
|
|
1656
1738
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1739
|
+
<p>Implementation of IBinaryTree.morris</p>
|
|
1657
1740
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#morris">morris</a></p>
|
|
1658
1741
|
<ul>
|
|
1659
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1742
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1247">src/data-structures/binary-tree/abstract-binary-tree.ts:1247</a></li></ul></aside></li>
|
|
1660
1743
|
<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>
|
|
1661
1744
|
<li class="tsd-description">
|
|
1662
1745
|
<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
|
|
@@ -1680,12 +1763,13 @@ property of the nodes that you want to retrieve in the results. It can be either
|
|
|
1680
1763
|
property. If not provided, it defaults to <code>'id'</code>.</p>
|
|
1681
1764
|
</div>
|
|
1682
1765
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1683
|
-
<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>
|
|
1766
|
+
<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>AbstractBinaryTreeNodeProperties<N></code>.</p>
|
|
1684
1767
|
|
|
1685
1768
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1769
|
+
<p>Implementation of IBinaryTree.morris</p>
|
|
1686
1770
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#morris">morris</a></p>
|
|
1687
1771
|
<ul>
|
|
1688
|
-
<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/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1249">src/data-structures/binary-tree/abstract-binary-tree.ts:1249</a></li></ul></aside></li>
|
|
1689
1773
|
<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>
|
|
1690
1774
|
<li class="tsd-description">
|
|
1691
1775
|
<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
|
|
@@ -1709,12 +1793,13 @@ property of the nodes that you want to retrieve in the results. It can be either
|
|
|
1709
1793
|
property. If not provided, it defaults to <code>'id'</code>.</p>
|
|
1710
1794
|
</div>
|
|
1711
1795
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1712
|
-
<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>
|
|
1796
|
+
<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>AbstractBinaryTreeNodeProperties<N></code>.</p>
|
|
1713
1797
|
|
|
1714
1798
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1799
|
+
<p>Implementation of IBinaryTree.morris</p>
|
|
1715
1800
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#morris">morris</a></p>
|
|
1716
1801
|
<ul>
|
|
1717
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1802
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1251">src/data-structures/binary-tree/abstract-binary-tree.ts:1251</a></li></ul></aside></li>
|
|
1718
1803
|
<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>
|
|
1719
1804
|
<li class="tsd-description">
|
|
1720
1805
|
<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
|
|
@@ -1738,12 +1823,13 @@ property of the nodes that you want to retrieve in the results. It can be either
|
|
|
1738
1823
|
property. If not provided, it defaults to <code>'id'</code>.</p>
|
|
1739
1824
|
</div>
|
|
1740
1825
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1741
|
-
<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>
|
|
1826
|
+
<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>AbstractBinaryTreeNodeProperties<N></code>.</p>
|
|
1742
1827
|
|
|
1743
1828
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1829
|
+
<p>Implementation of IBinaryTree.morris</p>
|
|
1744
1830
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#morris">morris</a></p>
|
|
1745
1831
|
<ul>
|
|
1746
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1832
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1253">src/data-structures/binary-tree/abstract-binary-tree.ts:1253</a></li></ul></aside></li></ul></section>
|
|
1747
1833
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="remove" class="tsd-anchor"></a>
|
|
1748
1834
|
<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>
|
|
1749
1835
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1772,9 +1858,10 @@ not be decremented and the overall count of the binary tree will not be updated.
|
|
|
1772
1858
|
"needBalanced" property is always null.</p>
|
|
1773
1859
|
|
|
1774
1860
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1861
|
+
<p>Implementation of IBinaryTree.remove</p>
|
|
1775
1862
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#remove">remove</a></p>
|
|
1776
1863
|
<ul>
|
|
1777
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1864
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L457">src/data-structures/binary-tree/abstract-binary-tree.ts:457</a></li></ul></aside></li></ul></section>
|
|
1778
1865
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="setVisitedCount" class="tsd-anchor"></a>
|
|
1779
1866
|
<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>
|
|
1780
1867
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -1788,7 +1875,7 @@ not be decremented and the overall count of the binary tree will not be updated.
|
|
|
1788
1875
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
1789
1876
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#setVisitedCount">setVisitedCount</a></p>
|
|
1790
1877
|
<ul>
|
|
1791
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1878
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1369">src/data-structures/binary-tree/abstract-binary-tree.ts:1369</a></li></ul></aside></li></ul></section>
|
|
1792
1879
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="subTreeAdd" class="tsd-anchor"></a>
|
|
1793
1880
|
<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>
|
|
1794
1881
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1819,9 +1906,10 @@ specifies the property of the <code>BinaryTreeNode</code> that should be modifie
|
|
|
1819
1906
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>a boolean value, which is <code>true</code>.</p>
|
|
1820
1907
|
|
|
1821
1908
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1909
|
+
<p>Implementation of IBinaryTree.subTreeAdd</p>
|
|
1822
1910
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#subTreeAdd">subTreeAdd</a></p>
|
|
1823
1911
|
<ul>
|
|
1824
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1912
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L922">src/data-structures/binary-tree/abstract-binary-tree.ts:922</a></li></ul></aside></li></ul></section>
|
|
1825
1913
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="subTreeSum" class="tsd-anchor"></a>
|
|
1826
1914
|
<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>
|
|
1827
1915
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1849,9 +1937,10 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
1849
1937
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>a number, which is the sum of the values of the nodes in the subtree rooted at <code>subTreeRoot</code>.</p>
|
|
1850
1938
|
|
|
1851
1939
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1940
|
+
<p>Implementation of IBinaryTree.subTreeSum</p>
|
|
1852
1941
|
<p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#subTreeSum">subTreeSum</a></p>
|
|
1853
1942
|
<ul>
|
|
1854
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1943
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L866">src/data-structures/binary-tree/abstract-binary-tree.ts:866</a></li></ul></aside></li></ul></section></section></div>
|
|
1855
1944
|
<div class="col-sidebar">
|
|
1856
1945
|
<div class="page-menu">
|
|
1857
1946
|
<div class="tsd-navigation settings">
|
|
@@ -1888,7 +1977,6 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
1888
1977
|
<li><a href="#DFS" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>DFS</span></a></li>
|
|
1889
1978
|
<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>
|
|
1890
1979
|
<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>
|
|
1891
|
-
<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>
|
|
1892
1980
|
<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>
|
|
1893
1981
|
<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>
|
|
1894
1982
|
<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>
|
|
@@ -1907,6 +1995,7 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
1907
1995
|
<li><a href="#addMany" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>add<wbr/>Many</span></a></li>
|
|
1908
1996
|
<li><a href="#addTo" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>add<wbr/>To</span></a></li>
|
|
1909
1997
|
<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>
|
|
1998
|
+
<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>
|
|
1910
1999
|
<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>
|
|
1911
2000
|
<li><a href="#get" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get</span></a></li>
|
|
1912
2001
|
<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>
|
|
@@ -1920,6 +2009,7 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
1920
2009
|
<li><a href="#getSubTreeSizeAndCount" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Sub<wbr/>Tree<wbr/>Size<wbr/>And<wbr/>Count</span></a></li>
|
|
1921
2010
|
<li><a href="#has" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>has</span></a></li>
|
|
1922
2011
|
<li><a href="#isBST" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>isBST</span></a></li>
|
|
2012
|
+
<li><a href="#isBSTByRooted" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>isBSTBy<wbr/>Rooted</span></a></li>
|
|
1923
2013
|
<li><a href="#isBalanced" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>is<wbr/>Balanced</span></a></li>
|
|
1924
2014
|
<li><a href="#isEmpty" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>is<wbr/>Empty</span></a></li>
|
|
1925
2015
|
<li><a href="#levelIterative" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>level<wbr/>Iterative</span></a></li>
|
|
@@ -1975,6 +2065,8 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
1975
2065
|
<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>
|
|
1976
2066
|
<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>
|
|
1977
2067
|
<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>
|
|
2068
|
+
<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>
|
|
2069
|
+
<li><a href="RBTreeNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>RBTree<wbr/>Node</span></a></li>
|
|
1978
2070
|
<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>
|
|
1979
2071
|
<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>
|
|
1980
2072
|
<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>
|
|
@@ -1994,16 +2086,20 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
1994
2086
|
<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>
|
|
1995
2087
|
<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>
|
|
1996
2088
|
<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>
|
|
1997
|
-
<li><a href="../interfaces/
|
|
1998
|
-
<li><a href="../interfaces/
|
|
2089
|
+
<li><a href="../interfaces/IAVLTree.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>IAVLTree</span></a></li>
|
|
2090
|
+
<li><a href="../interfaces/IAVLTreeNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>IAVLTree<wbr/>Node</span></a></li>
|
|
2091
|
+
<li><a href="../interfaces/IAbstractBinaryTree.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>IAbstract<wbr/>Binary<wbr/>Tree</span></a></li>
|
|
2092
|
+
<li><a href="../interfaces/IAbstractBinaryTreeNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>IAbstract<wbr/>Binary<wbr/>Tree<wbr/>Node</span></a></li>
|
|
2093
|
+
<li><a href="../interfaces/IAbstractGraph.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>IAbstract<wbr/>Graph</span></a></li>
|
|
2094
|
+
<li><a href="../interfaces/IBST.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>IBST</span></a></li>
|
|
2095
|
+
<li><a href="../interfaces/IBSTNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>IBSTNode</span></a></li>
|
|
1999
2096
|
<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>
|
|
2000
|
-
<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>
|
|
2001
2097
|
<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>
|
|
2002
2098
|
<li><a href="../types/AVLTreeOptions.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-4194304"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)"></path></g></svg><span>AVLTree<wbr/>Options</span></a></li>
|
|
2099
|
+
<li><a href="../types/AbstractBinaryTreeNodeProperties.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Abstract<wbr/>Binary<wbr/>Tree<wbr/>Node<wbr/>Properties</span></a></li>
|
|
2100
|
+
<li><a href="../types/AbstractBinaryTreeNodeProperty.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Abstract<wbr/>Binary<wbr/>Tree<wbr/>Node<wbr/>Property</span></a></li>
|
|
2003
2101
|
<li><a href="../types/AbstractBinaryTreeOptions.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Abstract<wbr/>Binary<wbr/>Tree<wbr/>Options</span></a></li>
|
|
2004
2102
|
<li><a href="../types/AbstractRecursiveBinaryTreeNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Abstract<wbr/>Recursive<wbr/>Binary<wbr/>Tree<wbr/>Node</span></a></li>
|
|
2005
|
-
<li><a href="../types/AbstractResultByProperty.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Abstract<wbr/>Result<wbr/>By<wbr/>Property</span></a></li>
|
|
2006
|
-
<li><a href="../types/AbstractResultsByProperty.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Abstract<wbr/>Results<wbr/>By<wbr/>Property</span></a></li>
|
|
2007
2103
|
<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>
|
|
2008
2104
|
<li><a href="../types/BSTOptions.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>BSTOptions</span></a></li>
|
|
2009
2105
|
<li><a href="../types/BinaryTreeDeletedResult.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Binary<wbr/>Tree<wbr/>Deleted<wbr/>Result</span></a></li>
|