data-structure-typed 1.18.0 → 1.18.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +193 -66
- package/backup/recursive-type/src/assets/complexities-diff.jpg +0 -0
- package/backup/recursive-type/src/assets/data-structure-complexities.jpg +0 -0
- package/backup/recursive-type/src/assets/logo.png +0 -0
- package/backup/recursive-type/src/assets/overview-diagram-of-data-structures.png +0 -0
- package/backup/recursive-type/src/data-structures/binary-tree/aa-tree.ts +3 -0
- package/backup/recursive-type/src/data-structures/binary-tree/avl-tree.ts +288 -0
- package/backup/recursive-type/src/data-structures/binary-tree/b-tree.ts +3 -0
- package/backup/recursive-type/src/data-structures/binary-tree/binary-indexed-tree.ts +78 -0
- package/backup/recursive-type/src/data-structures/binary-tree/binary-tree.ts +1502 -0
- package/backup/recursive-type/src/data-structures/binary-tree/bst.ts +503 -0
- package/backup/recursive-type/src/data-structures/binary-tree/diagrams/avl-tree-inserting.gif +0 -0
- package/backup/recursive-type/src/data-structures/binary-tree/diagrams/bst-rotation.gif +0 -0
- package/backup/recursive-type/src/data-structures/binary-tree/diagrams/segment-tree.png +0 -0
- package/backup/recursive-type/src/data-structures/binary-tree/index.ts +11 -0
- package/backup/recursive-type/src/data-structures/binary-tree/rb-tree.ts +110 -0
- package/backup/recursive-type/src/data-structures/binary-tree/segment-tree.ts +243 -0
- package/backup/recursive-type/src/data-structures/binary-tree/splay-tree.ts +3 -0
- package/backup/recursive-type/src/data-structures/binary-tree/tree-multiset.ts +55 -0
- package/backup/recursive-type/src/data-structures/binary-tree/two-three-tree.ts +3 -0
- package/backup/recursive-type/src/data-structures/diagrams/README.md +5 -0
- package/backup/recursive-type/src/data-structures/graph/abstract-graph.ts +985 -0
- package/backup/recursive-type/src/data-structures/graph/diagrams/adjacency-list-pros-cons.jpg +0 -0
- package/backup/recursive-type/src/data-structures/graph/diagrams/adjacency-list.jpg +0 -0
- package/backup/recursive-type/src/data-structures/graph/diagrams/adjacency-matrix-pros-cons.jpg +0 -0
- package/backup/recursive-type/src/data-structures/graph/diagrams/adjacency-matrix.jpg +0 -0
- package/backup/recursive-type/src/data-structures/graph/diagrams/dfs-can-do.jpg +0 -0
- package/backup/recursive-type/src/data-structures/graph/diagrams/edge-list-pros-cons.jpg +0 -0
- package/backup/recursive-type/src/data-structures/graph/diagrams/edge-list.jpg +0 -0
- package/backup/recursive-type/src/data-structures/graph/diagrams/max-flow.jpg +0 -0
- package/backup/recursive-type/src/data-structures/graph/diagrams/mst.jpg +0 -0
- package/backup/recursive-type/src/data-structures/graph/diagrams/tarjan-articulation-point-bridge.png +0 -0
- package/backup/recursive-type/src/data-structures/graph/diagrams/tarjan-complicate-simple.png +0 -0
- package/backup/recursive-type/src/data-structures/graph/diagrams/tarjan-strongly-connected-component.png +0 -0
- package/backup/recursive-type/src/data-structures/graph/diagrams/tarjan.mp4 +0 -0
- package/backup/recursive-type/src/data-structures/graph/diagrams/tarjan.webp +0 -0
- package/backup/recursive-type/src/data-structures/graph/directed-graph.ts +478 -0
- package/backup/recursive-type/src/data-structures/graph/index.ts +3 -0
- package/backup/recursive-type/src/data-structures/graph/undirected-graph.ts +293 -0
- package/backup/recursive-type/src/data-structures/hash/coordinate-map.ts +67 -0
- package/backup/recursive-type/src/data-structures/hash/coordinate-set.ts +56 -0
- package/backup/recursive-type/src/data-structures/hash/hash-table.ts +3 -0
- package/backup/recursive-type/src/data-structures/hash/index.ts +6 -0
- package/backup/recursive-type/src/data-structures/hash/pair.ts +3 -0
- package/backup/recursive-type/src/data-structures/hash/tree-map.ts +3 -0
- package/backup/recursive-type/src/data-structures/hash/tree-set.ts +3 -0
- package/backup/recursive-type/src/data-structures/heap/heap.ts +176 -0
- package/backup/recursive-type/src/data-structures/heap/index.ts +3 -0
- package/backup/recursive-type/src/data-structures/heap/max-heap.ts +31 -0
- package/backup/recursive-type/src/data-structures/heap/min-heap.ts +34 -0
- package/backup/recursive-type/src/data-structures/index.ts +15 -0
- package/backup/recursive-type/src/data-structures/interfaces/abstract-graph.ts +42 -0
- package/backup/recursive-type/src/data-structures/interfaces/avl-tree.ts +1 -0
- package/backup/recursive-type/src/data-structures/interfaces/binary-tree.ts +56 -0
- package/backup/recursive-type/src/data-structures/interfaces/bst.ts +1 -0
- package/backup/recursive-type/src/data-structures/interfaces/directed-graph.ts +15 -0
- package/backup/recursive-type/src/data-structures/interfaces/doubly-linked-list.ts +1 -0
- package/backup/recursive-type/src/data-structures/interfaces/heap.ts +1 -0
- package/backup/recursive-type/src/data-structures/interfaces/index.ts +13 -0
- package/backup/recursive-type/src/data-structures/interfaces/navigator.ts +1 -0
- package/backup/recursive-type/src/data-structures/interfaces/priority-queue.ts +1 -0
- package/backup/recursive-type/src/data-structures/interfaces/segment-tree.ts +1 -0
- package/backup/recursive-type/src/data-structures/interfaces/singly-linked-list.ts +1 -0
- package/backup/recursive-type/src/data-structures/interfaces/tree-multiset.ts +1 -0
- package/backup/recursive-type/src/data-structures/interfaces/undirected-graph.ts +3 -0
- package/backup/recursive-type/src/data-structures/linked-list/doubly-linked-list.ts +573 -0
- package/backup/recursive-type/src/data-structures/linked-list/index.ts +3 -0
- package/backup/recursive-type/src/data-structures/linked-list/singly-linked-list.ts +490 -0
- package/backup/recursive-type/src/data-structures/linked-list/skip-linked-list.ts +3 -0
- package/backup/recursive-type/src/data-structures/matrix/index.ts +4 -0
- package/backup/recursive-type/src/data-structures/matrix/matrix.ts +27 -0
- package/backup/recursive-type/src/data-structures/matrix/matrix2d.ts +208 -0
- package/backup/recursive-type/src/data-structures/matrix/navigator.ts +122 -0
- package/backup/recursive-type/src/data-structures/matrix/vector2d.ts +316 -0
- package/backup/recursive-type/src/data-structures/priority-queue/index.ts +3 -0
- package/backup/recursive-type/src/data-structures/priority-queue/max-priority-queue.ts +49 -0
- package/backup/recursive-type/src/data-structures/priority-queue/min-priority-queue.ts +50 -0
- package/backup/recursive-type/src/data-structures/priority-queue/priority-queue.ts +354 -0
- package/backup/recursive-type/src/data-structures/queue/deque.ts +251 -0
- package/backup/recursive-type/src/data-structures/queue/index.ts +2 -0
- package/backup/recursive-type/src/data-structures/queue/queue.ts +120 -0
- package/backup/recursive-type/src/data-structures/stack/index.ts +1 -0
- package/backup/recursive-type/src/data-structures/stack/stack.ts +98 -0
- package/backup/recursive-type/src/data-structures/tree/index.ts +1 -0
- package/backup/recursive-type/src/data-structures/tree/tree.ts +80 -0
- package/backup/recursive-type/src/data-structures/trie/index.ts +1 -0
- package/backup/recursive-type/src/data-structures/trie/trie.ts +227 -0
- package/backup/recursive-type/src/data-structures/types/abstract-graph.ts +5 -0
- package/backup/recursive-type/src/data-structures/types/avl-tree.ts +8 -0
- package/backup/recursive-type/src/data-structures/types/binary-tree.ts +10 -0
- package/backup/recursive-type/src/data-structures/types/bst.ts +6 -0
- package/backup/recursive-type/src/data-structures/types/directed-graph.ts +8 -0
- package/backup/recursive-type/src/data-structures/types/doubly-linked-list.ts +1 -0
- package/backup/recursive-type/src/data-structures/types/heap.ts +5 -0
- package/backup/recursive-type/src/data-structures/types/index.ts +12 -0
- package/backup/recursive-type/src/data-structures/types/navigator.ts +13 -0
- package/backup/recursive-type/src/data-structures/types/priority-queue.ts +9 -0
- package/backup/recursive-type/src/data-structures/types/segment-tree.ts +1 -0
- package/backup/recursive-type/src/data-structures/types/singly-linked-list.ts +1 -0
- package/backup/recursive-type/src/data-structures/types/tree-multiset.ts +1 -0
- package/backup/recursive-type/src/index.ts +1 -0
- package/backup/recursive-type/src/utils/index.ts +2 -0
- package/backup/recursive-type/src/utils/types/index.ts +1 -0
- package/backup/recursive-type/src/utils/types/utils.ts +6 -0
- package/backup/recursive-type/src/utils/utils.ts +78 -0
- package/dist/data-structures/binary-tree/avl-tree.d.ts +19 -25
- package/dist/data-structures/binary-tree/avl-tree.js +8 -16
- package/dist/data-structures/binary-tree/binary-tree.d.ts +99 -98
- package/dist/data-structures/binary-tree/binary-tree.js +70 -65
- package/dist/data-structures/binary-tree/bst.d.ts +21 -21
- package/dist/data-structures/binary-tree/bst.js +15 -17
- package/dist/data-structures/binary-tree/rb-tree.d.ts +1 -2
- package/dist/data-structures/binary-tree/rb-tree.js +68 -5
- package/dist/data-structures/binary-tree/tree-multiset.d.ts +9 -8
- package/dist/data-structures/binary-tree/tree-multiset.js +7 -6
- package/dist/data-structures/graph/abstract-graph.d.ts +56 -58
- package/dist/data-structures/graph/abstract-graph.js +84 -68
- package/dist/data-structures/graph/directed-graph.d.ts +127 -96
- package/dist/data-structures/graph/directed-graph.js +161 -109
- package/dist/data-structures/graph/undirected-graph.d.ts +82 -59
- package/dist/data-structures/graph/undirected-graph.js +99 -72
- package/dist/data-structures/hash/coordinate-set.d.ts +1 -1
- package/dist/data-structures/index.d.ts +1 -0
- package/dist/data-structures/index.js +1 -0
- package/dist/data-structures/interfaces/abstract-graph.d.ts +22 -0
- package/dist/data-structures/interfaces/abstract-graph.js +2 -0
- package/dist/data-structures/interfaces/avl-tree.d.ts +1 -0
- package/dist/data-structures/interfaces/avl-tree.js +2 -0
- package/dist/data-structures/interfaces/binary-tree.d.ts +27 -0
- package/dist/data-structures/interfaces/binary-tree.js +2 -0
- package/dist/data-structures/interfaces/bst.d.ts +1 -0
- package/dist/data-structures/interfaces/bst.js +2 -0
- package/dist/data-structures/interfaces/directed-graph.d.ts +9 -0
- package/dist/data-structures/interfaces/directed-graph.js +2 -0
- package/dist/data-structures/interfaces/doubly-linked-list.d.ts +1 -0
- package/dist/data-structures/interfaces/doubly-linked-list.js +2 -0
- package/dist/data-structures/interfaces/heap.d.ts +1 -0
- package/dist/data-structures/interfaces/heap.js +2 -0
- package/dist/data-structures/interfaces/index.d.ts +13 -0
- package/dist/data-structures/interfaces/index.js +29 -0
- package/dist/data-structures/interfaces/navigator.d.ts +1 -0
- package/dist/data-structures/interfaces/navigator.js +2 -0
- package/dist/data-structures/interfaces/priority-queue.d.ts +1 -0
- package/dist/data-structures/interfaces/priority-queue.js +2 -0
- package/dist/data-structures/interfaces/segment-tree.d.ts +1 -0
- package/dist/data-structures/interfaces/segment-tree.js +2 -0
- package/dist/data-structures/interfaces/singly-linked-list.d.ts +1 -0
- package/dist/data-structures/interfaces/singly-linked-list.js +2 -0
- package/dist/data-structures/interfaces/tree-multiset.d.ts +1 -0
- package/dist/data-structures/interfaces/tree-multiset.js +2 -0
- package/dist/data-structures/interfaces/undirected-graph.d.ts +2 -0
- package/dist/data-structures/interfaces/undirected-graph.js +2 -0
- package/dist/data-structures/linked-list/doubly-linked-list.d.ts +1 -1
- package/dist/data-structures/linked-list/singly-linked-list.d.ts +1 -1
- package/dist/data-structures/priority-queue/priority-queue.d.ts +1 -1
- package/dist/data-structures/priority-queue/priority-queue.js +4 -4
- package/dist/data-structures/queue/deque.d.ts +5 -5
- package/dist/data-structures/queue/deque.js +6 -6
- package/dist/data-structures/queue/queue.d.ts +1 -1
- package/dist/data-structures/stack/stack.d.ts +1 -1
- package/dist/data-structures/types/abstract-graph.d.ts +1 -20
- package/dist/data-structures/types/avl-tree.d.ts +5 -4
- package/dist/data-structures/types/binary-tree.d.ts +6 -5
- package/dist/data-structures/types/bst.d.ts +4 -3
- package/dist/data-structures/types/directed-graph.d.ts +5 -9
- package/dist/data-structures/types/directed-graph.js +7 -0
- package/dist/data-structures/types/heap.d.ts +2 -2
- package/dist/data-structures/types/index.d.ts +0 -1
- package/dist/data-structures/types/index.js +0 -1
- package/dist/data-structures/types/navigator.d.ts +2 -2
- package/dist/data-structures/types/priority-queue.d.ts +2 -2
- package/dist/data-structures/types/tree-multiset.d.ts +3 -4
- package/docs/assets/search.js +1 -1
- package/docs/classes/AVLTree.html +288 -287
- package/docs/classes/AVLTreeNode.html +106 -63
- package/docs/classes/AaTree.html +14 -12
- package/docs/classes/AbstractEdge.html +68 -34
- package/docs/classes/AbstractGraph.html +219 -114
- package/docs/classes/AbstractVertex.html +71 -30
- package/docs/classes/ArrayDeque.html +27 -25
- package/docs/classes/BST.html +279 -273
- package/docs/classes/BSTNode.html +106 -57
- package/docs/classes/BTree.html +14 -12
- package/docs/classes/BinaryIndexedTree.html +22 -20
- package/docs/classes/BinaryTree.html +283 -277
- package/docs/classes/BinaryTreeNode.html +111 -63
- package/docs/classes/Character.html +17 -15
- package/docs/classes/CoordinateMap.html +22 -20
- package/docs/classes/CoordinateSet.html +23 -21
- package/docs/classes/Deque.html +47 -45
- package/docs/classes/DirectedEdge.html +74 -41
- package/docs/classes/DirectedGraph.html +444 -208
- package/docs/classes/DirectedVertex.html +63 -36
- package/docs/classes/DoublyLinkedList.html +52 -50
- package/docs/classes/DoublyLinkedListNode.html +24 -22
- package/docs/classes/HashTable.html +14 -12
- package/docs/classes/Heap.html +29 -27
- package/docs/classes/HeapItem.html +21 -19
- package/docs/classes/Matrix2D.html +29 -27
- package/docs/classes/MatrixNTI2D.html +17 -15
- package/docs/classes/MaxHeap.html +29 -27
- package/docs/classes/MaxPriorityQueue.html +67 -60
- package/docs/classes/MinHeap.html +29 -27
- package/docs/classes/MinPriorityQueue.html +67 -60
- package/docs/classes/Navigator.html +24 -22
- package/docs/classes/ObjectDeque.html +62 -50
- package/docs/classes/Pair.html +14 -12
- package/docs/classes/PriorityQueue.html +62 -55
- package/docs/classes/Queue.html +29 -27
- package/docs/classes/SegmentTree.html +30 -28
- package/docs/classes/SegmentTreeNode.html +33 -31
- package/docs/classes/SinglyLinkedList.html +49 -47
- package/docs/classes/SinglyLinkedListNode.html +21 -19
- package/docs/classes/SkipLinkedList.html +14 -12
- package/docs/classes/SplayTree.html +14 -12
- package/docs/classes/Stack.html +27 -25
- package/docs/classes/TreeMap.html +14 -12
- package/docs/classes/TreeMultiSet.html +277 -270
- package/docs/classes/TreeNode.html +29 -27
- package/docs/classes/TreeSet.html +14 -12
- package/docs/classes/Trie.html +26 -24
- package/docs/classes/TrieNode.html +24 -22
- package/docs/classes/TwoThreeTree.html +14 -12
- package/docs/classes/UndirectedEdge.html +70 -51
- package/docs/classes/UndirectedGraph.html +344 -161
- package/docs/classes/UndirectedVertex.html +63 -36
- package/docs/classes/Vector2D.html +41 -39
- package/docs/enums/CP.html +17 -15
- package/docs/enums/FamilyPosition.html +17 -15
- package/docs/enums/LoopType.html +16 -14
- package/docs/{interfaces/AVLTreeDeleted.html → enums/TopologicalProperty.html} +43 -43
- package/docs/index.html +195 -68
- package/docs/interfaces/{HeapOptions.html → IBinaryTree.html} +39 -32
- package/docs/interfaces/IBinaryTreeNode.html +383 -0
- package/docs/interfaces/IDirectedGraph.html +20 -18
- package/docs/interfaces/IGraph.html +118 -88
- package/docs/interfaces/{PriorityQueueOptions.html → IUNDirectedGraph.html} +22 -53
- package/docs/modules.html +25 -21
- package/docs/types/{ToThunkFn.html → AVLTreeDeleted.html} +27 -21
- package/docs/types/BSTComparator.html +14 -12
- package/docs/types/BSTDeletedResult.html +19 -17
- package/docs/types/BinaryTreeDeleted.html +19 -17
- package/docs/types/BinaryTreeNodeId.html +14 -12
- package/docs/types/BinaryTreeNodePropertyName.html +14 -12
- package/docs/types/DFSOrderPattern.html +14 -12
- package/docs/types/DijkstraResult.html +14 -12
- package/docs/types/Direction.html +14 -12
- package/docs/types/{TrlFn.html → EdgeId.html} +18 -29
- package/docs/types/{TrlAsyncFn.html → HeapOptions.html} +29 -19
- package/docs/types/NavigatorParams.html +164 -0
- package/docs/types/NodeOrPropertyName.html +14 -12
- package/docs/types/PriorityQueueComparator.html +14 -12
- package/docs/types/PriorityQueueDFSOrderPattern.html +14 -12
- package/docs/types/{SpecifyOptional.html → PriorityQueueOptions.html} +28 -19
- package/docs/types/RecursiveAVLTreeNode.html +135 -0
- package/docs/types/{Thunk.html → RecursiveBSTNode.html} +23 -24
- package/docs/types/RecursiveBinaryTreeNode.html +135 -0
- package/docs/types/ResultByProperty.html +17 -15
- package/docs/types/ResultsByProperty.html +17 -15
- package/docs/types/SegmentTreeNodeVal.html +14 -12
- package/docs/types/TopologicalStatus.html +14 -12
- package/docs/types/TreeMultiSetDeletedResult.html +19 -17
- package/docs/types/Turning.html +14 -12
- package/docs/types/VertexId.html +14 -12
- package/notes/note.md +8 -1
- package/package.json +10 -2
- package/docs/classes/RBTree.html +0 -153
- package/docs/interfaces/NavigatorParams.html +0 -200
|
@@ -14,20 +14,24 @@
|
|
|
14
14
|
<ul class="tsd-breadcrumb">
|
|
15
15
|
<li><a href="../modules.html">data-structure-typed</a></li>
|
|
16
16
|
<li><a href="BinaryTree.html">BinaryTree</a></li></ul>
|
|
17
|
-
<h1>Class BinaryTree<
|
|
17
|
+
<h1>Class BinaryTree<N></h1></div>
|
|
18
18
|
<section class="tsd-panel">
|
|
19
19
|
<h4>Type Parameters</h4>
|
|
20
20
|
<ul class="tsd-type-parameter-list">
|
|
21
21
|
<li>
|
|
22
|
-
<h4><span class="tsd-kind-type-parameter">
|
|
22
|
+
<h4><span class="tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol"> extends </span><a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">></span> = <a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span></h4></li></ul></section>
|
|
23
23
|
<section class="tsd-panel tsd-hierarchy">
|
|
24
24
|
<h4>Hierarchy</h4>
|
|
25
25
|
<ul class="tsd-hierarchy">
|
|
26
26
|
<li><span class="target">BinaryTree</span>
|
|
27
27
|
<ul class="tsd-hierarchy">
|
|
28
|
-
<li><a href="BST.html" class="tsd-signature-type tsd-kind-class">BST</a></li></ul></li></ul></section
|
|
28
|
+
<li><a href="BST.html" class="tsd-signature-type tsd-kind-class">BST</a></li></ul></li></ul></section>
|
|
29
|
+
<section class="tsd-panel">
|
|
30
|
+
<h4>Implements</h4>
|
|
31
|
+
<ul class="tsd-hierarchy">
|
|
32
|
+
<li><a href="../interfaces/IBinaryTree.html" class="tsd-signature-type tsd-kind-interface">IBinaryTree</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">></span></li></ul></section><aside class="tsd-sources">
|
|
29
33
|
<ul>
|
|
30
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
34
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L159">src/data-structures/binary-tree/binary-tree.ts:159</a></li></ul></aside>
|
|
31
35
|
<section class="tsd-panel-group tsd-index-group">
|
|
32
36
|
<section class="tsd-panel tsd-index-panel">
|
|
33
37
|
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
|
|
@@ -73,6 +77,7 @@
|
|
|
73
77
|
<a href="BinaryTree.html#DFS" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>DFS</span></a>
|
|
74
78
|
<a href="BinaryTree.html#DFSIterative" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>DFSIterative</span></a>
|
|
75
79
|
<a href="BinaryTree.html#_accumulatedByPropertyName" class="tsd-index-link tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_accumulated<wbr/>By<wbr/>Property<wbr/>Name</span></a>
|
|
80
|
+
<a href="BinaryTree.html#_createNode" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_create<wbr/>Node</span></a>
|
|
76
81
|
<a href="BinaryTree.html#_getResultByPropertyName" class="tsd-index-link tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_get<wbr/>Result<wbr/>By<wbr/>Property<wbr/>Name</span></a>
|
|
77
82
|
<a href="BinaryTree.html#_pushByPropertyNameStopOrNot" class="tsd-index-link tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_push<wbr/>By<wbr/>Property<wbr/>Name<wbr/>Stop<wbr/>Or<wbr/>Not</span></a>
|
|
78
83
|
<a href="BinaryTree.html#_resetResults" class="tsd-index-link tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_reset<wbr/>Results</span></a>
|
|
@@ -91,7 +96,6 @@
|
|
|
91
96
|
<a href="BinaryTree.html#addMany" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>add<wbr/>Many</span></a>
|
|
92
97
|
<a href="BinaryTree.html#addTo" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>add<wbr/>To</span></a>
|
|
93
98
|
<a href="BinaryTree.html#clear" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>clear</span></a>
|
|
94
|
-
<a href="BinaryTree.html#createNode" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>create<wbr/>Node</span></a>
|
|
95
99
|
<a href="BinaryTree.html#fill" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>fill</span></a>
|
|
96
100
|
<a href="BinaryTree.html#get" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get</span></a>
|
|
97
101
|
<a href="BinaryTree.html#getDepth" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Depth</span></a>
|
|
@@ -120,7 +124,7 @@
|
|
|
120
124
|
<section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a>
|
|
121
125
|
<h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><g stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" id="icon-anchor"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></g></svg></a></h3>
|
|
122
126
|
<ul class="tsd-signatures">
|
|
123
|
-
<li class="tsd-signature tsd-anchor-link" id="constructor.new_BinaryTree"><span class="tsd-kind-constructor-signature">new <wbr/>Binary<wbr/>Tree</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
127
|
+
<li class="tsd-signature tsd-anchor-link" id="constructor.new_BinaryTree"><span class="tsd-kind-constructor-signature">new <wbr/>Binary<wbr/>Tree</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="BinaryTree.html" class="tsd-signature-type tsd-kind-class">BinaryTree</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">></span><a href="#constructor.new_BinaryTree" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
124
128
|
<li class="tsd-description">
|
|
125
129
|
<div class="tsd-comment tsd-typography"><p>The constructor function accepts an optional options object and sets the values of loopType, autoIncrementId, and
|
|
126
130
|
isDuplicatedVal based on the provided options.</p>
|
|
@@ -129,7 +133,7 @@ isDuplicatedVal based on the provided options.</p>
|
|
|
129
133
|
<h4>Type Parameters</h4>
|
|
130
134
|
<ul class="tsd-type-parameter-list">
|
|
131
135
|
<li>
|
|
132
|
-
<h4><span class="tsd-kind-type-parameter">
|
|
136
|
+
<h4><span class="tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol"> extends </span><a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">></span> = <a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span><a href="../types/RecursiveBinaryTreeNode.html" class="tsd-signature-type tsd-kind-type-alias">RecursiveBinaryTreeNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span></h4></li></ul></section>
|
|
133
137
|
<div class="tsd-parameters">
|
|
134
138
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
135
139
|
<ul class="tsd-parameter-list">
|
|
@@ -145,72 +149,72 @@ isDuplicatedVal based on the provided options.</p>
|
|
|
145
149
|
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-property">is<wbr/>Duplicated<wbr/>Val</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span></h5></li>
|
|
146
150
|
<li class="tsd-parameter">
|
|
147
151
|
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-property">loop<wbr/>Type</span><span class="tsd-signature-symbol">?: </span><a href="../enums/LoopType.html" class="tsd-signature-type tsd-kind-enum">LoopType</a></h5></li></ul></li></ul></div>
|
|
148
|
-
<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">
|
|
152
|
+
<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">N</span><span class="tsd-signature-symbol">></span></h4>
|
|
149
153
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
150
154
|
<ul>
|
|
151
|
-
<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/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L166">src/data-structures/binary-tree/binary-tree.ts:166</a></li></ul></aside></li></ul></section></section>
|
|
152
156
|
<section class="tsd-panel-group tsd-member-group">
|
|
153
157
|
<h2>Properties</h2>
|
|
154
158
|
<section class="tsd-panel tsd-member tsd-is-private"><a id="_autoIncrementId" class="tsd-anchor"></a>
|
|
155
159
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</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>
|
|
156
160
|
<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">
|
|
157
161
|
<ul>
|
|
158
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
162
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L218">src/data-structures/binary-tree/binary-tree.ts:218</a></li></ul></aside></section>
|
|
159
163
|
<section class="tsd-panel tsd-member tsd-is-private"><a id="_count" class="tsd-anchor"></a>
|
|
160
164
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</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>
|
|
161
165
|
<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">
|
|
162
166
|
<ul>
|
|
163
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
167
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L248">src/data-structures/binary-tree/binary-tree.ts:248</a></li></ul></aside></section>
|
|
164
168
|
<section class="tsd-panel tsd-member tsd-is-private"><a id="_isDuplicatedVal" class="tsd-anchor"></a>
|
|
165
169
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</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>
|
|
166
170
|
<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">
|
|
167
171
|
<ul>
|
|
168
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
172
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L230">src/data-structures/binary-tree/binary-tree.ts:230</a></li></ul></aside></section>
|
|
169
173
|
<section class="tsd-panel tsd-member tsd-is-private"><a id="_loopType" class="tsd-anchor"></a>
|
|
170
174
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</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>
|
|
171
175
|
<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">
|
|
172
176
|
<ul>
|
|
173
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
177
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L183">src/data-structures/binary-tree/binary-tree.ts:183</a></li></ul></aside></section>
|
|
174
178
|
<section class="tsd-panel tsd-member tsd-is-private"><a id="_maxId" class="tsd-anchor"></a>
|
|
175
179
|
<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>
|
|
176
180
|
<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">
|
|
177
181
|
<ul>
|
|
178
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
182
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L224">src/data-structures/binary-tree/binary-tree.ts:224</a></li></ul></aside></section>
|
|
179
183
|
<section class="tsd-panel tsd-member tsd-is-private"><a id="_root" class="tsd-anchor"></a>
|
|
180
184
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</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>
|
|
181
|
-
<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><
|
|
185
|
+
<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><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol"> = null</span></div><aside class="tsd-sources">
|
|
182
186
|
<ul>
|
|
183
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
187
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L236">src/data-structures/binary-tree/binary-tree.ts:236</a></li></ul></aside></section>
|
|
184
188
|
<section class="tsd-panel tsd-member tsd-is-private"><a id="_size" class="tsd-anchor"></a>
|
|
185
189
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</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>
|
|
186
190
|
<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">
|
|
187
191
|
<ul>
|
|
188
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
192
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L242">src/data-structures/binary-tree/binary-tree.ts:242</a></li></ul></aside></section>
|
|
189
193
|
<section class="tsd-panel tsd-member tsd-is-private"><a id="_visitedCount" class="tsd-anchor"></a>
|
|
190
194
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</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>
|
|
191
195
|
<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">
|
|
192
196
|
<ul>
|
|
193
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
197
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L206">src/data-structures/binary-tree/binary-tree.ts:206</a></li></ul></aside></section>
|
|
194
198
|
<section class="tsd-panel tsd-member tsd-is-private"><a id="_visitedId" class="tsd-anchor"></a>
|
|
195
199
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</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>
|
|
196
200
|
<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">
|
|
197
201
|
<ul>
|
|
198
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
202
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L189">src/data-structures/binary-tree/binary-tree.ts:189</a></li></ul></aside></section>
|
|
199
203
|
<section class="tsd-panel tsd-member tsd-is-private"><a id="_visitedLeftSum" class="tsd-anchor"></a>
|
|
200
204
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</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>
|
|
201
205
|
<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">
|
|
202
206
|
<ul>
|
|
203
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
207
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L212">src/data-structures/binary-tree/binary-tree.ts:212</a></li></ul></aside></section>
|
|
204
208
|
<section class="tsd-panel tsd-member tsd-is-private"><a id="_visitedNode" class="tsd-anchor"></a>
|
|
205
209
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</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>
|
|
206
|
-
<div class="tsd-signature"><span class="tsd-kind-property">_visited<wbr/>Node</span><span class="tsd-signature-symbol">:</span> <
|
|
210
|
+
<div class="tsd-signature"><span class="tsd-kind-property">_visited<wbr/>Node</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> = []</span></div><aside class="tsd-sources">
|
|
207
211
|
<ul>
|
|
208
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
212
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L200">src/data-structures/binary-tree/binary-tree.ts:200</a></li></ul></aside></section>
|
|
209
213
|
<section class="tsd-panel tsd-member tsd-is-private"><a id="_visitedVal" class="tsd-anchor"></a>
|
|
210
214
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</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>
|
|
211
|
-
<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">
|
|
215
|
+
<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">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> = []</span></div><aside class="tsd-sources">
|
|
212
216
|
<ul>
|
|
213
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
217
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L194">src/data-structures/binary-tree/binary-tree.ts:194</a></li></ul></aside></section></section>
|
|
214
218
|
<section class="tsd-panel-group tsd-member-group">
|
|
215
219
|
<h2>Accessors</h2>
|
|
216
220
|
<section class="tsd-panel tsd-member"><a id="autoIncrementId" class="tsd-anchor"></a>
|
|
@@ -220,7 +224,7 @@ isDuplicatedVal based on the provided options.</p>
|
|
|
220
224
|
<li class="tsd-description">
|
|
221
225
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources">
|
|
222
226
|
<ul>
|
|
223
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
227
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L220">src/data-structures/binary-tree/binary-tree.ts:220</a></li></ul></aside></li></ul></section>
|
|
224
228
|
<section class="tsd-panel tsd-member"><a id="count" class="tsd-anchor"></a>
|
|
225
229
|
<h3 class="tsd-anchor-link"><span>count</span><a href="#count" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
226
230
|
<ul class="tsd-signatures">
|
|
@@ -228,7 +232,7 @@ isDuplicatedVal based on the provided options.</p>
|
|
|
228
232
|
<li class="tsd-description">
|
|
229
233
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
|
|
230
234
|
<ul>
|
|
231
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
235
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L250">src/data-structures/binary-tree/binary-tree.ts:250</a></li></ul></aside></li></ul></section>
|
|
232
236
|
<section class="tsd-panel tsd-member"><a id="isDuplicatedVal" class="tsd-anchor"></a>
|
|
233
237
|
<h3 class="tsd-anchor-link"><span>is<wbr/>Duplicated<wbr/>Val</span><a href="#isDuplicatedVal" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
234
238
|
<ul class="tsd-signatures">
|
|
@@ -236,7 +240,7 @@ isDuplicatedVal based on the provided options.</p>
|
|
|
236
240
|
<li class="tsd-description">
|
|
237
241
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources">
|
|
238
242
|
<ul>
|
|
239
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
243
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L232">src/data-structures/binary-tree/binary-tree.ts:232</a></li></ul></aside></li></ul></section>
|
|
240
244
|
<section class="tsd-panel tsd-member"><a id="loopType" class="tsd-anchor"></a>
|
|
241
245
|
<h3 class="tsd-anchor-link"><span>loop<wbr/>Type</span><a href="#loopType" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
242
246
|
<ul class="tsd-signatures">
|
|
@@ -244,7 +248,7 @@ isDuplicatedVal based on the provided options.</p>
|
|
|
244
248
|
<li class="tsd-description">
|
|
245
249
|
<h4 class="tsd-returns-title">Returns <a href="../enums/LoopType.html" class="tsd-signature-type tsd-kind-enum">LoopType</a></h4><aside class="tsd-sources">
|
|
246
250
|
<ul>
|
|
247
|
-
<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/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L185">src/data-structures/binary-tree/binary-tree.ts:185</a></li></ul></aside></li></ul></section>
|
|
248
252
|
<section class="tsd-panel tsd-member"><a id="maxId" class="tsd-anchor"></a>
|
|
249
253
|
<h3 class="tsd-anchor-link"><span>max<wbr/>Id</span><a href="#maxId" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
250
254
|
<ul class="tsd-signatures">
|
|
@@ -252,15 +256,15 @@ isDuplicatedVal based on the provided options.</p>
|
|
|
252
256
|
<li class="tsd-description">
|
|
253
257
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
|
|
254
258
|
<ul>
|
|
255
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
259
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L226">src/data-structures/binary-tree/binary-tree.ts:226</a></li></ul></aside></li></ul></section>
|
|
256
260
|
<section class="tsd-panel tsd-member"><a id="root" class="tsd-anchor"></a>
|
|
257
261
|
<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>
|
|
258
262
|
<ul class="tsd-signatures">
|
|
259
|
-
<li class="tsd-signature" id="root.root-1"><span class="tsd-signature-symbol">get</span> root<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
263
|
+
<li class="tsd-signature" id="root.root-1"><span class="tsd-signature-symbol">get</span> root<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></li>
|
|
260
264
|
<li class="tsd-description">
|
|
261
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
265
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h4><aside class="tsd-sources">
|
|
262
266
|
<ul>
|
|
263
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
267
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L238">src/data-structures/binary-tree/binary-tree.ts:238</a></li></ul></aside></li></ul></section>
|
|
264
268
|
<section class="tsd-panel tsd-member"><a id="size" class="tsd-anchor"></a>
|
|
265
269
|
<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>
|
|
266
270
|
<ul class="tsd-signatures">
|
|
@@ -268,7 +272,7 @@ isDuplicatedVal based on the provided options.</p>
|
|
|
268
272
|
<li class="tsd-description">
|
|
269
273
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
|
|
270
274
|
<ul>
|
|
271
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
275
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L244">src/data-structures/binary-tree/binary-tree.ts:244</a></li></ul></aside></li></ul></section>
|
|
272
276
|
<section class="tsd-panel tsd-member"><a id="visitedCount" class="tsd-anchor"></a>
|
|
273
277
|
<h3 class="tsd-anchor-link"><span>visited<wbr/>Count</span><a href="#visitedCount" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
274
278
|
<ul class="tsd-signatures">
|
|
@@ -276,7 +280,7 @@ isDuplicatedVal based on the provided options.</p>
|
|
|
276
280
|
<li class="tsd-description">
|
|
277
281
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources">
|
|
278
282
|
<ul>
|
|
279
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
283
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L208">src/data-structures/binary-tree/binary-tree.ts:208</a></li></ul></aside></li></ul></section>
|
|
280
284
|
<section class="tsd-panel tsd-member"><a id="visitedId" class="tsd-anchor"></a>
|
|
281
285
|
<h3 class="tsd-anchor-link"><span>visited<wbr/>Id</span><a href="#visitedId" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
282
286
|
<ul class="tsd-signatures">
|
|
@@ -284,7 +288,7 @@ isDuplicatedVal based on the provided options.</p>
|
|
|
284
288
|
<li class="tsd-description">
|
|
285
289
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources">
|
|
286
290
|
<ul>
|
|
287
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
291
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L190">src/data-structures/binary-tree/binary-tree.ts:190</a></li></ul></aside></li></ul></section>
|
|
288
292
|
<section class="tsd-panel tsd-member"><a id="visitedLeftSum" class="tsd-anchor"></a>
|
|
289
293
|
<h3 class="tsd-anchor-link"><span>visited<wbr/>Left<wbr/>Sum</span><a href="#visitedLeftSum" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
290
294
|
<ul class="tsd-signatures">
|
|
@@ -292,23 +296,23 @@ isDuplicatedVal based on the provided options.</p>
|
|
|
292
296
|
<li class="tsd-description">
|
|
293
297
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources">
|
|
294
298
|
<ul>
|
|
295
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
299
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L214">src/data-structures/binary-tree/binary-tree.ts:214</a></li></ul></aside></li></ul></section>
|
|
296
300
|
<section class="tsd-panel tsd-member"><a id="visitedNode" class="tsd-anchor"></a>
|
|
297
301
|
<h3 class="tsd-anchor-link"><span>visited<wbr/>Node</span><a href="#visitedNode" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
298
302
|
<ul class="tsd-signatures">
|
|
299
|
-
<li class="tsd-signature" id="visitedNode.visitedNode-1"><span class="tsd-signature-symbol">get</span> visitedNode<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><
|
|
303
|
+
<li class="tsd-signature" id="visitedNode.visitedNode-1"><span class="tsd-signature-symbol">get</span> visitedNode<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></li>
|
|
300
304
|
<li class="tsd-description">
|
|
301
|
-
<h4 class="tsd-returns-title">Returns <
|
|
305
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources">
|
|
302
306
|
<ul>
|
|
303
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
307
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L202">src/data-structures/binary-tree/binary-tree.ts:202</a></li></ul></aside></li></ul></section>
|
|
304
308
|
<section class="tsd-panel tsd-member"><a id="visitedVal" class="tsd-anchor"></a>
|
|
305
309
|
<h3 class="tsd-anchor-link"><span>visited<wbr/>Val</span><a href="#visitedVal" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
306
310
|
<ul class="tsd-signatures">
|
|
307
|
-
<li class="tsd-signature" id="visitedVal.visitedVal-1"><span class="tsd-signature-symbol">get</span> visitedVal<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
311
|
+
<li class="tsd-signature" id="visitedVal.visitedVal-1"><span class="tsd-signature-symbol">get</span> visitedVal<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[]</span></li>
|
|
308
312
|
<li class="tsd-description">
|
|
309
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">
|
|
313
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources">
|
|
310
314
|
<ul>
|
|
311
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
315
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L196">src/data-structures/binary-tree/binary-tree.ts:196</a></li></ul></aside></li></ul></section></section>
|
|
312
316
|
<section class="tsd-panel-group tsd-member-group">
|
|
313
317
|
<h2>Methods</h2>
|
|
314
318
|
<section class="tsd-panel tsd-member"><a id="BFS" class="tsd-anchor"></a>
|
|
@@ -319,11 +323,11 @@ isDuplicatedVal based on the provided options.</p>
|
|
|
319
323
|
<div class="tsd-comment tsd-typography"><p>The BFS function performs a breadth-first search on a binary tree and returns the results based on a specified node
|
|
320
324
|
or property name.</p>
|
|
321
325
|
</div>
|
|
322
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>ResultsByProperty<
|
|
326
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>ResultsByProperty<N></code>.</p>
|
|
323
327
|
|
|
324
328
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
325
329
|
<ul>
|
|
326
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
330
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L950">src/data-structures/binary-tree/binary-tree.ts:950</a></li></ul></aside></li>
|
|
327
331
|
<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>
|
|
328
332
|
<li class="tsd-description">
|
|
329
333
|
<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
|
|
@@ -340,12 +344,12 @@ performed starting from that node. If a property name is provided, the breadth-f
|
|
|
340
344
|
performed starting from the root node</p>
|
|
341
345
|
</div>
|
|
342
346
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
343
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>ResultsByProperty<
|
|
347
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>ResultsByProperty<N></code>.</p>
|
|
344
348
|
|
|
345
349
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
346
350
|
<ul>
|
|
347
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
348
|
-
<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">
|
|
351
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L952">src/data-structures/binary-tree/binary-tree.ts:952</a></li></ul></aside></li>
|
|
352
|
+
<li class="tsd-signature tsd-anchor-link" id="BFS.BFS-3"><span class="tsd-kind-call-signature">BFS</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[]</span><a href="#BFS.BFS-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
349
353
|
<li class="tsd-description">
|
|
350
354
|
<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
|
|
351
355
|
or property name.</p>
|
|
@@ -361,12 +365,12 @@ performed starting from that node. If a property name is provided, the breadth-f
|
|
|
361
365
|
performed starting from the root node</p>
|
|
362
366
|
</div>
|
|
363
367
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
364
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">
|
|
368
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>ResultsByProperty<N></code>.</p>
|
|
365
369
|
|
|
366
370
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
367
371
|
<ul>
|
|
368
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
369
|
-
<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><
|
|
372
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L954">src/data-structures/binary-tree/binary-tree.ts:954</a></li></ul></aside></li>
|
|
373
|
+
<li class="tsd-signature tsd-anchor-link" id="BFS.BFS-4"><span class="tsd-kind-call-signature">BFS</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span><a href="#BFS.BFS-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
370
374
|
<li class="tsd-description">
|
|
371
375
|
<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
|
|
372
376
|
or property name.</p>
|
|
@@ -382,11 +386,11 @@ performed starting from that node. If a property name is provided, the breadth-f
|
|
|
382
386
|
performed starting from the root node</p>
|
|
383
387
|
</div>
|
|
384
388
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
385
|
-
<h4 class="tsd-returns-title">Returns <
|
|
389
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>ResultsByProperty<N></code>.</p>
|
|
386
390
|
|
|
387
391
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
388
392
|
<ul>
|
|
389
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
393
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L956">src/data-structures/binary-tree/binary-tree.ts:956</a></li></ul></aside></li>
|
|
390
394
|
<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>
|
|
391
395
|
<li class="tsd-description">
|
|
392
396
|
<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
|
|
@@ -403,11 +407,11 @@ performed starting from that node. If a property name is provided, the breadth-f
|
|
|
403
407
|
performed starting from the root node</p>
|
|
404
408
|
</div>
|
|
405
409
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
406
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>ResultsByProperty<
|
|
410
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>ResultsByProperty<N></code>.</p>
|
|
407
411
|
|
|
408
412
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
409
413
|
<ul>
|
|
410
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
414
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L958">src/data-structures/binary-tree/binary-tree.ts:958</a></li></ul></aside></li></ul></section>
|
|
411
415
|
<section class="tsd-panel tsd-member"><a id="DFS" class="tsd-anchor"></a>
|
|
412
416
|
<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>
|
|
413
417
|
<ul class="tsd-signatures">
|
|
@@ -416,11 +420,11 @@ performed starting from the root node</p>
|
|
|
416
420
|
<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
|
|
417
421
|
specified pattern and node or property name.</p>
|
|
418
422
|
</div>
|
|
419
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>ResultsByProperty<
|
|
423
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>ResultsByProperty<N></code>.</p>
|
|
420
424
|
|
|
421
425
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
422
426
|
<ul>
|
|
423
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
427
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L986">src/data-structures/binary-tree/binary-tree.ts:986</a></li></ul></aside></li>
|
|
424
428
|
<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>
|
|
425
429
|
<li class="tsd-description">
|
|
426
430
|
<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,12 +448,12 @@ either the name of a property in the <code>BinaryTreeNode</code> object or the v
|
|
|
444
448
|
no value</p>
|
|
445
449
|
</div>
|
|
446
450
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
447
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>ResultsByProperty<
|
|
451
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>ResultsByProperty<N></code>.</p>
|
|
448
452
|
|
|
449
453
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
450
454
|
<ul>
|
|
451
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
452
|
-
<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">
|
|
455
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L988">src/data-structures/binary-tree/binary-tree.ts:988</a></li></ul></aside></li>
|
|
456
|
+
<li class="tsd-signature tsd-anchor-link" id="DFS.DFS-3"><span class="tsd-kind-call-signature">DFS</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span><a href="#DFS.DFS-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
453
457
|
<li class="tsd-description">
|
|
454
458
|
<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
|
|
455
459
|
specified pattern and node or property name.</p>
|
|
@@ -472,12 +476,12 @@ either the name of a property in the <code>BinaryTreeNode</code> object or the v
|
|
|
472
476
|
no value</p>
|
|
473
477
|
</div>
|
|
474
478
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
475
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">
|
|
479
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>ResultsByProperty<N></code>.</p>
|
|
476
480
|
|
|
477
481
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
478
482
|
<ul>
|
|
479
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
480
|
-
<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><
|
|
483
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L990">src/data-structures/binary-tree/binary-tree.ts:990</a></li></ul></aside></li>
|
|
484
|
+
<li class="tsd-signature tsd-anchor-link" id="DFS.DFS-4"><span class="tsd-kind-call-signature">DFS</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span><a href="#DFS.DFS-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
481
485
|
<li class="tsd-description">
|
|
482
486
|
<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
|
|
483
487
|
specified pattern and node or property name.</p>
|
|
@@ -500,11 +504,11 @@ either the name of a property in the <code>BinaryTreeNode</code> object or the v
|
|
|
500
504
|
no value</p>
|
|
501
505
|
</div>
|
|
502
506
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
503
|
-
<h4 class="tsd-returns-title">Returns <
|
|
507
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>ResultsByProperty<N></code>.</p>
|
|
504
508
|
|
|
505
509
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
506
510
|
<ul>
|
|
507
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
511
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L992">src/data-structures/binary-tree/binary-tree.ts:992</a></li></ul></aside></li>
|
|
508
512
|
<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>
|
|
509
513
|
<li class="tsd-description">
|
|
510
514
|
<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
|
|
@@ -528,11 +532,11 @@ either the name of a property in the <code>BinaryTreeNode</code> object or the v
|
|
|
528
532
|
no value</p>
|
|
529
533
|
</div>
|
|
530
534
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
531
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>ResultsByProperty<
|
|
535
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>ResultsByProperty<N></code>.</p>
|
|
532
536
|
|
|
533
537
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
534
538
|
<ul>
|
|
535
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
539
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L994">src/data-structures/binary-tree/binary-tree.ts:994</a></li></ul></aside></li></ul></section>
|
|
536
540
|
<section class="tsd-panel tsd-member"><a id="DFSIterative" class="tsd-anchor"></a>
|
|
537
541
|
<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>
|
|
538
542
|
<ul class="tsd-signatures">
|
|
@@ -544,7 +548,7 @@ Space complexity of Iterative DFS equals to recursive DFS which is O(n) because
|
|
|
544
548
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4>
|
|
545
549
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
546
550
|
<ul>
|
|
547
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
551
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1036">src/data-structures/binary-tree/binary-tree.ts:1036</a></li></ul></aside></li>
|
|
548
552
|
<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>
|
|
549
553
|
<li class="tsd-description">
|
|
550
554
|
<div class="tsd-comment tsd-typography"><p>Time complexity is O(n)
|
|
@@ -562,8 +566,8 @@ Space complexity of Iterative DFS equals to recursive DFS which is O(n) because
|
|
|
562
566
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4>
|
|
563
567
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
564
568
|
<ul>
|
|
565
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
566
|
-
<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">
|
|
569
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1038">src/data-structures/binary-tree/binary-tree.ts:1038</a></li></ul></aside></li>
|
|
570
|
+
<li class="tsd-signature tsd-anchor-link" id="DFSIterative.DFSIterative-3"><span class="tsd-kind-call-signature">DFSIterative</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span><a href="#DFSIterative.DFSIterative-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
567
571
|
<li class="tsd-description">
|
|
568
572
|
<div class="tsd-comment tsd-typography"><p>Time complexity is O(n)
|
|
569
573
|
Space complexity of Iterative DFS equals to recursive DFS which is O(n) because of the stack</p>
|
|
@@ -577,11 +581,11 @@ Space complexity of Iterative DFS equals to recursive DFS which is O(n) because
|
|
|
577
581
|
<li>
|
|
578
582
|
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">nodeOrPropertyName</span>: <span class="tsd-signature-type">"val"</span></h5>
|
|
579
583
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
580
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">
|
|
584
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4>
|
|
581
585
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
582
586
|
<ul>
|
|
583
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
584
|
-
<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><
|
|
587
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1040">src/data-structures/binary-tree/binary-tree.ts:1040</a></li></ul></aside></li>
|
|
588
|
+
<li class="tsd-signature tsd-anchor-link" id="DFSIterative.DFSIterative-4"><span class="tsd-kind-call-signature">DFSIterative</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span><a href="#DFSIterative.DFSIterative-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
585
589
|
<li class="tsd-description">
|
|
586
590
|
<div class="tsd-comment tsd-typography"><p>Time complexity is O(n)
|
|
587
591
|
Space complexity of Iterative DFS equals to recursive DFS which is O(n) because of the stack</p>
|
|
@@ -595,10 +599,10 @@ Space complexity of Iterative DFS equals to recursive DFS which is O(n) because
|
|
|
595
599
|
<li>
|
|
596
600
|
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">nodeOrPropertyName</span>: <span class="tsd-signature-type">"node"</span></h5>
|
|
597
601
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
598
|
-
<h4 class="tsd-returns-title">Returns <
|
|
602
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4>
|
|
599
603
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
600
604
|
<ul>
|
|
601
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
605
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1042">src/data-structures/binary-tree/binary-tree.ts:1042</a></li></ul></aside></li>
|
|
602
606
|
<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>
|
|
603
607
|
<li class="tsd-description">
|
|
604
608
|
<div class="tsd-comment tsd-typography"><p>Time complexity is O(n)
|
|
@@ -616,7 +620,7 @@ Space complexity of Iterative DFS equals to recursive DFS which is O(n) because
|
|
|
616
620
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4>
|
|
617
621
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
618
622
|
<ul>
|
|
619
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
623
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1044">src/data-structures/binary-tree/binary-tree.ts:1044</a></li></ul></aside></li></ul></section>
|
|
620
624
|
<section class="tsd-panel tsd-member tsd-is-protected"><a id="_accumulatedByPropertyName" class="tsd-anchor"></a>
|
|
621
625
|
<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>
|
|
622
626
|
<ul class="tsd-signatures tsd-is-protected">
|
|
@@ -629,8 +633,8 @@ provided property name or a default property name.</p>
|
|
|
629
633
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
630
634
|
<ul class="tsd-parameter-list">
|
|
631
635
|
<li>
|
|
632
|
-
<h5><span class="tsd-kind-parameter">node</span>: <
|
|
633
|
-
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is of type <code>
|
|
636
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
637
|
+
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is of type <code>N</code>, which represents a node in a binary tree.</p>
|
|
634
638
|
</div>
|
|
635
639
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
636
640
|
<li>
|
|
@@ -643,11 +647,46 @@ the property name of the node that should be accumulated. If it is a node object
|
|
|
643
647
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
644
648
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
645
649
|
<ul>
|
|
646
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
650
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1456">src/data-structures/binary-tree/binary-tree.ts:1456</a></li></ul></aside></li></ul></section>
|
|
651
|
+
<section class="tsd-panel tsd-member"><a id="_createNode" class="tsd-anchor"></a>
|
|
652
|
+
<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>
|
|
653
|
+
<ul class="tsd-signatures">
|
|
654
|
+
<li class="tsd-signature tsd-anchor-link" id="_createNode._createNode-1"><span class="tsd-kind-call-signature">_create<wbr/>Node</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">id</span>, <span class="tsd-kind-parameter">val</span>, <span class="tsd-kind-parameter">count</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><a href="#_createNode._createNode-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
655
|
+
<li class="tsd-description">
|
|
656
|
+
<div class="tsd-comment tsd-typography"><p>The function creates a new binary tree node with the given id, value, and count if the value is not null, otherwise
|
|
657
|
+
it returns null.</p>
|
|
658
|
+
</div>
|
|
659
|
+
<div class="tsd-parameters">
|
|
660
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
661
|
+
<ul class="tsd-parameter-list">
|
|
662
|
+
<li>
|
|
663
|
+
<h5><span class="tsd-kind-parameter">id</span>: <span class="tsd-signature-type">number</span></h5>
|
|
664
|
+
<div class="tsd-comment tsd-typography"><p>The <code>id</code> parameter is the identifier for the binary tree node. It is of type
|
|
665
|
+
<code>BinaryTreeNodeId</code>.</p>
|
|
666
|
+
</div>
|
|
667
|
+
<div class="tsd-comment tsd-typography"></div></li>
|
|
668
|
+
<li>
|
|
669
|
+
<h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span></h5>
|
|
670
|
+
<div class="tsd-comment tsd-typography"><p>The <code>val</code> parameter represents the value of the node. It can be of type <code>N</code> (generic type)
|
|
671
|
+
or <code>null</code>.</p>
|
|
672
|
+
</div>
|
|
673
|
+
<div class="tsd-comment tsd-typography"></div></li>
|
|
674
|
+
<li>
|
|
675
|
+
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">count</span>: <span class="tsd-signature-type">number</span></h5>
|
|
676
|
+
<div class="tsd-comment tsd-typography"><p>The <code>count</code> parameter is an optional parameter of type <code>number</code>. It represents the number
|
|
677
|
+
of occurrences of the value in the binary tree node. If not provided, the default value is <code>undefined</code>.</p>
|
|
678
|
+
</div>
|
|
679
|
+
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
680
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h4><p>a BinaryTreeNode object if the value is not null, otherwise it returns null.</p>
|
|
681
|
+
|
|
682
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
683
|
+
<p>Implementation of <a href="../interfaces/IBinaryTree.html">IBinaryTree</a>.<a href="../interfaces/IBinaryTree.html#_createNode">_createNode</a></p>
|
|
684
|
+
<ul>
|
|
685
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L265">src/data-structures/binary-tree/binary-tree.ts:265</a></li></ul></aside></li></ul></section>
|
|
647
686
|
<section class="tsd-panel tsd-member tsd-is-protected"><a id="_getResultByPropertyName" class="tsd-anchor"></a>
|
|
648
687
|
<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>
|
|
649
688
|
<ul class="tsd-signatures tsd-is-protected">
|
|
650
|
-
<li class="tsd-signature tsd-anchor-link" id="_getResultByPropertyName._getResultByPropertyName-1"><span class="tsd-kind-call-signature">_get<wbr/>Result<wbr/>By<wbr/>Property<wbr/>Name</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../types/ResultsByProperty.html" class="tsd-signature-type tsd-kind-type-alias">ResultsByProperty</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
689
|
+
<li class="tsd-signature tsd-anchor-link" id="_getResultByPropertyName._getResultByPropertyName-1"><span class="tsd-kind-call-signature">_get<wbr/>Result<wbr/>By<wbr/>Property<wbr/>Name</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../types/ResultsByProperty.html" class="tsd-signature-type tsd-kind-type-alias">ResultsByProperty</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">></span><a href="#_getResultByPropertyName._getResultByPropertyName-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
651
690
|
<li class="tsd-description">
|
|
652
691
|
<div class="tsd-comment tsd-typography"><p>The function <code>_getResultByPropertyName</code> returns different results based on the provided property name or defaulting
|
|
653
692
|
to 'id'.</p>
|
|
@@ -661,11 +700,11 @@ to 'id'.</p>
|
|
|
661
700
|
can accept a value of type <code>NodeOrPropertyName</code>.</p>
|
|
662
701
|
</div>
|
|
663
702
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
664
|
-
<h4 class="tsd-returns-title">Returns <a href="../types/ResultsByProperty.html" class="tsd-signature-type tsd-kind-type-alias">ResultsByProperty</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
703
|
+
<h4 class="tsd-returns-title">Returns <a href="../types/ResultsByProperty.html" class="tsd-signature-type tsd-kind-type-alias">ResultsByProperty</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">></span></h4><p>The method returns an object of type <code>ResultsByProperty<T></code>.</p>
|
|
665
704
|
|
|
666
705
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
667
706
|
<ul>
|
|
668
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
707
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1485">src/data-structures/binary-tree/binary-tree.ts:1485</a></li></ul></aside></li></ul></section>
|
|
669
708
|
<section class="tsd-panel tsd-member tsd-is-protected"><a id="_pushByPropertyNameStopOrNot" class="tsd-anchor"></a>
|
|
670
709
|
<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>
|
|
671
710
|
<ul class="tsd-signatures tsd-is-protected">
|
|
@@ -678,18 +717,18 @@ a result array.</p>
|
|
|
678
717
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
679
718
|
<ul class="tsd-parameter-list">
|
|
680
719
|
<li>
|
|
681
|
-
<h5><span class="tsd-kind-parameter">cur</span>: <
|
|
720
|
+
<h5><span class="tsd-kind-parameter">cur</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
682
721
|
<div class="tsd-comment tsd-typography"><p>The current binary tree node that is being checked.</p>
|
|
683
722
|
</div>
|
|
684
723
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
685
724
|
<li>
|
|
686
|
-
<h5><span class="tsd-kind-parameter">result</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
725
|
+
<h5><span class="tsd-kind-parameter">result</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span></h5>
|
|
687
726
|
<div class="tsd-comment tsd-typography"><p>An array that stores the matching nodes found during the
|
|
688
727
|
traversal.</p>
|
|
689
728
|
</div>
|
|
690
729
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
691
730
|
<li>
|
|
692
|
-
<h5><span class="tsd-kind-parameter">nodeProperty</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
731
|
+
<h5><span class="tsd-kind-parameter">nodeProperty</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
693
732
|
<div class="tsd-comment tsd-typography"><p>The <code>nodeProperty</code> parameter is the value that we are searching for in
|
|
694
733
|
the binary tree nodes. It can be either the <code>id</code>, <code>count</code>, or <code>val</code> property of the node.</p>
|
|
695
734
|
</div>
|
|
@@ -712,7 +751,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
712
751
|
|
|
713
752
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
714
753
|
<ul>
|
|
715
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
754
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1419">src/data-structures/binary-tree/binary-tree.ts:1419</a></li></ul></aside></li></ul></section>
|
|
716
755
|
<section class="tsd-panel tsd-member tsd-is-protected"><a id="_resetResults" class="tsd-anchor"></a>
|
|
717
756
|
<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>
|
|
718
757
|
<ul class="tsd-signatures tsd-is-protected">
|
|
@@ -723,7 +762,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
723
762
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
724
763
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
725
764
|
<ul>
|
|
726
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
765
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1395">src/data-structures/binary-tree/binary-tree.ts:1395</a></li></ul></aside></li></ul></section>
|
|
727
766
|
<section class="tsd-panel tsd-member tsd-is-protected"><a id="_setAutoIncrementId" class="tsd-anchor"></a>
|
|
728
767
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_set<wbr/>Auto<wbr/>Increment<wbr/>Id</span><a href="#_setAutoIncrementId" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
729
768
|
<ul class="tsd-signatures tsd-is-protected">
|
|
@@ -736,7 +775,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
736
775
|
<h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">boolean</span></h5></li></ul></div>
|
|
737
776
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
738
777
|
<ul>
|
|
739
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
778
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1364">src/data-structures/binary-tree/binary-tree.ts:1364</a></li></ul></aside></li></ul></section>
|
|
740
779
|
<section class="tsd-panel tsd-member tsd-is-protected"><a id="_setCount" class="tsd-anchor"></a>
|
|
741
780
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_set<wbr/>Count</span><a href="#_setCount" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
742
781
|
<ul class="tsd-signatures tsd-is-protected">
|
|
@@ -749,7 +788,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
749
788
|
<h5><span class="tsd-kind-parameter">v</span>: <span class="tsd-signature-type">number</span></h5></li></ul></div>
|
|
750
789
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
751
790
|
<ul>
|
|
752
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
791
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1388">src/data-structures/binary-tree/binary-tree.ts:1388</a></li></ul></aside></li></ul></section>
|
|
753
792
|
<section class="tsd-panel tsd-member tsd-is-protected"><a id="_setIsDuplicatedVal" class="tsd-anchor"></a>
|
|
754
793
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_set<wbr/>Is<wbr/>Duplicated<wbr/>Val</span><a href="#_setIsDuplicatedVal" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
755
794
|
<ul class="tsd-signatures tsd-is-protected">
|
|
@@ -762,7 +801,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
762
801
|
<h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">boolean</span></h5></li></ul></div>
|
|
763
802
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
764
803
|
<ul>
|
|
765
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
804
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1372">src/data-structures/binary-tree/binary-tree.ts:1372</a></li></ul></aside></li></ul></section>
|
|
766
805
|
<section class="tsd-panel tsd-member tsd-is-protected"><a id="_setLoopType" class="tsd-anchor"></a>
|
|
767
806
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_set<wbr/>Loop<wbr/>Type</span><a href="#_setLoopType" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
768
807
|
<ul class="tsd-signatures tsd-is-protected">
|
|
@@ -775,7 +814,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
775
814
|
<h5><span class="tsd-kind-parameter">value</span>: <a href="../enums/LoopType.html" class="tsd-signature-type tsd-kind-enum">LoopType</a></h5></li></ul></div>
|
|
776
815
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
777
816
|
<ul>
|
|
778
|
-
<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/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1340">src/data-structures/binary-tree/binary-tree.ts:1340</a></li></ul></aside></li></ul></section>
|
|
779
818
|
<section class="tsd-panel tsd-member tsd-is-protected"><a id="_setMaxId" class="tsd-anchor"></a>
|
|
780
819
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_set<wbr/>Max<wbr/>Id</span><a href="#_setMaxId" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
781
820
|
<ul class="tsd-signatures tsd-is-protected">
|
|
@@ -788,7 +827,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
788
827
|
<h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">number</span></h5></li></ul></div>
|
|
789
828
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
790
829
|
<ul>
|
|
791
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
830
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1368">src/data-structures/binary-tree/binary-tree.ts:1368</a></li></ul></aside></li></ul></section>
|
|
792
831
|
<section class="tsd-panel tsd-member tsd-is-protected"><a id="_setRoot" class="tsd-anchor"></a>
|
|
793
832
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_set<wbr/>Root</span><a href="#_setRoot" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
794
833
|
<ul class="tsd-signatures tsd-is-protected">
|
|
@@ -798,10 +837,10 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
798
837
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
799
838
|
<ul class="tsd-parameter-list">
|
|
800
839
|
<li>
|
|
801
|
-
<h5><span class="tsd-kind-parameter">v</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
840
|
+
<h5><span class="tsd-kind-parameter">v</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5></li></ul></div>
|
|
802
841
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
803
842
|
<ul>
|
|
804
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
843
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1376">src/data-structures/binary-tree/binary-tree.ts:1376</a></li></ul></aside></li></ul></section>
|
|
805
844
|
<section class="tsd-panel tsd-member tsd-is-protected"><a id="_setSize" class="tsd-anchor"></a>
|
|
806
845
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_set<wbr/>Size</span><a href="#_setSize" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
807
846
|
<ul class="tsd-signatures tsd-is-protected">
|
|
@@ -814,7 +853,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
814
853
|
<h5><span class="tsd-kind-parameter">v</span>: <span class="tsd-signature-type">number</span></h5></li></ul></div>
|
|
815
854
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
816
855
|
<ul>
|
|
817
|
-
<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/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1384">src/data-structures/binary-tree/binary-tree.ts:1384</a></li></ul></aside></li></ul></section>
|
|
818
857
|
<section class="tsd-panel tsd-member tsd-is-protected"><a id="_setVisitedId" class="tsd-anchor"></a>
|
|
819
858
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_set<wbr/>Visited<wbr/>Id</span><a href="#_setVisitedId" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
820
859
|
<ul class="tsd-signatures tsd-is-protected">
|
|
@@ -827,7 +866,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
827
866
|
<h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h5></li></ul></div>
|
|
828
867
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
829
868
|
<ul>
|
|
830
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
869
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1344">src/data-structures/binary-tree/binary-tree.ts:1344</a></li></ul></aside></li></ul></section>
|
|
831
870
|
<section class="tsd-panel tsd-member tsd-is-protected"><a id="_setVisitedLeftSum" class="tsd-anchor"></a>
|
|
832
871
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_set<wbr/>Visited<wbr/>Left<wbr/>Sum</span><a href="#_setVisitedLeftSum" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
833
872
|
<ul class="tsd-signatures tsd-is-protected">
|
|
@@ -840,7 +879,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
840
879
|
<h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h5></li></ul></div>
|
|
841
880
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
842
881
|
<ul>
|
|
843
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
882
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1360">src/data-structures/binary-tree/binary-tree.ts:1360</a></li></ul></aside></li></ul></section>
|
|
844
883
|
<section class="tsd-panel tsd-member tsd-is-protected"><a id="_setVisitedNode" class="tsd-anchor"></a>
|
|
845
884
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_set<wbr/>Visited<wbr/>Node</span><a href="#_setVisitedNode" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
846
885
|
<ul class="tsd-signatures tsd-is-protected">
|
|
@@ -850,10 +889,10 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
850
889
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
851
890
|
<ul class="tsd-parameter-list">
|
|
852
891
|
<li>
|
|
853
|
-
<h5><span class="tsd-kind-parameter">value</span>: <
|
|
892
|
+
<h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h5></li></ul></div>
|
|
854
893
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
855
894
|
<ul>
|
|
856
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
895
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1352">src/data-structures/binary-tree/binary-tree.ts:1352</a></li></ul></aside></li></ul></section>
|
|
857
896
|
<section class="tsd-panel tsd-member tsd-is-protected"><a id="_setVisitedVal" class="tsd-anchor"></a>
|
|
858
897
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_set<wbr/>Visited<wbr/>Val</span><a href="#_setVisitedVal" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
859
898
|
<ul class="tsd-signatures tsd-is-protected">
|
|
@@ -863,14 +902,14 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
863
902
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
864
903
|
<ul class="tsd-parameter-list">
|
|
865
904
|
<li>
|
|
866
|
-
<h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type tsd-kind-type-parameter">
|
|
905
|
+
<h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h5></li></ul></div>
|
|
867
906
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
868
907
|
<ul>
|
|
869
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
908
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1348">src/data-structures/binary-tree/binary-tree.ts:1348</a></li></ul></aside></li></ul></section>
|
|
870
909
|
<section class="tsd-panel tsd-member"><a id="add" class="tsd-anchor"></a>
|
|
871
910
|
<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>
|
|
872
911
|
<ul class="tsd-signatures">
|
|
873
|
-
<li class="tsd-signature tsd-anchor-link" id="add.add-1"><span class="tsd-kind-call-signature">add</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">id</span>, <span class="tsd-kind-parameter">val</span>, <span class="tsd-kind-parameter">count</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
912
|
+
<li class="tsd-signature tsd-anchor-link" id="add.add-1"><span class="tsd-kind-call-signature">add</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">id</span>, <span class="tsd-kind-parameter">val</span>, <span class="tsd-kind-parameter">count</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><a href="#add.add-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
874
913
|
<li class="tsd-description">
|
|
875
914
|
<div class="tsd-comment tsd-typography"><p>The <code>add</code> function inserts a new node with a given ID and value into a binary tree, updating the count if the node
|
|
876
915
|
already exists.</p>
|
|
@@ -885,7 +924,7 @@ identify each node in the binary tree.</p>
|
|
|
885
924
|
</div>
|
|
886
925
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
887
926
|
<li>
|
|
888
|
-
<h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">
|
|
927
|
+
<h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span></h5>
|
|
889
928
|
<div class="tsd-comment tsd-typography"><p>The value to be inserted into the binary tree.</p>
|
|
890
929
|
</div>
|
|
891
930
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
@@ -895,16 +934,16 @@ identify each node in the binary tree.</p>
|
|
|
895
934
|
value should be inserted into the binary tree. If not provided, it defaults to 1.</p>
|
|
896
935
|
</div>
|
|
897
936
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
898
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
937
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h4><p>The function <code>add</code> returns a <code>N</code> object if a new node is inserted, or <code>null</code> if no new node
|
|
899
938
|
is inserted, or <code>undefined</code> if the insertion fails.</p>
|
|
900
939
|
|
|
901
940
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
902
941
|
<ul>
|
|
903
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
942
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L299">src/data-structures/binary-tree/binary-tree.ts:299</a></li></ul></aside></li></ul></section>
|
|
904
943
|
<section class="tsd-panel tsd-member"><a id="addMany" class="tsd-anchor"></a>
|
|
905
944
|
<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>
|
|
906
945
|
<ul class="tsd-signatures">
|
|
907
|
-
<li class="tsd-signature tsd-anchor-link" id="addMany.addMany-1"><span class="tsd-kind-call-signature">add<wbr/>Many</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
946
|
+
<li class="tsd-signature tsd-anchor-link" id="addMany.addMany-1"><span class="tsd-kind-call-signature">add<wbr/>Many</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span><a href="#addMany.addMany-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
908
947
|
<li class="tsd-description">
|
|
909
948
|
<div class="tsd-comment tsd-typography"><p>The <code>addMany</code> function inserts multiple items into a binary tree and returns an array of the inserted nodes or
|
|
910
949
|
null/undefined values.</p>
|
|
@@ -913,20 +952,20 @@ null/undefined values.</p>
|
|
|
913
952
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
914
953
|
<ul class="tsd-parameter-list">
|
|
915
954
|
<li>
|
|
916
|
-
<h5><span class="tsd-kind-parameter">data</span>: <span class="tsd-signature-type tsd-kind-type-parameter">
|
|
917
|
-
<div class="tsd-comment tsd-typography"><p>The <code>data</code> parameter can be either an array of elements of type <code>
|
|
918
|
-
array of <code>
|
|
955
|
+
<h5><span class="tsd-kind-parameter">data</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h5>
|
|
956
|
+
<div class="tsd-comment tsd-typography"><p>The <code>data</code> parameter can be either an array of elements of type <code>N</code> or an
|
|
957
|
+
array of <code>N</code> objects.</p>
|
|
919
958
|
</div>
|
|
920
959
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
921
|
-
<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><
|
|
960
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">(</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>addMany</code> returns an array of <code>N</code>, <code>null</code>, or <code>undefined</code> values.</p>
|
|
922
961
|
|
|
923
962
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
924
963
|
<ul>
|
|
925
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
964
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L389">src/data-structures/binary-tree/binary-tree.ts:389</a></li></ul></aside></li></ul></section>
|
|
926
965
|
<section class="tsd-panel tsd-member"><a id="addTo" class="tsd-anchor"></a>
|
|
927
966
|
<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>
|
|
928
967
|
<ul class="tsd-signatures">
|
|
929
|
-
<li class="tsd-signature tsd-anchor-link" id="addTo.addTo-1"><span class="tsd-kind-call-signature">add<wbr/>To</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">newNode</span>, <span class="tsd-kind-parameter">parent</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
968
|
+
<li class="tsd-signature tsd-anchor-link" id="addTo.addTo-1"><span class="tsd-kind-call-signature">add<wbr/>To</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">newNode</span>, <span class="tsd-kind-parameter">parent</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><a href="#addTo.addTo-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
930
969
|
<li class="tsd-description">
|
|
931
970
|
<div class="tsd-comment tsd-typography"><p>The function inserts a new node into a binary tree as the left or right child of a given parent node.</p>
|
|
932
971
|
</div>
|
|
@@ -934,22 +973,22 @@ array of <code>BinaryTreeNode<T></code> objects.</p>
|
|
|
934
973
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
935
974
|
<ul class="tsd-parameter-list">
|
|
936
975
|
<li>
|
|
937
|
-
<h5><span class="tsd-kind-parameter">newNode</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
976
|
+
<h5><span class="tsd-kind-parameter">newNode</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
938
977
|
<div class="tsd-comment tsd-typography"><p>The <code>newNode</code> parameter is an instance of the <code>BinaryTreeNode</code> class or
|
|
939
978
|
<code>null</code>. It represents the node that needs to be inserted into the binary tree.</p>
|
|
940
979
|
</div>
|
|
941
980
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
942
981
|
<li>
|
|
943
|
-
<h5><span class="tsd-kind-parameter">parent</span>: <
|
|
982
|
+
<h5><span class="tsd-kind-parameter">parent</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
944
983
|
<div class="tsd-comment tsd-typography"><p>The <code>parent</code> parameter is a BinaryTreeNode object representing the parent node to which the new node
|
|
945
984
|
will be inserted as a child.</p>
|
|
946
985
|
</div>
|
|
947
986
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
948
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
987
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h4><p>The method returns the newly inserted node, either as the left child or the right child of the parent node.</p>
|
|
949
988
|
|
|
950
989
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
951
990
|
<ul>
|
|
952
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
991
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L349">src/data-structures/binary-tree/binary-tree.ts:349</a></li></ul></aside></li></ul></section>
|
|
953
992
|
<section class="tsd-panel tsd-member"><a id="clear" class="tsd-anchor"></a>
|
|
954
993
|
<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>
|
|
955
994
|
<ul class="tsd-signatures">
|
|
@@ -960,42 +999,7 @@ will be inserted as a child.</p>
|
|
|
960
999
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
961
1000
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
962
1001
|
<ul>
|
|
963
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
964
|
-
<section class="tsd-panel tsd-member"><a id="createNode" class="tsd-anchor"></a>
|
|
965
|
-
<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>
|
|
966
|
-
<ul class="tsd-signatures">
|
|
967
|
-
<li class="tsd-signature tsd-anchor-link" id="createNode.createNode-1"><span class="tsd-kind-call-signature">create<wbr/>Node</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">id</span>, <span class="tsd-kind-parameter">val</span>, <span class="tsd-kind-parameter">count</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="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="#createNode.createNode-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
968
|
-
<li class="tsd-description">
|
|
969
|
-
<div class="tsd-comment tsd-typography"><p>The function creates a new binary tree node with the given id, value, and count, or returns null if the value is
|
|
970
|
-
null.</p>
|
|
971
|
-
</div>
|
|
972
|
-
<div class="tsd-parameters">
|
|
973
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
974
|
-
<ul class="tsd-parameter-list">
|
|
975
|
-
<li>
|
|
976
|
-
<h5><span class="tsd-kind-parameter">id</span>: <span class="tsd-signature-type">number</span></h5>
|
|
977
|
-
<div class="tsd-comment tsd-typography"><p>The <code>id</code> parameter is the identifier for the binary tree node. It is of type
|
|
978
|
-
<code>BinaryTreeNodeId</code>, which could be a string or a number, depending on how you want to identify your nodes.</p>
|
|
979
|
-
</div>
|
|
980
|
-
<div class="tsd-comment tsd-typography"></div></li>
|
|
981
|
-
<li>
|
|
982
|
-
<h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
|
|
983
|
-
<div class="tsd-comment tsd-typography"><p>The <code>val</code> parameter represents the value to be stored in the binary tree node. It can be of
|
|
984
|
-
any type <code>T</code> or <code>null</code>.</p>
|
|
985
|
-
</div>
|
|
986
|
-
<div class="tsd-comment tsd-typography"></div></li>
|
|
987
|
-
<li>
|
|
988
|
-
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">count</span>: <span class="tsd-signature-type">number</span></h5>
|
|
989
|
-
<div class="tsd-comment tsd-typography"><p>The count parameter is an optional parameter that represents the number of occurrences of
|
|
990
|
-
the value in the binary tree node. It is of type number.</p>
|
|
991
|
-
</div>
|
|
992
|
-
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
993
|
-
<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><p>The function <code>createNode</code> returns a <code>BinaryTreeNode<T></code> object if the <code>val</code> parameter is not null.
|
|
994
|
-
Otherwise, it returns null.</p>
|
|
995
|
-
|
|
996
|
-
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
997
|
-
<ul>
|
|
998
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c1b5969/src/data-structures/binary-tree/binary-tree.ts#L257">src/data-structures/binary-tree/binary-tree.ts:257</a></li></ul></aside></li></ul></section>
|
|
1002
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L273">src/data-structures/binary-tree/binary-tree.ts:273</a></li></ul></aside></li></ul></section>
|
|
999
1003
|
<section class="tsd-panel tsd-member"><a id="fill" class="tsd-anchor"></a>
|
|
1000
1004
|
<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>
|
|
1001
1005
|
<ul class="tsd-signatures">
|
|
@@ -1008,20 +1012,20 @@ was successful.</p>
|
|
|
1008
1012
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1009
1013
|
<ul class="tsd-parameter-list">
|
|
1010
1014
|
<li>
|
|
1011
|
-
<h5><span class="tsd-kind-parameter">data</span>: <span class="tsd-signature-type tsd-kind-type-parameter">
|
|
1012
|
-
<div class="tsd-comment tsd-typography"><p>The <code>data</code> parameter can be either an array of elements of type <code>
|
|
1013
|
-
array of <code>
|
|
1015
|
+
<h5><span class="tsd-kind-parameter">data</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h5>
|
|
1016
|
+
<div class="tsd-comment tsd-typography"><p>The <code>data</code> parameter can be either an array of elements of type <code>N</code> or an
|
|
1017
|
+
array of <code>N</code> objects.</p>
|
|
1014
1018
|
</div>
|
|
1015
1019
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1016
1020
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>The method is returning a boolean value.</p>
|
|
1017
1021
|
|
|
1018
1022
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1019
1023
|
<ul>
|
|
1020
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1024
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L436">src/data-structures/binary-tree/binary-tree.ts:436</a></li></ul></aside></li></ul></section>
|
|
1021
1025
|
<section class="tsd-panel tsd-member"><a id="get" class="tsd-anchor"></a>
|
|
1022
1026
|
<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>
|
|
1023
1027
|
<ul class="tsd-signatures">
|
|
1024
|
-
<li class="tsd-signature tsd-anchor-link" id="get.get-1"><span class="tsd-kind-call-signature">get</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">nodeProperty</span>, <span class="tsd-kind-parameter">propertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1028
|
+
<li class="tsd-signature tsd-anchor-link" id="get.get-1"><span class="tsd-kind-call-signature">get</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">nodeProperty</span>, <span class="tsd-kind-parameter">propertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><a href="#get.get-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1025
1029
|
<li class="tsd-description">
|
|
1026
1030
|
<div class="tsd-comment tsd-typography"><p>The function returns the first binary tree node that matches the given property name and value, or null if no match
|
|
1027
1031
|
is found.</p>
|
|
@@ -1030,9 +1034,9 @@ is found.</p>
|
|
|
1030
1034
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1031
1035
|
<ul class="tsd-parameter-list">
|
|
1032
1036
|
<li>
|
|
1033
|
-
<h5><span class="tsd-kind-parameter">nodeProperty</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
1037
|
+
<h5><span class="tsd-kind-parameter">nodeProperty</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1034
1038
|
<div class="tsd-comment tsd-typography"><p>The <code>nodeProperty</code> parameter can be either a <code>BinaryTreeNodeId</code> or a
|
|
1035
|
-
generic type <code>
|
|
1039
|
+
generic type <code>N</code>. It represents the property of the binary tree node that you want to search for.</p>
|
|
1036
1040
|
</div>
|
|
1037
1041
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
1038
1042
|
<li>
|
|
@@ -1041,11 +1045,11 @@ generic type <code>T</code>. It represents the property of the binary tree node
|
|
|
1041
1045
|
specifies the property of the binary tree node to search for. If not provided, it defaults to <code>'id'</code>.</p>
|
|
1042
1046
|
</div>
|
|
1043
1047
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1044
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1048
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h4><p>a BinaryTreeNode object or null.</p>
|
|
1045
1049
|
|
|
1046
1050
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1047
1051
|
<ul>
|
|
1048
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1052
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L676">src/data-structures/binary-tree/binary-tree.ts:676</a></li></ul></aside></li></ul></section>
|
|
1049
1053
|
<section class="tsd-panel tsd-member"><a id="getDepth" class="tsd-anchor"></a>
|
|
1050
1054
|
<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>
|
|
1051
1055
|
<ul class="tsd-signatures">
|
|
@@ -1057,8 +1061,8 @@ specifies the property of the binary tree node to search for. If not provided, i
|
|
|
1057
1061
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1058
1062
|
<ul class="tsd-parameter-list">
|
|
1059
1063
|
<li>
|
|
1060
|
-
<h5><span class="tsd-kind-parameter">node</span>: <
|
|
1061
|
-
<div class="tsd-comment tsd-typography"><p>
|
|
1064
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1065
|
+
<div class="tsd-comment tsd-typography"><p>N - This is the node for which we want to calculate the depth. It is a generic type,
|
|
1062
1066
|
meaning it can represent any type of data that we want to store in the node.</p>
|
|
1063
1067
|
</div>
|
|
1064
1068
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
@@ -1066,7 +1070,7 @@ meaning it can represent any type of data that we want to store in the node.</p>
|
|
|
1066
1070
|
|
|
1067
1071
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1068
1072
|
<ul>
|
|
1069
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1073
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L494">src/data-structures/binary-tree/binary-tree.ts:494</a></li></ul></aside></li></ul></section>
|
|
1070
1074
|
<section class="tsd-panel tsd-member"><a id="getHeight" class="tsd-anchor"></a>
|
|
1071
1075
|
<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>
|
|
1072
1076
|
<ul class="tsd-signatures">
|
|
@@ -1079,9 +1083,9 @@ approach.</p>
|
|
|
1079
1083
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1080
1084
|
<ul class="tsd-parameter-list">
|
|
1081
1085
|
<li>
|
|
1082
|
-
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">beginRoot</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1086
|
+
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">beginRoot</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1083
1087
|
<div class="tsd-comment tsd-typography"><p>The <code>beginRoot</code> parameter is an optional parameter of type
|
|
1084
|
-
<code>
|
|
1088
|
+
<code>N | null</code>. It represents the starting node from which to calculate the height of the binary tree.
|
|
1085
1089
|
If no value is provided for <code>beginRoot</code>, the function will use the <code>root</code> property of the class instance as</p>
|
|
1086
1090
|
</div>
|
|
1087
1091
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
@@ -1089,21 +1093,21 @@ If no value is provided for <code>beginRoot</code>, the function will use the <c
|
|
|
1089
1093
|
|
|
1090
1094
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1091
1095
|
<ul>
|
|
1092
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1096
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L511">src/data-structures/binary-tree/binary-tree.ts:511</a></li></ul></aside></li></ul></section>
|
|
1093
1097
|
<section class="tsd-panel tsd-member"><a id="getLeftMost" class="tsd-anchor"></a>
|
|
1094
1098
|
<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>
|
|
1095
1099
|
<ul class="tsd-signatures">
|
|
1096
|
-
<li class="tsd-signature tsd-anchor-link" id="getLeftMost.getLeftMost-1"><span class="tsd-kind-call-signature">get<wbr/>Left<wbr/>Most</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1100
|
+
<li class="tsd-signature tsd-anchor-link" id="getLeftMost.getLeftMost-1"><span class="tsd-kind-call-signature">get<wbr/>Left<wbr/>Most</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><a href="#getLeftMost.getLeftMost-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1097
1101
|
<li class="tsd-description">
|
|
1098
1102
|
<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
|
|
1099
1103
|
recursion optimization.</p>
|
|
1100
1104
|
</div>
|
|
1101
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1105
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h4><p>The <code>getLeftMost</code> function returns the leftmost node in a binary tree.</p>
|
|
1102
1106
|
|
|
1103
1107
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1104
1108
|
<ul>
|
|
1105
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1106
|
-
<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><
|
|
1109
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L698">src/data-structures/binary-tree/binary-tree.ts:698</a></li></ul></aside></li>
|
|
1110
|
+
<li class="tsd-signature tsd-anchor-link" id="getLeftMost.getLeftMost-2"><span class="tsd-kind-call-signature">get<wbr/>Left<wbr/>Most</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><a href="#getLeftMost.getLeftMost-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1107
1111
|
<li class="tsd-description">
|
|
1108
1112
|
<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
|
|
1109
1113
|
recursion optimization.</p>
|
|
@@ -1112,16 +1116,16 @@ recursion optimization.</p>
|
|
|
1112
1116
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1113
1117
|
<ul class="tsd-parameter-list">
|
|
1114
1118
|
<li>
|
|
1115
|
-
<h5><span class="tsd-kind-parameter">node</span>: <
|
|
1116
|
-
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is an optional parameter of type <code>
|
|
1119
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1120
|
+
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is an optional parameter of type <code>N | null</code>. It represents the starting node from which to find the leftmost node in a binary tree. If no node is
|
|
1117
1121
|
provided, the function will use the root node of the binary tree.</p>
|
|
1118
1122
|
</div>
|
|
1119
1123
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1120
|
-
<h4 class="tsd-returns-title">Returns <
|
|
1124
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h4><p>The <code>getLeftMost</code> function returns the leftmost node in a binary tree.</p>
|
|
1121
1125
|
|
|
1122
1126
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1123
1127
|
<ul>
|
|
1124
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1128
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L700">src/data-structures/binary-tree/binary-tree.ts:700</a></li></ul></aside></li></ul></section>
|
|
1125
1129
|
<section class="tsd-panel tsd-member"><a id="getMinHeight" class="tsd-anchor"></a>
|
|
1126
1130
|
<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>
|
|
1127
1131
|
<ul class="tsd-signatures">
|
|
@@ -1134,9 +1138,9 @@ approach.</p>
|
|
|
1134
1138
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1135
1139
|
<ul class="tsd-parameter-list">
|
|
1136
1140
|
<li>
|
|
1137
|
-
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">beginRoot</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1141
|
+
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">beginRoot</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1138
1142
|
<div class="tsd-comment tsd-typography"><p>The <code>beginRoot</code> parameter is an optional parameter of type
|
|
1139
|
-
<code>
|
|
1143
|
+
<code>N | null</code>. It represents the starting node from which to calculate the minimum height of the binary
|
|
1140
1144
|
tree. If no value is provided for <code>beginRoot</code>, the function will use the root node of the binary tree.</p>
|
|
1141
1145
|
</div>
|
|
1142
1146
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
@@ -1144,11 +1148,11 @@ tree. If no value is provided for <code>beginRoot</code>, the function will use
|
|
|
1144
1148
|
|
|
1145
1149
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1146
1150
|
<ul>
|
|
1147
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1151
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L560">src/data-structures/binary-tree/binary-tree.ts:560</a></li></ul></aside></li></ul></section>
|
|
1148
1152
|
<section class="tsd-panel tsd-member"><a id="getNodes" class="tsd-anchor"></a>
|
|
1149
1153
|
<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>
|
|
1150
1154
|
<ul class="tsd-signatures">
|
|
1151
|
-
<li class="tsd-signature tsd-anchor-link" id="getNodes.getNodes-1"><span class="tsd-kind-call-signature">get<wbr/>Nodes</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">nodeProperty</span>, <span class="tsd-kind-parameter">propertyName</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">onlyOne</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-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><
|
|
1155
|
+
<li class="tsd-signature tsd-anchor-link" id="getNodes.getNodes-1"><span class="tsd-kind-call-signature">get<wbr/>Nodes</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">nodeProperty</span>, <span class="tsd-kind-parameter">propertyName</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">onlyOne</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span><a href="#getNodes.getNodes-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1152
1156
|
<li class="tsd-description">
|
|
1153
1157
|
<div class="tsd-comment tsd-typography"><p>The function <code>getNodes</code> returns an array of binary tree nodes that match a given property value, with options for
|
|
1154
1158
|
searching recursively or iteratively.</p>
|
|
@@ -1157,9 +1161,9 @@ searching recursively or iteratively.</p>
|
|
|
1157
1161
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1158
1162
|
<ul class="tsd-parameter-list">
|
|
1159
1163
|
<li>
|
|
1160
|
-
<h5><span class="tsd-kind-parameter">nodeProperty</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
1164
|
+
<h5><span class="tsd-kind-parameter">nodeProperty</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1161
1165
|
<div class="tsd-comment tsd-typography"><p>The <code>nodeProperty</code> parameter can be either a <code>BinaryTreeNodeId</code> or a
|
|
1162
|
-
generic type <code>
|
|
1166
|
+
generic type <code>N</code>. It represents the property of the binary tree node that you want to search for.</p>
|
|
1163
1167
|
</div>
|
|
1164
1168
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
1165
1169
|
<li>
|
|
@@ -1172,17 +1176,17 @@ specifies the property name to use when searching for nodes. If not provided, it
|
|
|
1172
1176
|
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">onlyOne</span>: <span class="tsd-signature-type">boolean</span></h5>
|
|
1173
1177
|
<div class="tsd-comment tsd-typography"><p>The <code>onlyOne</code> parameter is an optional boolean parameter that determines whether to
|
|
1174
1178
|
return only one node that matches the <code>nodeProperty</code> or <code>propertyName</code> criteria. If <code>onlyOne</code> is set to <code>true</code>, the
|
|
1175
|
-
function will stop traversing the tree and return the first matching node. If <code>@returns The function</code>getNodes<code>returns an array of</code>
|
|
1179
|
+
function will stop traversing the tree and return the first matching node. If <code>@returns The function</code>getNodes<code>returns an array of</code>N | null | undefined` objects.</p>
|
|
1176
1180
|
</div>
|
|
1177
1181
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1178
|
-
<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><
|
|
1182
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">(</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span></h4>
|
|
1179
1183
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1180
1184
|
<ul>
|
|
1181
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1185
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L624">src/data-structures/binary-tree/binary-tree.ts:624</a></li></ul></aside></li></ul></section>
|
|
1182
1186
|
<section class="tsd-panel tsd-member"><a id="getPathToRoot" class="tsd-anchor"></a>
|
|
1183
1187
|
<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>
|
|
1184
1188
|
<ul class="tsd-signatures">
|
|
1185
|
-
<li class="tsd-signature tsd-anchor-link" id="getPathToRoot.getPathToRoot-1"><span class="tsd-kind-call-signature">get<wbr/>Path<wbr/>To<wbr/>Root</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><
|
|
1189
|
+
<li class="tsd-signature tsd-anchor-link" id="getPathToRoot.getPathToRoot-1"><span class="tsd-kind-call-signature">get<wbr/>Path<wbr/>To<wbr/>Root</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span><a href="#getPathToRoot.getPathToRoot-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1186
1190
|
<li class="tsd-description">
|
|
1187
1191
|
<div class="tsd-comment tsd-typography"><p>The function getPathToRoot returns an array of BinaryTreeNode objects representing the path from a given node to the
|
|
1188
1192
|
root of a binary tree.</p>
|
|
@@ -1191,20 +1195,20 @@ root of a binary tree.</p>
|
|
|
1191
1195
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1192
1196
|
<ul class="tsd-parameter-list">
|
|
1193
1197
|
<li>
|
|
1194
|
-
<h5><span class="tsd-kind-parameter">node</span>: <
|
|
1198
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1195
1199
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object.</p>
|
|
1196
1200
|
</div>
|
|
1197
1201
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1198
|
-
<h4 class="tsd-returns-title">Returns <
|
|
1202
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>getPathToRoot</code> returns an array of <code>N</code> objects, representing the path from
|
|
1199
1203
|
the given <code>node</code> to the root of the binary tree.</p>
|
|
1200
1204
|
|
|
1201
1205
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1202
1206
|
<ul>
|
|
1203
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1207
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L688">src/data-structures/binary-tree/binary-tree.ts:688</a></li></ul></aside></li></ul></section>
|
|
1204
1208
|
<section class="tsd-panel tsd-member"><a id="getPredecessor" class="tsd-anchor"></a>
|
|
1205
1209
|
<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>
|
|
1206
1210
|
<ul class="tsd-signatures">
|
|
1207
|
-
<li class="tsd-signature tsd-anchor-link" id="getPredecessor.getPredecessor-1"><span class="tsd-kind-call-signature">get<wbr/>Predecessor</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><
|
|
1211
|
+
<li class="tsd-signature tsd-anchor-link" id="getPredecessor.getPredecessor-1"><span class="tsd-kind-call-signature">get<wbr/>Predecessor</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><a href="#getPredecessor.getPredecessor-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1208
1212
|
<li class="tsd-description">
|
|
1209
1213
|
<div class="tsd-comment tsd-typography"><p>The function returns the predecessor of a given node in a binary tree.</p>
|
|
1210
1214
|
</div>
|
|
@@ -1212,29 +1216,29 @@ the given <code>node</code> to the root of the binary tree.</p>
|
|
|
1212
1216
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1213
1217
|
<ul class="tsd-parameter-list">
|
|
1214
1218
|
<li>
|
|
1215
|
-
<h5><span class="tsd-kind-parameter">node</span>: <
|
|
1219
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1216
1220
|
<div class="tsd-comment tsd-typography"><p>The parameter <code>node</code> is a BinaryTreeNode object, representing a node in a binary tree.</p>
|
|
1217
1221
|
</div>
|
|
1218
1222
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1219
|
-
<h4 class="tsd-returns-title">Returns <
|
|
1223
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h4><p>the predecessor of the given node in a binary tree.</p>
|
|
1220
1224
|
|
|
1221
1225
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1222
1226
|
<ul>
|
|
1223
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1227
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1218">src/data-structures/binary-tree/binary-tree.ts:1218</a></li></ul></aside></li></ul></section>
|
|
1224
1228
|
<section class="tsd-panel tsd-member"><a id="getRightMost" class="tsd-anchor"></a>
|
|
1225
1229
|
<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>
|
|
1226
1230
|
<ul class="tsd-signatures">
|
|
1227
|
-
<li class="tsd-signature tsd-anchor-link" id="getRightMost.getRightMost-1"><span class="tsd-kind-call-signature">get<wbr/>Right<wbr/>Most</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1231
|
+
<li class="tsd-signature tsd-anchor-link" id="getRightMost.getRightMost-1"><span class="tsd-kind-call-signature">get<wbr/>Right<wbr/>Most</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><a href="#getRightMost.getRightMost-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1228
1232
|
<li class="tsd-description">
|
|
1229
1233
|
<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
|
|
1230
1234
|
tail recursion optimization.</p>
|
|
1231
1235
|
</div>
|
|
1232
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1236
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h4><p>The <code>getRightMost</code> function returns the rightmost node in a binary tree.</p>
|
|
1233
1237
|
|
|
1234
1238
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1235
1239
|
<ul>
|
|
1236
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1237
|
-
<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><
|
|
1240
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L733">src/data-structures/binary-tree/binary-tree.ts:733</a></li></ul></aside></li>
|
|
1241
|
+
<li class="tsd-signature tsd-anchor-link" id="getRightMost.getRightMost-2"><span class="tsd-kind-call-signature">get<wbr/>Right<wbr/>Most</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><a href="#getRightMost.getRightMost-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1238
1242
|
<li class="tsd-description">
|
|
1239
1243
|
<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
|
|
1240
1244
|
tail recursion optimization.</p>
|
|
@@ -1243,16 +1247,16 @@ tail recursion optimization.</p>
|
|
|
1243
1247
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1244
1248
|
<ul class="tsd-parameter-list">
|
|
1245
1249
|
<li>
|
|
1246
|
-
<h5><span class="tsd-kind-parameter">node</span>: <
|
|
1247
|
-
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is an optional parameter of type <code>
|
|
1250
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1251
|
+
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is an optional parameter of type <code>N | null</code>. It represents the starting node from which to find the rightmost node in a binary tree. If no node is
|
|
1248
1252
|
provided, the function will use the root node of the binary tree.</p>
|
|
1249
1253
|
</div>
|
|
1250
1254
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1251
|
-
<h4 class="tsd-returns-title">Returns <
|
|
1255
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h4><p>The <code>getRightMost</code> function returns the rightmost node in a binary tree.</p>
|
|
1252
1256
|
|
|
1253
1257
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1254
1258
|
<ul>
|
|
1255
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1259
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L735">src/data-structures/binary-tree/binary-tree.ts:735</a></li></ul></aside></li></ul></section>
|
|
1256
1260
|
<section class="tsd-panel tsd-member"><a id="getSubTreeSizeAndCount" class="tsd-anchor"></a>
|
|
1257
1261
|
<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>
|
|
1258
1262
|
<ul class="tsd-signatures">
|
|
@@ -1265,7 +1269,7 @@ traversal.</p>
|
|
|
1265
1269
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1266
1270
|
<ul class="tsd-parameter-list">
|
|
1267
1271
|
<li>
|
|
1268
|
-
<h5><span class="tsd-kind-parameter">subTreeRoot</span>: <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1272
|
+
<h5><span class="tsd-kind-parameter">subTreeRoot</span>: <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1269
1273
|
<div class="tsd-comment tsd-typography"><p>The <code>subTreeRoot</code> parameter is the root node of a binary
|
|
1270
1274
|
tree.</p>
|
|
1271
1275
|
</div>
|
|
@@ -1275,7 +1279,7 @@ represents the size of the subtree, and the second element represents the count
|
|
|
1275
1279
|
|
|
1276
1280
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1277
1281
|
<ul>
|
|
1278
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1282
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L812">src/data-structures/binary-tree/binary-tree.ts:812</a></li></ul></aside></li></ul></section>
|
|
1279
1283
|
<section class="tsd-panel tsd-member"><a id="has" class="tsd-anchor"></a>
|
|
1280
1284
|
<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>
|
|
1281
1285
|
<ul class="tsd-signatures">
|
|
@@ -1288,9 +1292,9 @@ property.</p>
|
|
|
1288
1292
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1289
1293
|
<ul class="tsd-parameter-list">
|
|
1290
1294
|
<li>
|
|
1291
|
-
<h5><span class="tsd-kind-parameter">nodeProperty</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
1295
|
+
<h5><span class="tsd-kind-parameter">nodeProperty</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1292
1296
|
<div class="tsd-comment tsd-typography"><p>The <code>nodeProperty</code> parameter can be either a <code>BinaryTreeNodeId</code> or a
|
|
1293
|
-
generic type <code>
|
|
1297
|
+
generic type <code>N</code>. It represents the property of a binary tree node that you want to check.</p>
|
|
1294
1298
|
</div>
|
|
1295
1299
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
1296
1300
|
<li>
|
|
@@ -1303,7 +1307,7 @@ specifies the name of the property to check for in the nodes.</p>
|
|
|
1303
1307
|
|
|
1304
1308
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1305
1309
|
<ul>
|
|
1306
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1310
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L663">src/data-structures/binary-tree/binary-tree.ts:663</a></li></ul></aside></li></ul></section>
|
|
1307
1311
|
<section class="tsd-panel tsd-member"><a id="isBST" class="tsd-anchor"></a>
|
|
1308
1312
|
<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>
|
|
1309
1313
|
<ul class="tsd-signatures">
|
|
@@ -1315,8 +1319,8 @@ specifies the name of the property to check for in the nodes.</p>
|
|
|
1315
1319
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1316
1320
|
<ul class="tsd-parameter-list">
|
|
1317
1321
|
<li>
|
|
1318
|
-
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1319
|
-
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is an optional parameter of type <code>
|
|
1322
|
+
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1323
|
+
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is an optional parameter of type <code>N | null</code>. It represents the root node of the binary search tree (BST) that we want to check for validity. If no node
|
|
1320
1324
|
is provided, the function will default to using the root node of the BST instance that</p>
|
|
1321
1325
|
</div>
|
|
1322
1326
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
@@ -1325,7 +1329,7 @@ tree, and <code>false</code> otherwise.</p>
|
|
|
1325
1329
|
|
|
1326
1330
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1327
1331
|
<ul>
|
|
1328
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1332
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L775">src/data-structures/binary-tree/binary-tree.ts:775</a></li></ul></aside></li></ul></section>
|
|
1329
1333
|
<section class="tsd-panel tsd-member"><a id="isBalanced" class="tsd-anchor"></a>
|
|
1330
1334
|
<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>
|
|
1331
1335
|
<ul class="tsd-signatures">
|
|
@@ -1337,16 +1341,16 @@ tree, and <code>false</code> otherwise.</p>
|
|
|
1337
1341
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1338
1342
|
<ul class="tsd-parameter-list">
|
|
1339
1343
|
<li>
|
|
1340
|
-
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">beginRoot</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1344
|
+
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">beginRoot</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1341
1345
|
<div class="tsd-comment tsd-typography"><p>The <code>beginRoot</code> parameter is the root node of a binary tree. It is
|
|
1342
|
-
of type <code>
|
|
1346
|
+
of type <code>N | null</code>, which means it can either be a <code>BinaryTreeNode</code> object or <code>null</code>.</p>
|
|
1343
1347
|
</div>
|
|
1344
1348
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1345
1349
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>The method is returning a boolean value.</p>
|
|
1346
1350
|
|
|
1347
1351
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1348
1352
|
<ul>
|
|
1349
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1353
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L608">src/data-structures/binary-tree/binary-tree.ts:608</a></li></ul></aside></li></ul></section>
|
|
1350
1354
|
<section class="tsd-panel tsd-member"><a id="isEmpty" class="tsd-anchor"></a>
|
|
1351
1355
|
<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>
|
|
1352
1356
|
<ul class="tsd-signatures">
|
|
@@ -1358,7 +1362,7 @@ of type <code>BinaryTreeNode<T> | null</code>, which means it can either b
|
|
|
1358
1362
|
|
|
1359
1363
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1360
1364
|
<ul>
|
|
1361
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1365
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L284">src/data-structures/binary-tree/binary-tree.ts:284</a></li></ul></aside></li></ul></section>
|
|
1362
1366
|
<section class="tsd-panel tsd-member"><a id="levelIterative" class="tsd-anchor"></a>
|
|
1363
1367
|
<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>
|
|
1364
1368
|
<ul class="tsd-signatures">
|
|
@@ -1371,17 +1375,17 @@ in an array, based on a specified property name.</p>
|
|
|
1371
1375
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1372
1376
|
<ul class="tsd-parameter-list">
|
|
1373
1377
|
<li>
|
|
1374
|
-
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1378
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1375
1379
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object representing the starting
|
|
1376
1380
|
node for the level order traversal. It can be null if no specific node is provided, in which case the root node of
|
|
1377
1381
|
the tree is used as the starting node.</p>
|
|
1378
1382
|
</div>
|
|
1379
1383
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1380
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>levelIterative</code> returns an object of type <code>ResultsByProperty<
|
|
1384
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>levelIterative</code> returns an object of type <code>ResultsByProperty<N></code>.</p>
|
|
1381
1385
|
|
|
1382
1386
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1383
1387
|
<ul>
|
|
1384
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1388
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1095">src/data-structures/binary-tree/binary-tree.ts:1095</a></li></ul></aside></li>
|
|
1385
1389
|
<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>
|
|
1386
1390
|
<li class="tsd-description">
|
|
1387
1391
|
<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
|
|
@@ -1391,7 +1395,7 @@ in an array, based on a specified property name.</p>
|
|
|
1391
1395
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1392
1396
|
<ul class="tsd-parameter-list">
|
|
1393
1397
|
<li>
|
|
1394
|
-
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1398
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1395
1399
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object representing the starting
|
|
1396
1400
|
node for the level order traversal. It can be null if no specific node is provided, in which case the root node of
|
|
1397
1401
|
the tree is used as the starting node.</p>
|
|
@@ -1405,12 +1409,12 @@ will accumulate results based on that property. If no property name is provided,
|
|
|
1405
1409
|
accumulating results</p>
|
|
1406
1410
|
</div>
|
|
1407
1411
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1408
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>levelIterative</code> returns an object of type <code>ResultsByProperty<
|
|
1412
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>levelIterative</code> returns an object of type <code>ResultsByProperty<N></code>.</p>
|
|
1409
1413
|
|
|
1410
1414
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1411
1415
|
<ul>
|
|
1412
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1413
|
-
<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">
|
|
1416
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1097">src/data-structures/binary-tree/binary-tree.ts:1097</a></li></ul></aside></li>
|
|
1417
|
+
<li class="tsd-signature tsd-anchor-link" id="levelIterative.levelIterative-3"><span class="tsd-kind-call-signature">level<wbr/>Iterative</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[]</span><a href="#levelIterative.levelIterative-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1414
1418
|
<li class="tsd-description">
|
|
1415
1419
|
<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
|
|
1416
1420
|
in an array, based on a specified property name.</p>
|
|
@@ -1419,7 +1423,7 @@ in an array, based on a specified property name.</p>
|
|
|
1419
1423
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1420
1424
|
<ul class="tsd-parameter-list">
|
|
1421
1425
|
<li>
|
|
1422
|
-
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1426
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1423
1427
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object representing the starting
|
|
1424
1428
|
node for the level order traversal. It can be null if no specific node is provided, in which case the root node of
|
|
1425
1429
|
the tree is used as the starting node.</p>
|
|
@@ -1433,12 +1437,12 @@ will accumulate results based on that property. If no property name is provided,
|
|
|
1433
1437
|
accumulating results</p>
|
|
1434
1438
|
</div>
|
|
1435
1439
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1436
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">
|
|
1440
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>levelIterative</code> returns an object of type <code>ResultsByProperty<N></code>.</p>
|
|
1437
1441
|
|
|
1438
1442
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1439
1443
|
<ul>
|
|
1440
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1441
|
-
<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><
|
|
1444
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1099">src/data-structures/binary-tree/binary-tree.ts:1099</a></li></ul></aside></li>
|
|
1445
|
+
<li class="tsd-signature tsd-anchor-link" id="levelIterative.levelIterative-4"><span class="tsd-kind-call-signature">level<wbr/>Iterative</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span><a href="#levelIterative.levelIterative-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1442
1446
|
<li class="tsd-description">
|
|
1443
1447
|
<div class="tsd-comment tsd-typography"><p>The <code>levelIterative</code> function performs a level-order traversal on a binary tree and returns the values of the nodes
|
|
1444
1448
|
in an array, based on a specified property name.</p>
|
|
@@ -1447,7 +1451,7 @@ in an array, based on a specified property name.</p>
|
|
|
1447
1451
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1448
1452
|
<ul class="tsd-parameter-list">
|
|
1449
1453
|
<li>
|
|
1450
|
-
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1454
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1451
1455
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object representing the starting
|
|
1452
1456
|
node for the level order traversal. It can be null if no specific node is provided, in which case the root node of
|
|
1453
1457
|
the tree is used as the starting node.</p>
|
|
@@ -1461,11 +1465,11 @@ will accumulate results based on that property. If no property name is provided,
|
|
|
1461
1465
|
accumulating results</p>
|
|
1462
1466
|
</div>
|
|
1463
1467
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1464
|
-
<h4 class="tsd-returns-title">Returns <
|
|
1468
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>levelIterative</code> returns an object of type <code>ResultsByProperty<N></code>.</p>
|
|
1465
1469
|
|
|
1466
1470
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1467
1471
|
<ul>
|
|
1468
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1472
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1101">src/data-structures/binary-tree/binary-tree.ts:1101</a></li></ul></aside></li>
|
|
1469
1473
|
<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>
|
|
1470
1474
|
<li class="tsd-description">
|
|
1471
1475
|
<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
|
|
@@ -1475,7 +1479,7 @@ in an array, based on a specified property name.</p>
|
|
|
1475
1479
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1476
1480
|
<ul class="tsd-parameter-list">
|
|
1477
1481
|
<li>
|
|
1478
|
-
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1482
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1479
1483
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object representing the starting
|
|
1480
1484
|
node for the level order traversal. It can be null if no specific node is provided, in which case the root node of
|
|
1481
1485
|
the tree is used as the starting node.</p>
|
|
@@ -1489,11 +1493,11 @@ will accumulate results based on that property. If no property name is provided,
|
|
|
1489
1493
|
accumulating results</p>
|
|
1490
1494
|
</div>
|
|
1491
1495
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1492
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>levelIterative</code> returns an object of type <code>ResultsByProperty<
|
|
1496
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>levelIterative</code> returns an object of type <code>ResultsByProperty<N></code>.</p>
|
|
1493
1497
|
|
|
1494
1498
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1495
1499
|
<ul>
|
|
1496
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1500
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1103">src/data-structures/binary-tree/binary-tree.ts:1103</a></li></ul></aside></li></ul></section>
|
|
1497
1501
|
<section class="tsd-panel tsd-member"><a id="listLevels" class="tsd-anchor"></a>
|
|
1498
1502
|
<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>
|
|
1499
1503
|
<ul class="tsd-signatures">
|
|
@@ -1505,16 +1509,16 @@ accumulating results</p>
|
|
|
1505
1509
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1506
1510
|
<ul class="tsd-parameter-list">
|
|
1507
1511
|
<li>
|
|
1508
|
-
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1512
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1509
1513
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object or null. It represents the
|
|
1510
1514
|
root node of a binary tree. If it is null, the function will use the root node of the current binary tree instance.</p>
|
|
1511
1515
|
</div>
|
|
1512
1516
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1513
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>listLevels</code> returns a 2D array of <code>ResultByProperty<
|
|
1517
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>listLevels</code> returns a 2D array of <code>ResultByProperty<N></code> objects.</p>
|
|
1514
1518
|
|
|
1515
1519
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1516
1520
|
<ul>
|
|
1517
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1521
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1141">src/data-structures/binary-tree/binary-tree.ts:1141</a></li></ul></aside></li>
|
|
1518
1522
|
<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>
|
|
1519
1523
|
<li class="tsd-description">
|
|
1520
1524
|
<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>
|
|
@@ -1523,7 +1527,7 @@ root node of a binary tree. If it is null, the function will use the root node o
|
|
|
1523
1527
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1524
1528
|
<ul class="tsd-parameter-list">
|
|
1525
1529
|
<li>
|
|
1526
|
-
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1530
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1527
1531
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object or null. It represents the
|
|
1528
1532
|
root node of a binary tree. If it is null, the function will use the root node of the current binary tree instance.</p>
|
|
1529
1533
|
</div>
|
|
@@ -1535,12 +1539,12 @@ specifies the property of the <code>BinaryTreeNode</code> object to collect at e
|
|
|
1535
1539
|
values:</p>
|
|
1536
1540
|
</div>
|
|
1537
1541
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1538
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>listLevels</code> returns a 2D array of <code>ResultByProperty<
|
|
1542
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>listLevels</code> returns a 2D array of <code>ResultByProperty<N></code> objects.</p>
|
|
1539
1543
|
|
|
1540
1544
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1541
1545
|
<ul>
|
|
1542
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1543
|
-
<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">
|
|
1546
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1143">src/data-structures/binary-tree/binary-tree.ts:1143</a></li></ul></aside></li>
|
|
1547
|
+
<li class="tsd-signature tsd-anchor-link" id="listLevels.listLevels-3"><span class="tsd-kind-call-signature">list<wbr/>Levels</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span><a href="#listLevels.listLevels-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1544
1548
|
<li class="tsd-description">
|
|
1545
1549
|
<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>
|
|
1546
1550
|
</div>
|
|
@@ -1548,7 +1552,7 @@ values:</p>
|
|
|
1548
1552
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1549
1553
|
<ul class="tsd-parameter-list">
|
|
1550
1554
|
<li>
|
|
1551
|
-
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1555
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1552
1556
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object or null. It represents the
|
|
1553
1557
|
root node of a binary tree. If it is null, the function will use the root node of the current binary tree instance.</p>
|
|
1554
1558
|
</div>
|
|
@@ -1560,12 +1564,12 @@ specifies the property of the <code>BinaryTreeNode</code> object to collect at e
|
|
|
1560
1564
|
values:</p>
|
|
1561
1565
|
</div>
|
|
1562
1566
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1563
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">
|
|
1567
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>listLevels</code> returns a 2D array of <code>ResultByProperty<N></code> objects.</p>
|
|
1564
1568
|
|
|
1565
1569
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1566
1570
|
<ul>
|
|
1567
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1568
|
-
<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><
|
|
1571
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1145">src/data-structures/binary-tree/binary-tree.ts:1145</a></li></ul></aside></li>
|
|
1572
|
+
<li class="tsd-signature tsd-anchor-link" id="listLevels.listLevels-4"><span class="tsd-kind-call-signature">list<wbr/>Levels</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span><a href="#listLevels.listLevels-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1569
1573
|
<li class="tsd-description">
|
|
1570
1574
|
<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>
|
|
1571
1575
|
</div>
|
|
@@ -1573,7 +1577,7 @@ values:</p>
|
|
|
1573
1577
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1574
1578
|
<ul class="tsd-parameter-list">
|
|
1575
1579
|
<li>
|
|
1576
|
-
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1580
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1577
1581
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object or null. It represents the
|
|
1578
1582
|
root node of a binary tree. If it is null, the function will use the root node of the current binary tree instance.</p>
|
|
1579
1583
|
</div>
|
|
@@ -1585,11 +1589,11 @@ specifies the property of the <code>BinaryTreeNode</code> object to collect at e
|
|
|
1585
1589
|
values:</p>
|
|
1586
1590
|
</div>
|
|
1587
1591
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1588
|
-
<h4 class="tsd-returns-title">Returns <
|
|
1592
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>listLevels</code> returns a 2D array of <code>ResultByProperty<N></code> objects.</p>
|
|
1589
1593
|
|
|
1590
1594
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1591
1595
|
<ul>
|
|
1592
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1596
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1147">src/data-structures/binary-tree/binary-tree.ts:1147</a></li></ul></aside></li>
|
|
1593
1597
|
<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>
|
|
1594
1598
|
<li class="tsd-description">
|
|
1595
1599
|
<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>
|
|
@@ -1598,7 +1602,7 @@ values:</p>
|
|
|
1598
1602
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1599
1603
|
<ul class="tsd-parameter-list">
|
|
1600
1604
|
<li>
|
|
1601
|
-
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1605
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1602
1606
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object or null. It represents the
|
|
1603
1607
|
root node of a binary tree. If it is null, the function will use the root node of the current binary tree instance.</p>
|
|
1604
1608
|
</div>
|
|
@@ -1610,11 +1614,11 @@ specifies the property of the <code>BinaryTreeNode</code> object to collect at e
|
|
|
1610
1614
|
values:</p>
|
|
1611
1615
|
</div>
|
|
1612
1616
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1613
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>listLevels</code> returns a 2D array of <code>ResultByProperty<
|
|
1617
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>listLevels</code> returns a 2D array of <code>ResultByProperty<N></code> objects.</p>
|
|
1614
1618
|
|
|
1615
1619
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1616
1620
|
<ul>
|
|
1617
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1621
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1149">src/data-structures/binary-tree/binary-tree.ts:1149</a></li></ul></aside></li></ul></section>
|
|
1618
1622
|
<section class="tsd-panel tsd-member"><a id="morris" class="tsd-anchor"></a>
|
|
1619
1623
|
<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>
|
|
1620
1624
|
<ul class="tsd-signatures">
|
|
@@ -1625,11 +1629,11 @@ traversal algorithm and returns the results based on the specified property name
|
|
|
1625
1629
|
The time complexity of Morris traversal is O(n), it's may slower than others
|
|
1626
1630
|
The space complexity Morris traversal is O(1) because no using stack</p>
|
|
1627
1631
|
</div>
|
|
1628
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>morris</code> returns an object of type <code>ResultsByProperty<
|
|
1632
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>morris</code> returns an object of type <code>ResultsByProperty<N></code>.</p>
|
|
1629
1633
|
|
|
1630
1634
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1631
1635
|
<ul>
|
|
1632
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1636
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1232">src/data-structures/binary-tree/binary-tree.ts:1232</a></li></ul></aside></li>
|
|
1633
1637
|
<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>
|
|
1634
1638
|
<li class="tsd-description">
|
|
1635
1639
|
<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
|
|
@@ -1653,12 +1657,12 @@ property of the nodes that you want to retrieve in the results. It can be either
|
|
|
1653
1657
|
property. If not provided, it defaults to <code>'id'</code>.</p>
|
|
1654
1658
|
</div>
|
|
1655
1659
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1656
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>morris</code> returns an object of type <code>ResultsByProperty<
|
|
1660
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>morris</code> returns an object of type <code>ResultsByProperty<N></code>.</p>
|
|
1657
1661
|
|
|
1658
1662
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1659
1663
|
<ul>
|
|
1660
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1661
|
-
<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">
|
|
1664
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1234">src/data-structures/binary-tree/binary-tree.ts:1234</a></li></ul></aside></li>
|
|
1665
|
+
<li class="tsd-signature tsd-anchor-link" id="morris.morris-3"><span class="tsd-kind-call-signature">morris</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span><a href="#morris.morris-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1662
1666
|
<li class="tsd-description">
|
|
1663
1667
|
<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
|
|
1664
1668
|
traversal algorithm and returns the results based on the specified property name.
|
|
@@ -1681,12 +1685,12 @@ property of the nodes that you want to retrieve in the results. It can be either
|
|
|
1681
1685
|
property. If not provided, it defaults to <code>'id'</code>.</p>
|
|
1682
1686
|
</div>
|
|
1683
1687
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1684
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">
|
|
1688
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>morris</code> returns an object of type <code>ResultsByProperty<N></code>.</p>
|
|
1685
1689
|
|
|
1686
1690
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1687
1691
|
<ul>
|
|
1688
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1689
|
-
<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><
|
|
1692
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1236">src/data-structures/binary-tree/binary-tree.ts:1236</a></li></ul></aside></li>
|
|
1693
|
+
<li class="tsd-signature tsd-anchor-link" id="morris.morris-4"><span class="tsd-kind-call-signature">morris</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span><a href="#morris.morris-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1690
1694
|
<li class="tsd-description">
|
|
1691
1695
|
<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
|
|
1692
1696
|
traversal algorithm and returns the results based on the specified property name.
|
|
@@ -1709,11 +1713,11 @@ property of the nodes that you want to retrieve in the results. It can be either
|
|
|
1709
1713
|
property. If not provided, it defaults to <code>'id'</code>.</p>
|
|
1710
1714
|
</div>
|
|
1711
1715
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1712
|
-
<h4 class="tsd-returns-title">Returns <
|
|
1716
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>morris</code> returns an object of type <code>ResultsByProperty<N></code>.</p>
|
|
1713
1717
|
|
|
1714
1718
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1715
1719
|
<ul>
|
|
1716
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1720
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1238">src/data-structures/binary-tree/binary-tree.ts:1238</a></li></ul></aside></li>
|
|
1717
1721
|
<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>
|
|
1718
1722
|
<li class="tsd-description">
|
|
1719
1723
|
<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
|
|
@@ -1737,15 +1741,15 @@ property of the nodes that you want to retrieve in the results. It can be either
|
|
|
1737
1741
|
property. If not provided, it defaults to <code>'id'</code>.</p>
|
|
1738
1742
|
</div>
|
|
1739
1743
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1740
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>morris</code> returns an object of type <code>ResultsByProperty<
|
|
1744
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>morris</code> returns an object of type <code>ResultsByProperty<N></code>.</p>
|
|
1741
1745
|
|
|
1742
1746
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1743
1747
|
<ul>
|
|
1744
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1748
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1240">src/data-structures/binary-tree/binary-tree.ts:1240</a></li></ul></aside></li></ul></section>
|
|
1745
1749
|
<section class="tsd-panel tsd-member"><a id="remove" class="tsd-anchor"></a>
|
|
1746
1750
|
<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>
|
|
1747
1751
|
<ul class="tsd-signatures">
|
|
1748
|
-
<li class="tsd-signature tsd-anchor-link" id="remove.remove-1"><span class="tsd-kind-call-signature">remove</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">id</span>, <span class="tsd-kind-parameter">ignoreCount</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../types/BinaryTreeDeleted.html" class="tsd-signature-type tsd-kind-type-alias">BinaryTreeDeleted</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
1752
|
+
<li class="tsd-signature tsd-anchor-link" id="remove.remove-1"><span class="tsd-kind-call-signature">remove</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">id</span>, <span class="tsd-kind-parameter">ignoreCount</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../types/BinaryTreeDeleted.html" class="tsd-signature-type tsd-kind-type-alias">BinaryTreeDeleted</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">[]</span><a href="#remove.remove-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1749
1753
|
<li class="tsd-description">
|
|
1750
1754
|
<div class="tsd-comment tsd-typography"><p>The function removes a node from a binary tree and returns information about the deleted node.</p>
|
|
1751
1755
|
</div>
|
|
@@ -1765,13 +1769,13 @@ whether to ignore the count of the node being removed. If <code>ignoreCount</cod
|
|
|
1765
1769
|
not be decremented and the overall count of the binary tree will not be updated. If `</p>
|
|
1766
1770
|
</div>
|
|
1767
1771
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1768
|
-
<h4 class="tsd-returns-title">Returns <a href="../types/BinaryTreeDeleted.html" class="tsd-signature-type tsd-kind-type-alias">BinaryTreeDeleted</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
1772
|
+
<h4 class="tsd-returns-title">Returns <a href="../types/BinaryTreeDeleted.html" class="tsd-signature-type tsd-kind-type-alias">BinaryTreeDeleted</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">[]</span></h4><p>An array of objects is being returned. Each object in the array has two properties: "deleted" and
|
|
1769
1773
|
"needBalanced". The "deleted" property contains the deleted node or undefined if no node was deleted. The
|
|
1770
1774
|
"needBalanced" property is always null.</p>
|
|
1771
1775
|
|
|
1772
1776
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1773
1777
|
<ul>
|
|
1774
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1778
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L452">src/data-structures/binary-tree/binary-tree.ts:452</a></li></ul></aside></li></ul></section>
|
|
1775
1779
|
<section class="tsd-panel tsd-member tsd-is-protected"><a id="setVisitedCount" class="tsd-anchor"></a>
|
|
1776
1780
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>set<wbr/>Visited<wbr/>Count</span><a href="#setVisitedCount" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1777
1781
|
<ul class="tsd-signatures tsd-is-protected">
|
|
@@ -1784,7 +1788,7 @@ not be decremented and the overall count of the binary tree will not be updated.
|
|
|
1784
1788
|
<h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h5></li></ul></div>
|
|
1785
1789
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
1786
1790
|
<ul>
|
|
1787
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1791
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1356">src/data-structures/binary-tree/binary-tree.ts:1356</a></li></ul></aside></li></ul></section>
|
|
1788
1792
|
<section class="tsd-panel tsd-member"><a id="subTreeAdd" class="tsd-anchor"></a>
|
|
1789
1793
|
<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>
|
|
1790
1794
|
<ul class="tsd-signatures">
|
|
@@ -1796,7 +1800,7 @@ not be decremented and the overall count of the binary tree will not be updated.
|
|
|
1796
1800
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1797
1801
|
<ul class="tsd-parameter-list">
|
|
1798
1802
|
<li>
|
|
1799
|
-
<h5><span class="tsd-kind-parameter">subTreeRoot</span>: <
|
|
1803
|
+
<h5><span class="tsd-kind-parameter">subTreeRoot</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1800
1804
|
<div class="tsd-comment tsd-typography"><p>The <code>subTreeRoot</code> parameter is the root node of the subtree where the values will be modified.</p>
|
|
1801
1805
|
</div>
|
|
1802
1806
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
@@ -1816,7 +1820,7 @@ specifies the property of the <code>BinaryTreeNode</code> that should be modifie
|
|
|
1816
1820
|
|
|
1817
1821
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1818
1822
|
<ul>
|
|
1819
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1823
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L909">src/data-structures/binary-tree/binary-tree.ts:909</a></li></ul></aside></li></ul></section>
|
|
1820
1824
|
<section class="tsd-panel tsd-member"><a id="subTreeSum" class="tsd-anchor"></a>
|
|
1821
1825
|
<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>
|
|
1822
1826
|
<ul class="tsd-signatures">
|
|
@@ -1829,7 +1833,7 @@ iteratively.</p>
|
|
|
1829
1833
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1830
1834
|
<ul class="tsd-parameter-list">
|
|
1831
1835
|
<li>
|
|
1832
|
-
<h5><span class="tsd-kind-parameter">subTreeRoot</span>: <
|
|
1836
|
+
<h5><span class="tsd-kind-parameter">subTreeRoot</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1833
1837
|
<div class="tsd-comment tsd-typography"><p>The subTreeRoot parameter is the root node of the subtree for which you want to calculate the
|
|
1834
1838
|
sum.</p>
|
|
1835
1839
|
</div>
|
|
@@ -1845,7 +1849,7 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
1845
1849
|
|
|
1846
1850
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1847
1851
|
<ul>
|
|
1848
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1852
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L853">src/data-structures/binary-tree/binary-tree.ts:853</a></li></ul></aside></li></ul></section></section></div>
|
|
1849
1853
|
<div class="col-sidebar">
|
|
1850
1854
|
<div class="page-menu">
|
|
1851
1855
|
<div class="tsd-navigation settings">
|
|
@@ -1894,6 +1898,7 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
1894
1898
|
<li><a href="#DFS" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>DFS</span></a></li>
|
|
1895
1899
|
<li><a href="#DFSIterative" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>DFSIterative</span></a></li>
|
|
1896
1900
|
<li><a href="#_accumulatedByPropertyName" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_accumulated<wbr/>By<wbr/>Property<wbr/>Name</span></a></li>
|
|
1901
|
+
<li><a href="#_createNode" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_create<wbr/>Node</span></a></li>
|
|
1897
1902
|
<li><a href="#_getResultByPropertyName" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_get<wbr/>Result<wbr/>By<wbr/>Property<wbr/>Name</span></a></li>
|
|
1898
1903
|
<li><a href="#_pushByPropertyNameStopOrNot" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_push<wbr/>By<wbr/>Property<wbr/>Name<wbr/>Stop<wbr/>Or<wbr/>Not</span></a></li>
|
|
1899
1904
|
<li><a href="#_resetResults" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_reset<wbr/>Results</span></a></li>
|
|
@@ -1912,7 +1917,6 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
1912
1917
|
<li><a href="#addMany" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>add<wbr/>Many</span></a></li>
|
|
1913
1918
|
<li><a href="#addTo" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>add<wbr/>To</span></a></li>
|
|
1914
1919
|
<li><a href="#clear" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>clear</span></a></li>
|
|
1915
|
-
<li><a href="#createNode" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>create<wbr/>Node</span></a></li>
|
|
1916
1920
|
<li><a href="#fill" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>fill</span></a></li>
|
|
1917
1921
|
<li><a href="#get" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get</span></a></li>
|
|
1918
1922
|
<li><a href="#getDepth" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Depth</span></a></li>
|
|
@@ -1941,6 +1945,7 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
1941
1945
|
<li><a href="../enums/CP.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-8"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-enum)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.45 16V7.24H14.49V8.224H10.518V10.936H14.07V11.908H10.518V15.016H14.49V16H9.45Z" fill="var(--color-text)"></path></g></svg><span>CP</span></a></li>
|
|
1942
1946
|
<li><a href="../enums/FamilyPosition.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-8"></use></svg><span>Family<wbr/>Position</span></a></li>
|
|
1943
1947
|
<li><a href="../enums/LoopType.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-8"></use></svg><span>Loop<wbr/>Type</span></a></li>
|
|
1948
|
+
<li><a href="../enums/TopologicalProperty.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-8"></use></svg><span>Topological<wbr/>Property</span></a></li>
|
|
1944
1949
|
<li><a href="AVLTree.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-128"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)"></path></g></svg><span>AVLTree</span></a></li>
|
|
1945
1950
|
<li><a href="AVLTreeNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>AVLTree<wbr/>Node</span></a></li>
|
|
1946
1951
|
<li><a href="AaTree.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Aa<wbr/>Tree</span></a></li>
|
|
@@ -1977,7 +1982,6 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
1977
1982
|
<li><a href="Pair.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Pair</span></a></li>
|
|
1978
1983
|
<li><a href="PriorityQueue.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Priority<wbr/>Queue</span></a></li>
|
|
1979
1984
|
<li><a href="Queue.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Queue</span></a></li>
|
|
1980
|
-
<li><a href="RBTree.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>RBTree</span></a></li>
|
|
1981
1985
|
<li><a href="SegmentTree.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Segment<wbr/>Tree</span></a></li>
|
|
1982
1986
|
<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>
|
|
1983
1987
|
<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>
|
|
@@ -1996,13 +2000,13 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
1996
2000
|
<li><a href="UndirectedGraph.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Undirected<wbr/>Graph</span></a></li>
|
|
1997
2001
|
<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>
|
|
1998
2002
|
<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>
|
|
1999
|
-
<li><a href="../interfaces/
|
|
2000
|
-
<li><a href="../interfaces/
|
|
2003
|
+
<li><a href="../interfaces/IBinaryTree.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-256"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.51 16V15.016H11.298V8.224H9.51V7.24H14.19V8.224H12.402V15.016H14.19V16H9.51Z" fill="var(--color-text)"></path></g></svg><span>IBinary<wbr/>Tree</span></a></li>
|
|
2004
|
+
<li><a href="../interfaces/IBinaryTreeNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>IBinary<wbr/>Tree<wbr/>Node</span></a></li>
|
|
2001
2005
|
<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>
|
|
2002
2006
|
<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>
|
|
2003
|
-
<li><a href="../interfaces/
|
|
2004
|
-
<li><a href="../
|
|
2005
|
-
<li><a href="../types/BSTComparator.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><
|
|
2007
|
+
<li><a href="../interfaces/IUNDirectedGraph.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>IUNDirected<wbr/>Graph</span></a></li>
|
|
2008
|
+
<li><a href="../types/AVLTreeDeleted.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-4194304"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)"></path></g></svg><span>AVLTree<wbr/>Deleted</span></a></li>
|
|
2009
|
+
<li><a href="../types/BSTComparator.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>BSTComparator</span></a></li>
|
|
2006
2010
|
<li><a href="../types/BSTDeletedResult.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>BSTDeleted<wbr/>Result</span></a></li>
|
|
2007
2011
|
<li><a href="../types/BinaryTreeDeleted.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Binary<wbr/>Tree<wbr/>Deleted</span></a></li>
|
|
2008
2012
|
<li><a href="../types/BinaryTreeNodeId.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Binary<wbr/>Tree<wbr/>Node<wbr/>Id</span></a></li>
|
|
@@ -2010,19 +2014,21 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
2010
2014
|
<li><a href="../types/DFSOrderPattern.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>DFSOrder<wbr/>Pattern</span></a></li>
|
|
2011
2015
|
<li><a href="../types/DijkstraResult.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Dijkstra<wbr/>Result</span></a></li>
|
|
2012
2016
|
<li><a href="../types/Direction.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Direction</span></a></li>
|
|
2017
|
+
<li><a href="../types/EdgeId.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Edge<wbr/>Id</span></a></li>
|
|
2018
|
+
<li><a href="../types/HeapOptions.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Heap<wbr/>Options</span></a></li>
|
|
2019
|
+
<li><a href="../types/NavigatorParams.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Navigator<wbr/>Params</span></a></li>
|
|
2013
2020
|
<li><a href="../types/NodeOrPropertyName.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Node<wbr/>Or<wbr/>Property<wbr/>Name</span></a></li>
|
|
2014
2021
|
<li><a href="../types/PriorityQueueComparator.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Priority<wbr/>Queue<wbr/>Comparator</span></a></li>
|
|
2015
2022
|
<li><a href="../types/PriorityQueueDFSOrderPattern.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Priority<wbr/>QueueDFSOrder<wbr/>Pattern</span></a></li>
|
|
2023
|
+
<li><a href="../types/PriorityQueueOptions.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Priority<wbr/>Queue<wbr/>Options</span></a></li>
|
|
2024
|
+
<li><a href="../types/RecursiveAVLTreeNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>RecursiveAVLTree<wbr/>Node</span></a></li>
|
|
2025
|
+
<li><a href="../types/RecursiveBSTNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>RecursiveBSTNode</span></a></li>
|
|
2026
|
+
<li><a href="../types/RecursiveBinaryTreeNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Recursive<wbr/>Binary<wbr/>Tree<wbr/>Node</span></a></li>
|
|
2016
2027
|
<li><a href="../types/ResultByProperty.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Result<wbr/>By<wbr/>Property</span></a></li>
|
|
2017
2028
|
<li><a href="../types/ResultsByProperty.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Results<wbr/>By<wbr/>Property</span></a></li>
|
|
2018
2029
|
<li><a href="../types/SegmentTreeNodeVal.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Segment<wbr/>Tree<wbr/>Node<wbr/>Val</span></a></li>
|
|
2019
|
-
<li><a href="../types/SpecifyOptional.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Specify<wbr/>Optional</span></a></li>
|
|
2020
|
-
<li><a href="../types/Thunk.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Thunk</span></a></li>
|
|
2021
|
-
<li><a href="../types/ToThunkFn.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>To<wbr/>Thunk<wbr/>Fn</span></a></li>
|
|
2022
2030
|
<li><a href="../types/TopologicalStatus.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Topological<wbr/>Status</span></a></li>
|
|
2023
2031
|
<li><a href="../types/TreeMultiSetDeletedResult.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Tree<wbr/>Multi<wbr/>Set<wbr/>Deleted<wbr/>Result</span></a></li>
|
|
2024
|
-
<li><a href="../types/TrlAsyncFn.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Trl<wbr/>Async<wbr/>Fn</span></a></li>
|
|
2025
|
-
<li><a href="../types/TrlFn.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Trl<wbr/>Fn</span></a></li>
|
|
2026
2032
|
<li><a href="../types/Turning.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Turning</span></a></li>
|
|
2027
2033
|
<li><a href="../types/VertexId.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Vertex<wbr/>Id</span></a></li></ul></nav></div></div></div>
|
|
2028
2034
|
<div class="tsd-generator">
|