data-structure-typed 1.16.1 → 1.17.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/data-structures/linked-list/doubly-linked-list.d.ts +178 -70
- package/dist/data-structures/linked-list/doubly-linked-list.js +475 -244
- package/dist/data-structures/linked-list/index.d.ts +1 -0
- package/dist/data-structures/linked-list/index.js +1 -0
- package/dist/data-structures/linked-list/singly-linked-list.d.ts +111 -248
- package/dist/data-structures/linked-list/singly-linked-list.js +338 -619
- package/dist/data-structures/linked-list/skip-linked-list.d.ts +2 -1
- package/dist/data-structures/linked-list/skip-linked-list.js +7 -0
- package/dist/data-structures/matrix/vector2d.js +2 -2
- package/dist/data-structures/types/binary-tree.d.ts +0 -5
- package/docs/assets/search.js +1 -1
- package/docs/classes/AVLTree.html +94 -94
- package/docs/classes/AVLTreeNode.html +37 -37
- package/docs/classes/AaTree.html +2 -2
- package/docs/classes/AbstractEdge.html +12 -12
- package/docs/classes/AbstractGraph.html +30 -30
- package/docs/classes/AbstractVertex.html +7 -7
- package/docs/classes/ArrayDeque.html +15 -15
- package/docs/classes/BST.html +87 -87
- package/docs/classes/BSTNode.html +37 -37
- package/docs/classes/BTree.html +2 -2
- package/docs/classes/BinaryIndexedTree.html +8 -8
- package/docs/classes/BinaryTree.html +83 -83
- package/docs/classes/BinaryTreeNode.html +37 -37
- package/docs/classes/Character.html +5 -5
- package/docs/classes/CoordinateMap.html +11 -11
- package/docs/classes/CoordinateSet.html +10 -10
- package/docs/classes/Deque.html +564 -356
- package/docs/classes/DirectedEdge.html +18 -18
- package/docs/classes/DirectedGraph.html +42 -42
- package/docs/classes/DirectedVertex.html +7 -7
- package/docs/classes/DoublyLinkedList.html +546 -313
- package/docs/classes/DoublyLinkedListNode.html +53 -36
- package/docs/classes/Heap.html +21 -21
- package/docs/classes/HeapItem.html +9 -9
- package/docs/classes/Matrix2D.html +17 -17
- package/docs/classes/MatrixNTI2D.html +5 -5
- package/docs/classes/MaxHeap.html +21 -21
- package/docs/classes/MaxPriorityQueue.html +35 -35
- package/docs/classes/MinHeap.html +21 -21
- package/docs/classes/MinPriorityQueue.html +35 -35
- package/docs/classes/Navigator.html +11 -11
- package/docs/classes/ObjectDeque.html +26 -26
- package/docs/classes/PriorityQueue.html +33 -33
- package/docs/classes/Queue.html +15 -15
- package/docs/classes/RBTree.html +2 -2
- package/docs/classes/SegmentTree.html +13 -13
- package/docs/classes/SegmentTreeNode.html +27 -27
- package/docs/classes/SinglyLinkedList.html +277 -606
- package/docs/classes/SinglyLinkedListNode.html +40 -167
- package/docs/classes/SkipLinkedList.html +150 -0
- package/docs/classes/SplayTree.html +2 -2
- package/docs/classes/Stack.html +13 -13
- package/docs/classes/TreeMultiSet.html +87 -87
- package/docs/classes/TreeNode.html +9 -9
- package/docs/classes/Trie.html +14 -14
- package/docs/classes/TrieNode.html +12 -12
- package/docs/classes/TwoThreeTree.html +2 -2
- package/docs/classes/UndirectedEdge.html +14 -14
- package/docs/classes/UndirectedGraph.html +36 -36
- package/docs/classes/UndirectedVertex.html +7 -7
- package/docs/classes/Vector2D.html +29 -29
- package/docs/enums/CP.html +5 -5
- package/docs/enums/FamilyPosition.html +5 -5
- package/docs/enums/LoopType.html +4 -4
- package/docs/index.html +3 -3
- package/docs/interfaces/AVLTreeDeleted.html +4 -4
- package/docs/interfaces/HeapOptions.html +3 -3
- package/docs/interfaces/IDirectedGraph.html +8 -8
- package/docs/interfaces/IGraph.html +20 -20
- package/docs/interfaces/NavigatorParams.html +6 -6
- package/docs/interfaces/PriorityQueueOptions.html +5 -5
- package/docs/modules.html +2 -2
- package/docs/types/BSTComparator.html +2 -2
- package/docs/types/BSTDeletedResult.html +2 -2
- package/docs/types/BinaryTreeDeleted.html +2 -2
- package/docs/types/BinaryTreeNodeId.html +2 -2
- package/docs/types/BinaryTreeNodePropertyName.html +2 -2
- package/docs/types/DFSOrderPattern.html +2 -2
- package/docs/types/DijkstraResult.html +2 -2
- package/docs/types/Direction.html +2 -2
- package/docs/types/DoublyLinkedListGetBy.html +2 -2
- package/docs/types/NodeOrPropertyName.html +2 -2
- package/docs/types/PriorityQueueComparator.html +2 -2
- package/docs/types/PriorityQueueDFSOrderPattern.html +2 -2
- package/docs/types/ResultByProperty.html +2 -2
- package/docs/types/ResultsByProperty.html +2 -2
- package/docs/types/SegmentTreeNodeVal.html +2 -2
- package/docs/types/SpecifyOptional.html +2 -2
- package/docs/types/Thunk.html +2 -2
- package/docs/types/ToThunkFn.html +2 -2
- package/docs/types/TopologicalStatus.html +2 -2
- package/docs/types/TreeMultiSetDeletedResult.html +2 -2
- package/docs/types/TrlAsyncFn.html +2 -2
- package/docs/types/TrlFn.html +2 -2
- package/docs/types/Turning.html +2 -2
- package/docs/types/VertexId.html +2 -2
- package/package.json +1 -3
- package/docs/interfaces/BinaryTreeNodeObj.html +0 -168
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
<ul class="tsd-hierarchy">
|
|
28
28
|
<li><a href="BST.html" class="tsd-signature-type tsd-kind-class">BST</a></li></ul></li></ul></section><aside class="tsd-sources">
|
|
29
29
|
<ul>
|
|
30
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
30
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L206">src/data-structures/binary-tree/binary-tree.ts:206</a></li></ul></aside>
|
|
31
31
|
<section class="tsd-panel-group tsd-index-group">
|
|
32
32
|
<section class="tsd-panel tsd-index-panel">
|
|
33
33
|
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
|
|
@@ -130,69 +130,69 @@ isDuplicatedVal based on the provided options.</p>
|
|
|
130
130
|
<h4 class="tsd-returns-title">Returns <a href="BinaryTree.html" class="tsd-signature-type tsd-kind-class">BinaryTree</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">></span></h4>
|
|
131
131
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
132
132
|
<ul>
|
|
133
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
133
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L222">src/data-structures/binary-tree/binary-tree.ts:222</a></li></ul></aside></li></ul></section></section>
|
|
134
134
|
<section class="tsd-panel-group tsd-member-group">
|
|
135
135
|
<h2>Properties</h2>
|
|
136
136
|
<section class="tsd-panel tsd-member tsd-is-private"><a id="_autoIncrementId" class="tsd-anchor"></a>
|
|
137
137
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <code class="tsd-tag ts-flagReadonly">Readonly</code> <span>_auto<wbr/>Increment<wbr/>Id</span><a href="#_autoIncrementId" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
138
138
|
<div class="tsd-signature"><span class="tsd-kind-property">_auto<wbr/>Increment<wbr/>Id</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = false</span></div><aside class="tsd-sources">
|
|
139
139
|
<ul>
|
|
140
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
140
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L213">src/data-structures/binary-tree/binary-tree.ts:213</a></li></ul></aside></section>
|
|
141
141
|
<section class="tsd-panel tsd-member tsd-is-protected"><a id="_count" class="tsd-anchor"></a>
|
|
142
142
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <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>
|
|
143
143
|
<div class="tsd-signature"><span class="tsd-kind-property">_count</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></div><aside class="tsd-sources">
|
|
144
144
|
<ul>
|
|
145
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
145
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L263">src/data-structures/binary-tree/binary-tree.ts:263</a></li></ul></aside></section>
|
|
146
146
|
<section class="tsd-panel tsd-member tsd-is-private"><a id="_isDuplicatedVal" class="tsd-anchor"></a>
|
|
147
147
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <code class="tsd-tag ts-flagReadonly">Readonly</code> <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>
|
|
148
148
|
<div class="tsd-signature"><span class="tsd-kind-property">_is<wbr/>Duplicated<wbr/>Val</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = false</span></div><aside class="tsd-sources">
|
|
149
149
|
<ul>
|
|
150
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
150
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L215">src/data-structures/binary-tree/binary-tree.ts:215</a></li></ul></aside></section>
|
|
151
151
|
<section class="tsd-panel tsd-member tsd-is-protected"><a id="_loopType" class="tsd-anchor"></a>
|
|
152
152
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <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>
|
|
153
153
|
<div class="tsd-signature"><span class="tsd-kind-property">_loop<wbr/>Type</span><span class="tsd-signature-symbol">:</span> <a href="../enums/LoopType.html" class="tsd-signature-type tsd-kind-enum">LoopType</a><span class="tsd-signature-symbol"> = LoopType.iterative</span></div><aside class="tsd-sources">
|
|
154
154
|
<ul>
|
|
155
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
155
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L207">src/data-structures/binary-tree/binary-tree.ts:207</a></li></ul></aside></section>
|
|
156
156
|
<section class="tsd-panel tsd-member tsd-is-private"><a id="_maxId" class="tsd-anchor"></a>
|
|
157
157
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <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>
|
|
158
158
|
<div class="tsd-signature"><span class="tsd-kind-property">_max<wbr/>Id</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = -1</span></div><aside class="tsd-sources">
|
|
159
159
|
<ul>
|
|
160
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
160
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L214">src/data-structures/binary-tree/binary-tree.ts:214</a></li></ul></aside></section>
|
|
161
161
|
<section class="tsd-panel tsd-member tsd-is-protected"><a id="_root" class="tsd-anchor"></a>
|
|
162
162
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <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>
|
|
163
163
|
<div class="tsd-signature"><span class="tsd-kind-property">_root</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">null</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 tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol"> = null</span></div><aside class="tsd-sources">
|
|
164
164
|
<ul>
|
|
165
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
165
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L239">src/data-structures/binary-tree/binary-tree.ts:239</a></li></ul></aside></section>
|
|
166
166
|
<section class="tsd-panel tsd-member tsd-is-protected"><a id="_size" class="tsd-anchor"></a>
|
|
167
167
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <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>
|
|
168
168
|
<div class="tsd-signature"><span class="tsd-kind-property">_size</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></div><aside class="tsd-sources">
|
|
169
169
|
<ul>
|
|
170
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
170
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L253">src/data-structures/binary-tree/binary-tree.ts:253</a></li></ul></aside></section>
|
|
171
171
|
<section class="tsd-panel tsd-member tsd-is-protected"><a id="_visitedCount" class="tsd-anchor"></a>
|
|
172
172
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <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>
|
|
173
173
|
<div class="tsd-signature"><span class="tsd-kind-property">_visited<wbr/>Count</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></div><aside class="tsd-sources">
|
|
174
174
|
<ul>
|
|
175
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
175
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L211">src/data-structures/binary-tree/binary-tree.ts:211</a></li></ul></aside></section>
|
|
176
176
|
<section class="tsd-panel tsd-member tsd-is-protected"><a id="_visitedId" class="tsd-anchor"></a>
|
|
177
177
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <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>
|
|
178
178
|
<div class="tsd-signature"><span class="tsd-kind-property">_visited<wbr/>Id</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></div><aside class="tsd-sources">
|
|
179
179
|
<ul>
|
|
180
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
180
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L208">src/data-structures/binary-tree/binary-tree.ts:208</a></li></ul></aside></section>
|
|
181
181
|
<section class="tsd-panel tsd-member tsd-is-protected"><a id="_visitedLeftSum" class="tsd-anchor"></a>
|
|
182
182
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <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>
|
|
183
183
|
<div class="tsd-signature"><span class="tsd-kind-property">_visited<wbr/>Left<wbr/>Sum</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></div><aside class="tsd-sources">
|
|
184
184
|
<ul>
|
|
185
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
185
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L212">src/data-structures/binary-tree/binary-tree.ts:212</a></li></ul></aside></section>
|
|
186
186
|
<section class="tsd-panel tsd-member tsd-is-protected"><a id="_visitedNode" class="tsd-anchor"></a>
|
|
187
187
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <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>
|
|
188
188
|
<div class="tsd-signature"><span class="tsd-kind-property">_visited<wbr/>Node</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 tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> = []</span></div><aside class="tsd-sources">
|
|
189
189
|
<ul>
|
|
190
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
190
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L210">src/data-structures/binary-tree/binary-tree.ts:210</a></li></ul></aside></section>
|
|
191
191
|
<section class="tsd-panel tsd-member tsd-is-protected"><a id="_visitedVal" class="tsd-anchor"></a>
|
|
192
192
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <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>
|
|
193
193
|
<div class="tsd-signature"><span class="tsd-kind-property">_visited<wbr/>Val</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> = []</span></div><aside class="tsd-sources">
|
|
194
194
|
<ul>
|
|
195
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
195
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L209">src/data-structures/binary-tree/binary-tree.ts:209</a></li></ul></aside></section></section>
|
|
196
196
|
<section class="tsd-panel-group tsd-member-group">
|
|
197
197
|
<h2>Accessors</h2>
|
|
198
198
|
<section class="tsd-panel tsd-member"><a id="count" class="tsd-anchor"></a>
|
|
@@ -202,7 +202,7 @@ isDuplicatedVal based on the provided options.</p>
|
|
|
202
202
|
<li class="tsd-description">
|
|
203
203
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
|
|
204
204
|
<ul>
|
|
205
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
205
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L265">src/data-structures/binary-tree/binary-tree.ts:265</a></li></ul></aside></li>
|
|
206
206
|
<li class="tsd-signature" id="count.count-2"><span class="tsd-signature-symbol">set</span> count<span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">v</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
|
207
207
|
<li class="tsd-description">
|
|
208
208
|
<div class="tsd-parameters">
|
|
@@ -212,7 +212,7 @@ isDuplicatedVal based on the provided options.</p>
|
|
|
212
212
|
<h5><span class="tsd-kind-parameter">v</span>: <span class="tsd-signature-type">number</span></h5></li></ul></div>
|
|
213
213
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
214
214
|
<ul>
|
|
215
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
215
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L269">src/data-structures/binary-tree/binary-tree.ts:269</a></li></ul></aside></li></ul></section>
|
|
216
216
|
<section class="tsd-panel tsd-member"><a id="root" class="tsd-anchor"></a>
|
|
217
217
|
<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>
|
|
218
218
|
<ul class="tsd-signatures">
|
|
@@ -220,7 +220,7 @@ isDuplicatedVal based on the provided options.</p>
|
|
|
220
220
|
<li class="tsd-description">
|
|
221
221
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</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 tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">></span></h4><aside class="tsd-sources">
|
|
222
222
|
<ul>
|
|
223
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
223
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L241">src/data-structures/binary-tree/binary-tree.ts:241</a></li></ul></aside></li>
|
|
224
224
|
<li class="tsd-signature" id="root.root-2"><span class="tsd-signature-symbol">set</span> root<span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">v</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
|
225
225
|
<li class="tsd-description">
|
|
226
226
|
<div class="tsd-parameters">
|
|
@@ -230,7 +230,7 @@ isDuplicatedVal based on the provided options.</p>
|
|
|
230
230
|
<h5><span class="tsd-kind-parameter">v</span>: <span class="tsd-signature-type">null</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 tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">></span></h5></li></ul></div>
|
|
231
231
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
232
232
|
<ul>
|
|
233
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
233
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L245">src/data-structures/binary-tree/binary-tree.ts:245</a></li></ul></aside></li></ul></section>
|
|
234
234
|
<section class="tsd-panel tsd-member"><a id="size" class="tsd-anchor"></a>
|
|
235
235
|
<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>
|
|
236
236
|
<ul class="tsd-signatures">
|
|
@@ -238,7 +238,7 @@ isDuplicatedVal based on the provided options.</p>
|
|
|
238
238
|
<li class="tsd-description">
|
|
239
239
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
|
|
240
240
|
<ul>
|
|
241
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
241
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L255">src/data-structures/binary-tree/binary-tree.ts:255</a></li></ul></aside></li>
|
|
242
242
|
<li class="tsd-signature" id="size.size-2"><span class="tsd-signature-symbol">set</span> size<span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">v</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
|
243
243
|
<li class="tsd-description">
|
|
244
244
|
<div class="tsd-parameters">
|
|
@@ -248,7 +248,7 @@ isDuplicatedVal based on the provided options.</p>
|
|
|
248
248
|
<h5><span class="tsd-kind-parameter">v</span>: <span class="tsd-signature-type">number</span></h5></li></ul></div>
|
|
249
249
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
250
250
|
<ul>
|
|
251
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
251
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L259">src/data-structures/binary-tree/binary-tree.ts:259</a></li></ul></aside></li></ul></section></section>
|
|
252
252
|
<section class="tsd-panel-group tsd-member-group">
|
|
253
253
|
<h2>Methods</h2>
|
|
254
254
|
<section class="tsd-panel tsd-member"><a id="BFS" class="tsd-anchor"></a>
|
|
@@ -263,7 +263,7 @@ or property name.</p>
|
|
|
263
263
|
|
|
264
264
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
265
265
|
<ul>
|
|
266
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
266
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L991">src/data-structures/binary-tree/binary-tree.ts:991</a></li></ul></aside></li>
|
|
267
267
|
<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>
|
|
268
268
|
<li class="tsd-description">
|
|
269
269
|
<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
|
|
@@ -284,7 +284,7 @@ performed starting from the root node</p>
|
|
|
284
284
|
|
|
285
285
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
286
286
|
<ul>
|
|
287
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
287
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L993">src/data-structures/binary-tree/binary-tree.ts:993</a></li></ul></aside></li>
|
|
288
288
|
<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">T</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>
|
|
289
289
|
<li class="tsd-description">
|
|
290
290
|
<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
|
|
@@ -305,7 +305,7 @@ performed starting from the root node</p>
|
|
|
305
305
|
|
|
306
306
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
307
307
|
<ul>
|
|
308
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
308
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L995">src/data-structures/binary-tree/binary-tree.ts:995</a></li></ul></aside></li>
|
|
309
309
|
<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><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">T</span><span class="tsd-signature-symbol">></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>
|
|
310
310
|
<li class="tsd-description">
|
|
311
311
|
<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
|
|
@@ -326,7 +326,7 @@ performed starting from the root node</p>
|
|
|
326
326
|
|
|
327
327
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
328
328
|
<ul>
|
|
329
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
329
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L997">src/data-structures/binary-tree/binary-tree.ts:997</a></li></ul></aside></li>
|
|
330
330
|
<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>
|
|
331
331
|
<li class="tsd-description">
|
|
332
332
|
<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
|
|
@@ -347,7 +347,7 @@ performed starting from the root node</p>
|
|
|
347
347
|
|
|
348
348
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
349
349
|
<ul>
|
|
350
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
350
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L999">src/data-structures/binary-tree/binary-tree.ts:999</a></li></ul></aside></li></ul></section>
|
|
351
351
|
<section class="tsd-panel tsd-member"><a id="DFS" class="tsd-anchor"></a>
|
|
352
352
|
<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
353
|
<ul class="tsd-signatures">
|
|
@@ -360,7 +360,7 @@ specified pattern and node or property name.</p>
|
|
|
360
360
|
|
|
361
361
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
362
362
|
<ul>
|
|
363
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
363
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L1027">src/data-structures/binary-tree/binary-tree.ts:1027</a></li></ul></aside></li>
|
|
364
364
|
<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>
|
|
365
365
|
<li class="tsd-description">
|
|
366
366
|
<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
|
|
@@ -388,7 +388,7 @@ no value</p>
|
|
|
388
388
|
|
|
389
389
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
390
390
|
<ul>
|
|
391
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
391
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L1029">src/data-structures/binary-tree/binary-tree.ts:1029</a></li></ul></aside></li>
|
|
392
392
|
<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">T</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>
|
|
393
393
|
<li class="tsd-description">
|
|
394
394
|
<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
|
|
@@ -416,7 +416,7 @@ no value</p>
|
|
|
416
416
|
|
|
417
417
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
418
418
|
<ul>
|
|
419
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
419
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L1031">src/data-structures/binary-tree/binary-tree.ts:1031</a></li></ul></aside></li>
|
|
420
420
|
<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><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">T</span><span class="tsd-signature-symbol">></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>
|
|
421
421
|
<li class="tsd-description">
|
|
422
422
|
<div class="tsd-comment tsd-typography"><p>The DFS function performs a depth-first search traversal on a binary tree and returns the results based on the
|
|
@@ -444,7 +444,7 @@ no value</p>
|
|
|
444
444
|
|
|
445
445
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
446
446
|
<ul>
|
|
447
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
447
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L1033">src/data-structures/binary-tree/binary-tree.ts:1033</a></li></ul></aside></li>
|
|
448
448
|
<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>
|
|
449
449
|
<li class="tsd-description">
|
|
450
450
|
<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,7 +472,7 @@ no value</p>
|
|
|
472
472
|
|
|
473
473
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
474
474
|
<ul>
|
|
475
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
475
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L1035">src/data-structures/binary-tree/binary-tree.ts:1035</a></li></ul></aside></li></ul></section>
|
|
476
476
|
<section class="tsd-panel tsd-member"><a id="DFSIterative" class="tsd-anchor"></a>
|
|
477
477
|
<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>
|
|
478
478
|
<ul class="tsd-signatures">
|
|
@@ -484,7 +484,7 @@ Space complexity of Iterative DFS equals to recursive DFS which is O(n) because
|
|
|
484
484
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4>
|
|
485
485
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
486
486
|
<ul>
|
|
487
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
487
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L1077">src/data-structures/binary-tree/binary-tree.ts:1077</a></li></ul></aside></li>
|
|
488
488
|
<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>
|
|
489
489
|
<li class="tsd-description">
|
|
490
490
|
<div class="tsd-comment tsd-typography"><p>Time complexity is O(n)
|
|
@@ -502,7 +502,7 @@ Space complexity of Iterative DFS equals to recursive DFS which is O(n) because
|
|
|
502
502
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4>
|
|
503
503
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
504
504
|
<ul>
|
|
505
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
505
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L1079">src/data-structures/binary-tree/binary-tree.ts:1079</a></li></ul></aside></li>
|
|
506
506
|
<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">T</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>
|
|
507
507
|
<li class="tsd-description">
|
|
508
508
|
<div class="tsd-comment tsd-typography"><p>Time complexity is O(n)
|
|
@@ -520,7 +520,7 @@ Space complexity of Iterative DFS equals to recursive DFS which is O(n) because
|
|
|
520
520
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">[]</span></h4>
|
|
521
521
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
522
522
|
<ul>
|
|
523
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
523
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L1081">src/data-structures/binary-tree/binary-tree.ts:1081</a></li></ul></aside></li>
|
|
524
524
|
<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><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">T</span><span class="tsd-signature-symbol">></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>
|
|
525
525
|
<li class="tsd-description">
|
|
526
526
|
<div class="tsd-comment tsd-typography"><p>Time complexity is O(n)
|
|
@@ -538,7 +538,7 @@ Space complexity of Iterative DFS equals to recursive DFS which is O(n) because
|
|
|
538
538
|
<h4 class="tsd-returns-title">Returns <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">T</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">[]</span></h4>
|
|
539
539
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
540
540
|
<ul>
|
|
541
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
541
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L1083">src/data-structures/binary-tree/binary-tree.ts:1083</a></li></ul></aside></li>
|
|
542
542
|
<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>
|
|
543
543
|
<li class="tsd-description">
|
|
544
544
|
<div class="tsd-comment tsd-typography"><p>Time complexity is O(n)
|
|
@@ -556,7 +556,7 @@ Space complexity of Iterative DFS equals to recursive DFS which is O(n) because
|
|
|
556
556
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4>
|
|
557
557
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
558
558
|
<ul>
|
|
559
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
559
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L1085">src/data-structures/binary-tree/binary-tree.ts:1085</a></li></ul></aside></li></ul></section>
|
|
560
560
|
<section class="tsd-panel tsd-member tsd-is-protected"><a id="_accumulatedByPropertyName" class="tsd-anchor"></a>
|
|
561
561
|
<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>
|
|
562
562
|
<ul class="tsd-signatures tsd-is-protected">
|
|
@@ -583,7 +583,7 @@ the property name of the node that should be accumulated. If it is a node object
|
|
|
583
583
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
584
584
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
585
585
|
<ul>
|
|
586
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
586
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L1445">src/data-structures/binary-tree/binary-tree.ts:1445</a></li></ul></aside></li></ul></section>
|
|
587
587
|
<section class="tsd-panel tsd-member tsd-is-protected"><a id="_getResultByPropertyName" class="tsd-anchor"></a>
|
|
588
588
|
<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>
|
|
589
589
|
<ul class="tsd-signatures tsd-is-protected">
|
|
@@ -605,7 +605,7 @@ can accept a value of type <code>NodeOrPropertyName</code>.</p>
|
|
|
605
605
|
|
|
606
606
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
607
607
|
<ul>
|
|
608
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
608
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L1474">src/data-structures/binary-tree/binary-tree.ts:1474</a></li></ul></aside></li></ul></section>
|
|
609
609
|
<section class="tsd-panel tsd-member tsd-is-protected"><a id="_pushByPropertyNameStopOrNot" class="tsd-anchor"></a>
|
|
610
610
|
<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>
|
|
611
611
|
<ul class="tsd-signatures tsd-is-protected">
|
|
@@ -652,7 +652,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
652
652
|
|
|
653
653
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
654
654
|
<ul>
|
|
655
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
655
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L1408">src/data-structures/binary-tree/binary-tree.ts:1408</a></li></ul></aside></li></ul></section>
|
|
656
656
|
<section class="tsd-panel tsd-member tsd-is-protected"><a id="_resetResults" class="tsd-anchor"></a>
|
|
657
657
|
<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>
|
|
658
658
|
<ul class="tsd-signatures tsd-is-protected">
|
|
@@ -663,7 +663,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
663
663
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
664
664
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
665
665
|
<ul>
|
|
666
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
666
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L1384">src/data-structures/binary-tree/binary-tree.ts:1384</a></li></ul></aside></li></ul></section>
|
|
667
667
|
<section class="tsd-panel tsd-member"><a id="add" class="tsd-anchor"></a>
|
|
668
668
|
<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>
|
|
669
669
|
<ul class="tsd-signatures">
|
|
@@ -697,7 +697,7 @@ is inserted, or <code>undefined</code> if the insertion fails.</p>
|
|
|
697
697
|
|
|
698
698
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
699
699
|
<ul>
|
|
700
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
700
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L340">src/data-structures/binary-tree/binary-tree.ts:340</a></li></ul></aside></li></ul></section>
|
|
701
701
|
<section class="tsd-panel tsd-member"><a id="addMany" class="tsd-anchor"></a>
|
|
702
702
|
<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>
|
|
703
703
|
<ul class="tsd-signatures">
|
|
@@ -719,7 +719,7 @@ array of <code>BinaryTreeNode<T></code> objects.</p>
|
|
|
719
719
|
|
|
720
720
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
721
721
|
<ul>
|
|
722
|
-
<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/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L430">src/data-structures/binary-tree/binary-tree.ts:430</a></li></ul></aside></li></ul></section>
|
|
723
723
|
<section class="tsd-panel tsd-member"><a id="addTo" class="tsd-anchor"></a>
|
|
724
724
|
<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>
|
|
725
725
|
<ul class="tsd-signatures">
|
|
@@ -746,7 +746,7 @@ will be inserted as a child.</p>
|
|
|
746
746
|
|
|
747
747
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
748
748
|
<ul>
|
|
749
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
749
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L390">src/data-structures/binary-tree/binary-tree.ts:390</a></li></ul></aside></li></ul></section>
|
|
750
750
|
<section class="tsd-panel tsd-member"><a id="clear" class="tsd-anchor"></a>
|
|
751
751
|
<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>
|
|
752
752
|
<ul class="tsd-signatures">
|
|
@@ -757,7 +757,7 @@ will be inserted as a child.</p>
|
|
|
757
757
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
758
758
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
759
759
|
<ul>
|
|
760
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
760
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L314">src/data-structures/binary-tree/binary-tree.ts:314</a></li></ul></aside></li></ul></section>
|
|
761
761
|
<section class="tsd-panel tsd-member"><a id="createNode" class="tsd-anchor"></a>
|
|
762
762
|
<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>
|
|
763
763
|
<ul class="tsd-signatures">
|
|
@@ -792,7 +792,7 @@ Otherwise, it returns null.</p>
|
|
|
792
792
|
|
|
793
793
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
794
794
|
<ul>
|
|
795
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
795
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L307">src/data-structures/binary-tree/binary-tree.ts:307</a></li></ul></aside></li></ul></section>
|
|
796
796
|
<section class="tsd-panel tsd-member"><a id="fill" class="tsd-anchor"></a>
|
|
797
797
|
<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>
|
|
798
798
|
<ul class="tsd-signatures">
|
|
@@ -814,7 +814,7 @@ array of <code>BinaryTreeNode<T></code> objects.</p>
|
|
|
814
814
|
|
|
815
815
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
816
816
|
<ul>
|
|
817
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
817
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L477">src/data-structures/binary-tree/binary-tree.ts:477</a></li></ul></aside></li></ul></section>
|
|
818
818
|
<section class="tsd-panel tsd-member"><a id="get" class="tsd-anchor"></a>
|
|
819
819
|
<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>
|
|
820
820
|
<ul class="tsd-signatures">
|
|
@@ -842,7 +842,7 @@ specifies the property of the binary tree node to search for. If not provided, i
|
|
|
842
842
|
|
|
843
843
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
844
844
|
<ul>
|
|
845
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
845
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L717">src/data-structures/binary-tree/binary-tree.ts:717</a></li></ul></aside></li></ul></section>
|
|
846
846
|
<section class="tsd-panel tsd-member"><a id="getCount" class="tsd-anchor"></a>
|
|
847
847
|
<h3 class="tsd-anchor-link"><span>get<wbr/>Count</span><a href="#getCount" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
848
848
|
<ul class="tsd-signatures">
|
|
@@ -853,7 +853,7 @@ specifies the property of the binary tree node to search for. If not provided, i
|
|
|
853
853
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4>
|
|
854
854
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
855
855
|
<ul>
|
|
856
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
856
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L291">src/data-structures/binary-tree/binary-tree.ts:291</a></li></ul></aside></li></ul></section>
|
|
857
857
|
<section class="tsd-panel tsd-member"><a id="getDepth" class="tsd-anchor"></a>
|
|
858
858
|
<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>
|
|
859
859
|
<ul class="tsd-signatures">
|
|
@@ -874,7 +874,7 @@ meaning it can represent any type of data that we want to store in the node.</p>
|
|
|
874
874
|
|
|
875
875
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
876
876
|
<ul>
|
|
877
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
877
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L535">src/data-structures/binary-tree/binary-tree.ts:535</a></li></ul></aside></li></ul></section>
|
|
878
878
|
<section class="tsd-panel tsd-member"><a id="getHeight" class="tsd-anchor"></a>
|
|
879
879
|
<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>
|
|
880
880
|
<ul class="tsd-signatures">
|
|
@@ -897,7 +897,7 @@ If no value is provided for <code>beginRoot</code>, the function will use the <c
|
|
|
897
897
|
|
|
898
898
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
899
899
|
<ul>
|
|
900
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
900
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L552">src/data-structures/binary-tree/binary-tree.ts:552</a></li></ul></aside></li></ul></section>
|
|
901
901
|
<section class="tsd-panel tsd-member"><a id="getLeftMost" class="tsd-anchor"></a>
|
|
902
902
|
<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>
|
|
903
903
|
<ul class="tsd-signatures">
|
|
@@ -910,7 +910,7 @@ recursion optimization.</p>
|
|
|
910
910
|
|
|
911
911
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
912
912
|
<ul>
|
|
913
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
913
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L739">src/data-structures/binary-tree/binary-tree.ts:739</a></li></ul></aside></li>
|
|
914
914
|
<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><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">T</span><span class="tsd-signature-symbol">></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>
|
|
915
915
|
<li class="tsd-description">
|
|
916
916
|
<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
|
|
@@ -929,7 +929,7 @@ provided, the function will use the root node of the binary tree.</p>
|
|
|
929
929
|
|
|
930
930
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
931
931
|
<ul>
|
|
932
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
932
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L741">src/data-structures/binary-tree/binary-tree.ts:741</a></li></ul></aside></li></ul></section>
|
|
933
933
|
<section class="tsd-panel tsd-member"><a id="getMinHeight" class="tsd-anchor"></a>
|
|
934
934
|
<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>
|
|
935
935
|
<ul class="tsd-signatures">
|
|
@@ -952,7 +952,7 @@ tree. If no value is provided for <code>beginRoot</code>, the function will use
|
|
|
952
952
|
|
|
953
953
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
954
954
|
<ul>
|
|
955
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
955
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L601">src/data-structures/binary-tree/binary-tree.ts:601</a></li></ul></aside></li></ul></section>
|
|
956
956
|
<section class="tsd-panel tsd-member"><a id="getNodes" class="tsd-anchor"></a>
|
|
957
957
|
<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>
|
|
958
958
|
<ul class="tsd-signatures">
|
|
@@ -986,7 +986,7 @@ function will stop traversing the tree and return the first matching node. If <c
|
|
|
986
986
|
<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><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">T</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span></h4>
|
|
987
987
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
988
988
|
<ul>
|
|
989
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
989
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L665">src/data-structures/binary-tree/binary-tree.ts:665</a></li></ul></aside></li></ul></section>
|
|
990
990
|
<section class="tsd-panel tsd-member"><a id="getPathToRoot" class="tsd-anchor"></a>
|
|
991
991
|
<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>
|
|
992
992
|
<ul class="tsd-signatures">
|
|
@@ -1008,7 +1008,7 @@ the given <code>node</code> to the root of the binary tree.</p>
|
|
|
1008
1008
|
|
|
1009
1009
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1010
1010
|
<ul>
|
|
1011
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1011
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L729">src/data-structures/binary-tree/binary-tree.ts:729</a></li></ul></aside></li></ul></section>
|
|
1012
1012
|
<section class="tsd-panel tsd-member"><a id="getPredecessor" class="tsd-anchor"></a>
|
|
1013
1013
|
<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>
|
|
1014
1014
|
<ul class="tsd-signatures">
|
|
@@ -1028,7 +1028,7 @@ the given <code>node</code> to the root of the binary tree.</p>
|
|
|
1028
1028
|
|
|
1029
1029
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1030
1030
|
<ul>
|
|
1031
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1031
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L1259">src/data-structures/binary-tree/binary-tree.ts:1259</a></li></ul></aside></li></ul></section>
|
|
1032
1032
|
<section class="tsd-panel tsd-member"><a id="getRightMost" class="tsd-anchor"></a>
|
|
1033
1033
|
<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>
|
|
1034
1034
|
<ul class="tsd-signatures">
|
|
@@ -1041,7 +1041,7 @@ tail recursion optimization.</p>
|
|
|
1041
1041
|
|
|
1042
1042
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1043
1043
|
<ul>
|
|
1044
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1044
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L774">src/data-structures/binary-tree/binary-tree.ts:774</a></li></ul></aside></li>
|
|
1045
1045
|
<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><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">T</span><span class="tsd-signature-symbol">></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>
|
|
1046
1046
|
<li class="tsd-description">
|
|
1047
1047
|
<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
|
|
@@ -1060,7 +1060,7 @@ provided, the function will use the root node of the binary tree.</p>
|
|
|
1060
1060
|
|
|
1061
1061
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1062
1062
|
<ul>
|
|
1063
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1063
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L776">src/data-structures/binary-tree/binary-tree.ts:776</a></li></ul></aside></li></ul></section>
|
|
1064
1064
|
<section class="tsd-panel tsd-member"><a id="getRoot" class="tsd-anchor"></a>
|
|
1065
1065
|
<h3 class="tsd-anchor-link"><span>get<wbr/>Root</span><a href="#getRoot" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1066
1066
|
<ul class="tsd-signatures">
|
|
@@ -1072,7 +1072,7 @@ provided, the function will use the root node of the binary tree.</p>
|
|
|
1072
1072
|
|
|
1073
1073
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1074
1074
|
<ul>
|
|
1075
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1075
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L277">src/data-structures/binary-tree/binary-tree.ts:277</a></li></ul></aside></li></ul></section>
|
|
1076
1076
|
<section class="tsd-panel tsd-member"><a id="getSize" class="tsd-anchor"></a>
|
|
1077
1077
|
<h3 class="tsd-anchor-link"><span>get<wbr/>Size</span><a href="#getSize" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1078
1078
|
<ul class="tsd-signatures">
|
|
@@ -1083,7 +1083,7 @@ provided, the function will use the root node of the binary tree.</p>
|
|
|
1083
1083
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4>
|
|
1084
1084
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1085
1085
|
<ul>
|
|
1086
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1086
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L284">src/data-structures/binary-tree/binary-tree.ts:284</a></li></ul></aside></li></ul></section>
|
|
1087
1087
|
<section class="tsd-panel tsd-member"><a id="getSubTreeSizeAndCount" class="tsd-anchor"></a>
|
|
1088
1088
|
<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>
|
|
1089
1089
|
<ul class="tsd-signatures">
|
|
@@ -1106,7 +1106,7 @@ represents the size of the subtree, and the second element represents the count
|
|
|
1106
1106
|
|
|
1107
1107
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1108
1108
|
<ul>
|
|
1109
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1109
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L855">src/data-structures/binary-tree/binary-tree.ts:855</a></li></ul></aside></li></ul></section>
|
|
1110
1110
|
<section class="tsd-panel tsd-member"><a id="has" class="tsd-anchor"></a>
|
|
1111
1111
|
<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>
|
|
1112
1112
|
<ul class="tsd-signatures">
|
|
@@ -1134,7 +1134,7 @@ specifies the name of the property to check for in the nodes.</p>
|
|
|
1134
1134
|
|
|
1135
1135
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1136
1136
|
<ul>
|
|
1137
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1137
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L704">src/data-structures/binary-tree/binary-tree.ts:704</a></li></ul></aside></li></ul></section>
|
|
1138
1138
|
<section class="tsd-panel tsd-member"><a id="isBST" class="tsd-anchor"></a>
|
|
1139
1139
|
<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>
|
|
1140
1140
|
<ul class="tsd-signatures">
|
|
@@ -1156,7 +1156,7 @@ tree, and <code>false</code> otherwise.</p>
|
|
|
1156
1156
|
|
|
1157
1157
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1158
1158
|
<ul>
|
|
1159
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1159
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L818">src/data-structures/binary-tree/binary-tree.ts:818</a></li></ul></aside></li></ul></section>
|
|
1160
1160
|
<section class="tsd-panel tsd-member"><a id="isBalanced" class="tsd-anchor"></a>
|
|
1161
1161
|
<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>
|
|
1162
1162
|
<ul class="tsd-signatures">
|
|
@@ -1177,7 +1177,7 @@ of type <code>BinaryTreeNode<T> | null</code>, which means it can either b
|
|
|
1177
1177
|
|
|
1178
1178
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1179
1179
|
<ul>
|
|
1180
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1180
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L649">src/data-structures/binary-tree/binary-tree.ts:649</a></li></ul></aside></li></ul></section>
|
|
1181
1181
|
<section class="tsd-panel tsd-member"><a id="isEmpty" class="tsd-anchor"></a>
|
|
1182
1182
|
<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>
|
|
1183
1183
|
<ul class="tsd-signatures">
|
|
@@ -1189,7 +1189,7 @@ of type <code>BinaryTreeNode<T> | null</code>, which means it can either b
|
|
|
1189
1189
|
|
|
1190
1190
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1191
1191
|
<ul>
|
|
1192
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1192
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L325">src/data-structures/binary-tree/binary-tree.ts:325</a></li></ul></aside></li></ul></section>
|
|
1193
1193
|
<section class="tsd-panel tsd-member"><a id="levelIterative" class="tsd-anchor"></a>
|
|
1194
1194
|
<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>
|
|
1195
1195
|
<ul class="tsd-signatures">
|
|
@@ -1212,7 +1212,7 @@ the tree is used as the starting node.</p>
|
|
|
1212
1212
|
|
|
1213
1213
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1214
1214
|
<ul>
|
|
1215
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1215
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L1136">src/data-structures/binary-tree/binary-tree.ts:1136</a></li></ul></aside></li>
|
|
1216
1216
|
<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>
|
|
1217
1217
|
<li class="tsd-description">
|
|
1218
1218
|
<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
|
|
@@ -1240,7 +1240,7 @@ accumulating results</p>
|
|
|
1240
1240
|
|
|
1241
1241
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1242
1242
|
<ul>
|
|
1243
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1243
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L1138">src/data-structures/binary-tree/binary-tree.ts:1138</a></li></ul></aside></li>
|
|
1244
1244
|
<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">T</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>
|
|
1245
1245
|
<li class="tsd-description">
|
|
1246
1246
|
<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
|
|
@@ -1268,7 +1268,7 @@ accumulating results</p>
|
|
|
1268
1268
|
|
|
1269
1269
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1270
1270
|
<ul>
|
|
1271
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1271
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L1140">src/data-structures/binary-tree/binary-tree.ts:1140</a></li></ul></aside></li>
|
|
1272
1272
|
<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><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">T</span><span class="tsd-signature-symbol">></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>
|
|
1273
1273
|
<li class="tsd-description">
|
|
1274
1274
|
<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
|
|
@@ -1296,7 +1296,7 @@ accumulating results</p>
|
|
|
1296
1296
|
|
|
1297
1297
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1298
1298
|
<ul>
|
|
1299
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1299
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L1142">src/data-structures/binary-tree/binary-tree.ts:1142</a></li></ul></aside></li>
|
|
1300
1300
|
<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>
|
|
1301
1301
|
<li class="tsd-description">
|
|
1302
1302
|
<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
|
|
@@ -1324,7 +1324,7 @@ accumulating results</p>
|
|
|
1324
1324
|
|
|
1325
1325
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1326
1326
|
<ul>
|
|
1327
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1327
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L1144">src/data-structures/binary-tree/binary-tree.ts:1144</a></li></ul></aside></li></ul></section>
|
|
1328
1328
|
<section class="tsd-panel tsd-member"><a id="listLevels" class="tsd-anchor"></a>
|
|
1329
1329
|
<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>
|
|
1330
1330
|
<ul class="tsd-signatures">
|
|
@@ -1345,7 +1345,7 @@ root node of a binary tree. If it is null, the function will use the root node o
|
|
|
1345
1345
|
|
|
1346
1346
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1347
1347
|
<ul>
|
|
1348
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1348
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L1182">src/data-structures/binary-tree/binary-tree.ts:1182</a></li></ul></aside></li>
|
|
1349
1349
|
<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>
|
|
1350
1350
|
<li class="tsd-description">
|
|
1351
1351
|
<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>
|
|
@@ -1370,7 +1370,7 @@ values:</p>
|
|
|
1370
1370
|
|
|
1371
1371
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1372
1372
|
<ul>
|
|
1373
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1373
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L1184">src/data-structures/binary-tree/binary-tree.ts:1184</a></li></ul></aside></li>
|
|
1374
1374
|
<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">T</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>
|
|
1375
1375
|
<li class="tsd-description">
|
|
1376
1376
|
<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>
|
|
@@ -1395,7 +1395,7 @@ values:</p>
|
|
|
1395
1395
|
|
|
1396
1396
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1397
1397
|
<ul>
|
|
1398
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1398
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L1186">src/data-structures/binary-tree/binary-tree.ts:1186</a></li></ul></aside></li>
|
|
1399
1399
|
<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><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">T</span><span class="tsd-signature-symbol">></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>
|
|
1400
1400
|
<li class="tsd-description">
|
|
1401
1401
|
<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>
|
|
@@ -1420,7 +1420,7 @@ values:</p>
|
|
|
1420
1420
|
|
|
1421
1421
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1422
1422
|
<ul>
|
|
1423
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1423
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L1188">src/data-structures/binary-tree/binary-tree.ts:1188</a></li></ul></aside></li>
|
|
1424
1424
|
<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>
|
|
1425
1425
|
<li class="tsd-description">
|
|
1426
1426
|
<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>
|
|
@@ -1445,7 +1445,7 @@ values:</p>
|
|
|
1445
1445
|
|
|
1446
1446
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1447
1447
|
<ul>
|
|
1448
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1448
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L1190">src/data-structures/binary-tree/binary-tree.ts:1190</a></li></ul></aside></li></ul></section>
|
|
1449
1449
|
<section class="tsd-panel tsd-member"><a id="morris" class="tsd-anchor"></a>
|
|
1450
1450
|
<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>
|
|
1451
1451
|
<ul class="tsd-signatures">
|
|
@@ -1460,7 +1460,7 @@ The space complexity Morris traversal is O(1) because no using stack</p>
|
|
|
1460
1460
|
|
|
1461
1461
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1462
1462
|
<ul>
|
|
1463
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1463
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L1273">src/data-structures/binary-tree/binary-tree.ts:1273</a></li></ul></aside></li>
|
|
1464
1464
|
<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>
|
|
1465
1465
|
<li class="tsd-description">
|
|
1466
1466
|
<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
|
|
@@ -1488,7 +1488,7 @@ property. If not provided, it defaults to <code>'id'</code>.</p>
|
|
|
1488
1488
|
|
|
1489
1489
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1490
1490
|
<ul>
|
|
1491
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1491
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L1275">src/data-structures/binary-tree/binary-tree.ts:1275</a></li></ul></aside></li>
|
|
1492
1492
|
<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">T</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>
|
|
1493
1493
|
<li class="tsd-description">
|
|
1494
1494
|
<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
|
|
@@ -1516,7 +1516,7 @@ property. If not provided, it defaults to <code>'id'</code>.</p>
|
|
|
1516
1516
|
|
|
1517
1517
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1518
1518
|
<ul>
|
|
1519
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1519
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L1277">src/data-structures/binary-tree/binary-tree.ts:1277</a></li></ul></aside></li>
|
|
1520
1520
|
<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><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">T</span><span class="tsd-signature-symbol">></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>
|
|
1521
1521
|
<li class="tsd-description">
|
|
1522
1522
|
<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
|
|
@@ -1544,7 +1544,7 @@ property. If not provided, it defaults to <code>'id'</code>.</p>
|
|
|
1544
1544
|
|
|
1545
1545
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1546
1546
|
<ul>
|
|
1547
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1547
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L1279">src/data-structures/binary-tree/binary-tree.ts:1279</a></li></ul></aside></li>
|
|
1548
1548
|
<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>
|
|
1549
1549
|
<li class="tsd-description">
|
|
1550
1550
|
<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
|
|
@@ -1572,7 +1572,7 @@ property. If not provided, it defaults to <code>'id'</code>.</p>
|
|
|
1572
1572
|
|
|
1573
1573
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1574
1574
|
<ul>
|
|
1575
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1575
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L1281">src/data-structures/binary-tree/binary-tree.ts:1281</a></li></ul></aside></li></ul></section>
|
|
1576
1576
|
<section class="tsd-panel tsd-member"><a id="remove" class="tsd-anchor"></a>
|
|
1577
1577
|
<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>
|
|
1578
1578
|
<ul class="tsd-signatures">
|
|
@@ -1602,7 +1602,7 @@ not be decremented and the overall count of the binary tree will not be updated.
|
|
|
1602
1602
|
|
|
1603
1603
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1604
1604
|
<ul>
|
|
1605
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1605
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L493">src/data-structures/binary-tree/binary-tree.ts:493</a></li></ul></aside></li></ul></section>
|
|
1606
1606
|
<section class="tsd-panel tsd-member"><a id="subTreeAdd" class="tsd-anchor"></a>
|
|
1607
1607
|
<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>
|
|
1608
1608
|
<ul class="tsd-signatures">
|
|
@@ -1634,7 +1634,7 @@ specifies the property of the <code>BinaryTreeNode</code> that should be modifie
|
|
|
1634
1634
|
|
|
1635
1635
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1636
1636
|
<ul>
|
|
1637
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1637
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L950">src/data-structures/binary-tree/binary-tree.ts:950</a></li></ul></aside></li></ul></section>
|
|
1638
1638
|
<section class="tsd-panel tsd-member"><a id="subTreeSum" class="tsd-anchor"></a>
|
|
1639
1639
|
<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>
|
|
1640
1640
|
<ul class="tsd-signatures">
|
|
@@ -1663,7 +1663,7 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
1663
1663
|
|
|
1664
1664
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1665
1665
|
<ul>
|
|
1666
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1666
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L894">src/data-structures/binary-tree/binary-tree.ts:894</a></li></ul></aside></li></ul></section></section></div>
|
|
1667
1667
|
<div class="col-sidebar">
|
|
1668
1668
|
<div class="page-menu">
|
|
1669
1669
|
<div class="tsd-navigation settings">
|
|
@@ -1780,6 +1780,7 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
1780
1780
|
<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>
|
|
1781
1781
|
<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>
|
|
1782
1782
|
<li><a href="SinglyLinkedListNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Singly<wbr/>Linked<wbr/>List<wbr/>Node</span></a></li>
|
|
1783
|
+
<li><a href="SkipLinkedList.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Skip<wbr/>Linked<wbr/>List</span></a></li>
|
|
1783
1784
|
<li><a href="SplayTree.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Splay<wbr/>Tree</span></a></li>
|
|
1784
1785
|
<li><a href="Stack.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Stack</span></a></li>
|
|
1785
1786
|
<li><a href="TreeMultiSet.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Tree<wbr/>Multi<wbr/>Set</span></a></li>
|
|
@@ -1792,7 +1793,6 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
1792
1793
|
<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>
|
|
1793
1794
|
<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>
|
|
1794
1795
|
<li><a href="../interfaces/AVLTreeDeleted.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>AVLTree<wbr/>Deleted</span></a></li>
|
|
1795
|
-
<li><a href="../interfaces/BinaryTreeNodeObj.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>Binary<wbr/>Tree<wbr/>Node<wbr/>Obj</span></a></li>
|
|
1796
1796
|
<li><a href="../interfaces/HeapOptions.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>Heap<wbr/>Options</span></a></li>
|
|
1797
1797
|
<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>
|
|
1798
1798
|
<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>
|