data-structure-typed 1.17.4 → 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 +12 -20
- package/dist/data-structures/binary-tree/binary-indexed-tree.d.ts +3 -1
- package/dist/data-structures/binary-tree/binary-indexed-tree.js +10 -0
- package/dist/data-structures/binary-tree/binary-tree.d.ts +135 -161
- package/dist/data-structures/binary-tree/binary-tree.js +192 -164
- package/dist/data-structures/binary-tree/bst.d.ts +21 -21
- package/dist/data-structures/binary-tree/bst.js +33 -36
- 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/segment-tree.d.ts +17 -39
- package/dist/data-structures/binary-tree/segment-tree.js +34 -47
- 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 -71
- package/dist/data-structures/graph/abstract-graph.js +87 -92
- package/dist/data-structures/graph/directed-graph.d.ts +128 -105
- package/dist/data-structures/graph/directed-graph.js +161 -121
- package/dist/data-structures/graph/undirected-graph.d.ts +81 -62
- package/dist/data-structures/graph/undirected-graph.js +99 -78
- package/dist/data-structures/hash/coordinate-map.d.ts +1 -5
- package/dist/data-structures/hash/coordinate-map.js +3 -9
- package/dist/data-structures/hash/coordinate-set.d.ts +2 -6
- package/dist/data-structures/hash/coordinate-set.js +3 -9
- package/dist/data-structures/hash/hash-table.d.ts +2 -1
- package/dist/data-structures/hash/hash-table.js +7 -0
- package/dist/data-structures/hash/pair.d.ts +2 -1
- package/dist/data-structures/hash/pair.js +7 -0
- package/dist/data-structures/hash/tree-map.d.ts +2 -1
- package/dist/data-structures/hash/tree-map.js +7 -0
- package/dist/data-structures/hash/tree-set.d.ts +2 -1
- package/dist/data-structures/hash/tree-set.js +7 -0
- package/dist/data-structures/heap/heap.d.ts +0 -14
- package/dist/data-structures/heap/heap.js +3 -27
- 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 -3
- package/dist/data-structures/linked-list/doubly-linked-list.js +12 -18
- package/dist/data-structures/linked-list/singly-linked-list.d.ts +1 -2
- package/dist/data-structures/linked-list/singly-linked-list.js +12 -15
- 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/tree/tree.d.ts +12 -4
- package/dist/data-structures/tree/tree.js +44 -12
- package/dist/data-structures/trie/trie.d.ts +3 -3
- package/dist/data-structures/trie/trie.js +10 -10
- 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/doubly-linked-list.d.ts +1 -1
- 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 +552 -405
- package/docs/classes/AVLTreeNode.html +107 -242
- package/docs/classes/AaTree.html +18 -13
- package/docs/classes/AbstractEdge.html +77 -68
- package/docs/classes/AbstractGraph.html +223 -115
- package/docs/classes/AbstractVertex.html +71 -45
- package/docs/classes/ArrayDeque.html +31 -26
- package/docs/classes/BST.html +543 -391
- package/docs/classes/BSTNode.html +107 -236
- package/docs/classes/BTree.html +18 -13
- package/docs/classes/BinaryIndexedTree.html +56 -21
- package/docs/classes/BinaryTree.html +564 -355
- package/docs/classes/BinaryTreeNode.html +146 -199
- package/docs/classes/Character.html +21 -16
- package/docs/classes/CoordinateMap.html +49 -52
- package/docs/classes/CoordinateSet.html +50 -53
- package/docs/classes/Deque.html +51 -68
- package/docs/classes/DirectedEdge.html +98 -103
- package/docs/classes/DirectedGraph.html +449 -210
- package/docs/classes/DirectedVertex.html +63 -52
- package/docs/classes/DoublyLinkedList.html +56 -71
- package/docs/classes/DoublyLinkedListNode.html +28 -23
- package/docs/classes/HashTable.html +155 -0
- package/docs/classes/Heap.html +33 -109
- package/docs/classes/HeapItem.html +25 -20
- package/docs/classes/Matrix2D.html +33 -28
- package/docs/classes/MatrixNTI2D.html +21 -16
- package/docs/classes/MaxHeap.html +33 -114
- package/docs/classes/MaxPriorityQueue.html +71 -61
- package/docs/classes/MinHeap.html +33 -114
- package/docs/classes/MinPriorityQueue.html +71 -61
- package/docs/classes/Navigator.html +28 -23
- package/docs/classes/ObjectDeque.html +66 -51
- package/docs/classes/{RBTree.html → Pair.html} +25 -20
- package/docs/classes/PriorityQueue.html +66 -56
- package/docs/classes/Queue.html +33 -28
- package/docs/classes/SegmentTree.html +129 -57
- package/docs/classes/SegmentTreeNode.html +62 -140
- package/docs/classes/SinglyLinkedList.html +53 -58
- package/docs/classes/SinglyLinkedListNode.html +25 -20
- package/docs/classes/SkipLinkedList.html +18 -13
- package/docs/classes/SplayTree.html +18 -13
- package/docs/classes/Stack.html +31 -26
- package/docs/classes/TreeMap.html +155 -0
- package/docs/classes/TreeMultiSet.html +541 -388
- package/docs/classes/TreeNode.html +125 -35
- package/docs/classes/TreeSet.html +155 -0
- package/docs/classes/Trie.html +30 -25
- package/docs/classes/TrieNode.html +33 -28
- package/docs/classes/TwoThreeTree.html +18 -13
- package/docs/classes/UndirectedEdge.html +87 -80
- package/docs/classes/UndirectedGraph.html +356 -178
- package/docs/classes/UndirectedVertex.html +63 -52
- package/docs/classes/Vector2D.html +45 -40
- package/docs/enums/CP.html +21 -16
- package/docs/enums/FamilyPosition.html +21 -16
- package/docs/enums/LoopType.html +20 -15
- package/docs/{interfaces/AVLTreeDeleted.html → enums/TopologicalProperty.html} +47 -44
- package/docs/index.html +203 -69
- package/docs/interfaces/{PriorityQueueOptions.html → IBinaryTree.html} +49 -40
- package/docs/interfaces/IBinaryTreeNode.html +383 -0
- package/docs/interfaces/IDirectedGraph.html +24 -19
- package/docs/interfaces/IGraph.html +122 -89
- package/docs/interfaces/{HeapOptions.html → IUNDirectedGraph.html} +26 -53
- package/docs/modules.html +33 -23
- package/docs/types/{ToThunkFn.html → AVLTreeDeleted.html} +31 -22
- package/docs/types/BSTComparator.html +18 -13
- package/docs/types/BSTDeletedResult.html +23 -18
- package/docs/types/BinaryTreeDeleted.html +23 -18
- package/docs/types/BinaryTreeNodeId.html +18 -13
- package/docs/types/BinaryTreeNodePropertyName.html +18 -13
- package/docs/types/DFSOrderPattern.html +18 -13
- package/docs/types/DijkstraResult.html +18 -13
- package/docs/types/Direction.html +18 -13
- package/docs/types/{DoublyLinkedListGetBy.html → EdgeId.html} +22 -17
- package/docs/types/{TrlFn.html → HeapOptions.html} +33 -20
- package/docs/types/{TrlAsyncFn.html → NavigatorParams.html} +46 -20
- package/docs/types/NodeOrPropertyName.html +18 -13
- package/docs/types/PriorityQueueComparator.html +18 -13
- package/docs/types/PriorityQueueDFSOrderPattern.html +18 -13
- package/docs/types/{SpecifyOptional.html → PriorityQueueOptions.html} +32 -20
- package/docs/types/RecursiveAVLTreeNode.html +135 -0
- package/docs/types/RecursiveBSTNode.html +135 -0
- package/docs/types/RecursiveBinaryTreeNode.html +135 -0
- package/docs/types/ResultByProperty.html +21 -16
- package/docs/types/ResultsByProperty.html +21 -16
- package/docs/types/SegmentTreeNodeVal.html +18 -13
- package/docs/types/TopologicalStatus.html +18 -13
- package/docs/types/TreeMultiSetDeletedResult.html +23 -18
- package/docs/types/Turning.html +18 -13
- package/docs/types/VertexId.html +18 -13
- package/notes/note.md +12 -1
- package/package.json +11 -3
- package/tsconfig.json +2 -2
- package/docs/interfaces/NavigatorParams.html +0 -197
- package/docs/types/Thunk.html +0 -133
|
@@ -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">
|
|
@@ -40,23 +44,32 @@
|
|
|
40
44
|
<section class="tsd-index-section">
|
|
41
45
|
<h3 class="tsd-index-heading">Properties</h3>
|
|
42
46
|
<div class="tsd-index-list"><a href="BinaryTree.html#_autoIncrementId" class="tsd-index-link tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-1024"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)"></path></g></svg><span>_auto<wbr/>Increment<wbr/>Id</span></a>
|
|
43
|
-
<a href="BinaryTree.html#_count" class="tsd-index-link tsd-is-
|
|
47
|
+
<a href="BinaryTree.html#_count" class="tsd-index-link tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_count</span></a>
|
|
44
48
|
<a href="BinaryTree.html#_isDuplicatedVal" class="tsd-index-link tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_is<wbr/>Duplicated<wbr/>Val</span></a>
|
|
45
|
-
<a href="BinaryTree.html#_loopType" class="tsd-index-link tsd-is-
|
|
49
|
+
<a href="BinaryTree.html#_loopType" class="tsd-index-link tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_loop<wbr/>Type</span></a>
|
|
46
50
|
<a href="BinaryTree.html#_maxId" class="tsd-index-link tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_max<wbr/>Id</span></a>
|
|
47
|
-
<a href="BinaryTree.html#_root" class="tsd-index-link tsd-is-
|
|
48
|
-
<a href="BinaryTree.html#_size" class="tsd-index-link tsd-is-
|
|
49
|
-
<a href="BinaryTree.html#_visitedCount" class="tsd-index-link tsd-is-
|
|
50
|
-
<a href="BinaryTree.html#_visitedId" class="tsd-index-link tsd-is-
|
|
51
|
-
<a href="BinaryTree.html#_visitedLeftSum" class="tsd-index-link tsd-is-
|
|
52
|
-
<a href="BinaryTree.html#_visitedNode" class="tsd-index-link tsd-is-
|
|
53
|
-
<a href="BinaryTree.html#_visitedVal" class="tsd-index-link tsd-is-
|
|
51
|
+
<a href="BinaryTree.html#_root" class="tsd-index-link tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_root</span></a>
|
|
52
|
+
<a href="BinaryTree.html#_size" class="tsd-index-link tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_size</span></a>
|
|
53
|
+
<a href="BinaryTree.html#_visitedCount" class="tsd-index-link tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_visited<wbr/>Count</span></a>
|
|
54
|
+
<a href="BinaryTree.html#_visitedId" class="tsd-index-link tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_visited<wbr/>Id</span></a>
|
|
55
|
+
<a href="BinaryTree.html#_visitedLeftSum" class="tsd-index-link tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_visited<wbr/>Left<wbr/>Sum</span></a>
|
|
56
|
+
<a href="BinaryTree.html#_visitedNode" class="tsd-index-link tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_visited<wbr/>Node</span></a>
|
|
57
|
+
<a href="BinaryTree.html#_visitedVal" class="tsd-index-link tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_visited<wbr/>Val</span></a>
|
|
54
58
|
</div></section>
|
|
55
59
|
<section class="tsd-index-section">
|
|
56
60
|
<h3 class="tsd-index-heading">Accessors</h3>
|
|
57
|
-
<div class="tsd-index-list"><a href="BinaryTree.html#
|
|
61
|
+
<div class="tsd-index-list"><a href="BinaryTree.html#autoIncrementId" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-262144"><rect fill="var(--color-icon-background)" stroke="#FF4D4D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M8.85 16L11.13 7.24H12.582L14.85 16H13.758L13.182 13.672H10.53L9.954 16H8.85ZM10.746 12.76H12.954L12.282 10.06C12.154 9.548 12.054 9.12 11.982 8.776C11.91 8.432 11.866 8.208 11.85 8.104C11.834 8.208 11.79 8.432 11.718 8.776C11.646 9.12 11.546 9.544 11.418 10.048L10.746 12.76Z" fill="var(--color-text)"></path></g></svg><span>auto<wbr/>Increment<wbr/>Id</span></a>
|
|
62
|
+
<a href="BinaryTree.html#count" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>count</span></a>
|
|
63
|
+
<a href="BinaryTree.html#isDuplicatedVal" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>is<wbr/>Duplicated<wbr/>Val</span></a>
|
|
64
|
+
<a href="BinaryTree.html#loopType" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>loop<wbr/>Type</span></a>
|
|
65
|
+
<a href="BinaryTree.html#maxId" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>max<wbr/>Id</span></a>
|
|
58
66
|
<a href="BinaryTree.html#root" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>root</span></a>
|
|
59
67
|
<a href="BinaryTree.html#size" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>size</span></a>
|
|
68
|
+
<a href="BinaryTree.html#visitedCount" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>visited<wbr/>Count</span></a>
|
|
69
|
+
<a href="BinaryTree.html#visitedId" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>visited<wbr/>Id</span></a>
|
|
70
|
+
<a href="BinaryTree.html#visitedLeftSum" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>visited<wbr/>Left<wbr/>Sum</span></a>
|
|
71
|
+
<a href="BinaryTree.html#visitedNode" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>visited<wbr/>Node</span></a>
|
|
72
|
+
<a href="BinaryTree.html#visitedVal" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>visited<wbr/>Val</span></a>
|
|
60
73
|
</div></section>
|
|
61
74
|
<section class="tsd-index-section">
|
|
62
75
|
<h3 class="tsd-index-heading">Methods</h3>
|
|
@@ -64,17 +77,27 @@
|
|
|
64
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>
|
|
65
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>
|
|
66
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>
|
|
67
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>
|
|
68
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>
|
|
69
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>
|
|
84
|
+
<a href="BinaryTree.html#_setAutoIncrementId" class="tsd-index-link tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_set<wbr/>Auto<wbr/>Increment<wbr/>Id</span></a>
|
|
85
|
+
<a href="BinaryTree.html#_setCount" class="tsd-index-link tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_set<wbr/>Count</span></a>
|
|
86
|
+
<a href="BinaryTree.html#_setIsDuplicatedVal" class="tsd-index-link tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_set<wbr/>Is<wbr/>Duplicated<wbr/>Val</span></a>
|
|
87
|
+
<a href="BinaryTree.html#_setLoopType" class="tsd-index-link tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_set<wbr/>Loop<wbr/>Type</span></a>
|
|
88
|
+
<a href="BinaryTree.html#_setMaxId" class="tsd-index-link tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_set<wbr/>Max<wbr/>Id</span></a>
|
|
89
|
+
<a href="BinaryTree.html#_setRoot" class="tsd-index-link tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_set<wbr/>Root</span></a>
|
|
90
|
+
<a href="BinaryTree.html#_setSize" class="tsd-index-link tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_set<wbr/>Size</span></a>
|
|
91
|
+
<a href="BinaryTree.html#_setVisitedId" class="tsd-index-link tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_set<wbr/>Visited<wbr/>Id</span></a>
|
|
92
|
+
<a href="BinaryTree.html#_setVisitedLeftSum" class="tsd-index-link tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_set<wbr/>Visited<wbr/>Left<wbr/>Sum</span></a>
|
|
93
|
+
<a href="BinaryTree.html#_setVisitedNode" class="tsd-index-link tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_set<wbr/>Visited<wbr/>Node</span></a>
|
|
94
|
+
<a href="BinaryTree.html#_setVisitedVal" class="tsd-index-link tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_set<wbr/>Visited<wbr/>Val</span></a>
|
|
70
95
|
<a href="BinaryTree.html#add" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>add</span></a>
|
|
71
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>
|
|
72
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>
|
|
73
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>
|
|
74
|
-
<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>
|
|
75
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>
|
|
76
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>
|
|
77
|
-
<a href="BinaryTree.html#getCount" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Count</span></a>
|
|
78
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>
|
|
79
102
|
<a href="BinaryTree.html#getHeight" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Height</span></a>
|
|
80
103
|
<a href="BinaryTree.html#getLeftMost" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Left<wbr/>Most</span></a>
|
|
@@ -83,8 +106,6 @@
|
|
|
83
106
|
<a href="BinaryTree.html#getPathToRoot" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Path<wbr/>To<wbr/>Root</span></a>
|
|
84
107
|
<a href="BinaryTree.html#getPredecessor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Predecessor</span></a>
|
|
85
108
|
<a href="BinaryTree.html#getRightMost" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Right<wbr/>Most</span></a>
|
|
86
|
-
<a href="BinaryTree.html#getRoot" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Root</span></a>
|
|
87
|
-
<a href="BinaryTree.html#getSize" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Size</span></a>
|
|
88
109
|
<a href="BinaryTree.html#getSubTreeSizeAndCount" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Sub<wbr/>Tree<wbr/>Size<wbr/>And<wbr/>Count</span></a>
|
|
89
110
|
<a href="BinaryTree.html#has" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>has</span></a>
|
|
90
111
|
<a href="BinaryTree.html#isBST" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>isBST</span></a>
|
|
@@ -94,6 +115,7 @@
|
|
|
94
115
|
<a href="BinaryTree.html#listLevels" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>list<wbr/>Levels</span></a>
|
|
95
116
|
<a href="BinaryTree.html#morris" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>morris</span></a>
|
|
96
117
|
<a href="BinaryTree.html#remove" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>remove</span></a>
|
|
118
|
+
<a href="BinaryTree.html#setVisitedCount" class="tsd-index-link tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>set<wbr/>Visited<wbr/>Count</span></a>
|
|
97
119
|
<a href="BinaryTree.html#subTreeAdd" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>sub<wbr/>Tree<wbr/>Add</span></a>
|
|
98
120
|
<a href="BinaryTree.html#subTreeSum" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>sub<wbr/>Tree<wbr/>Sum</span></a>
|
|
99
121
|
</div></section></div></details></section></section>
|
|
@@ -102,7 +124,7 @@
|
|
|
102
124
|
<section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a>
|
|
103
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>
|
|
104
126
|
<ul class="tsd-signatures">
|
|
105
|
-
<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>
|
|
106
128
|
<li class="tsd-description">
|
|
107
129
|
<div class="tsd-comment tsd-typography"><p>The constructor function accepts an optional options object and sets the values of loopType, autoIncrementId, and
|
|
108
130
|
isDuplicatedVal based on the provided options.</p>
|
|
@@ -111,7 +133,7 @@ isDuplicatedVal based on the provided options.</p>
|
|
|
111
133
|
<h4>Type Parameters</h4>
|
|
112
134
|
<ul class="tsd-type-parameter-list">
|
|
113
135
|
<li>
|
|
114
|
-
<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>
|
|
115
137
|
<div class="tsd-parameters">
|
|
116
138
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
117
139
|
<ul class="tsd-parameter-list">
|
|
@@ -127,74 +149,82 @@ isDuplicatedVal based on the provided options.</p>
|
|
|
127
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>
|
|
128
150
|
<li class="tsd-parameter">
|
|
129
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>
|
|
130
|
-
<h4 class="tsd-returns-title">Returns <a href="BinaryTree.html" class="tsd-signature-type tsd-kind-class">BinaryTree</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
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>
|
|
131
153
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
132
154
|
<ul>
|
|
133
|
-
<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>
|
|
134
156
|
<section class="tsd-panel-group tsd-member-group">
|
|
135
157
|
<h2>Properties</h2>
|
|
136
158
|
<section class="tsd-panel tsd-member tsd-is-private"><a id="_autoIncrementId" class="tsd-anchor"></a>
|
|
137
|
-
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <
|
|
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>
|
|
138
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">
|
|
139
161
|
<ul>
|
|
140
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
141
|
-
<section class="tsd-panel tsd-member tsd-is-
|
|
142
|
-
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-
|
|
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>
|
|
163
|
+
<section class="tsd-panel tsd-member tsd-is-private"><a id="_count" class="tsd-anchor"></a>
|
|
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>
|
|
143
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">
|
|
144
166
|
<ul>
|
|
145
|
-
<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>
|
|
146
168
|
<section class="tsd-panel tsd-member tsd-is-private"><a id="_isDuplicatedVal" class="tsd-anchor"></a>
|
|
147
|
-
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <
|
|
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>
|
|
148
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">
|
|
149
171
|
<ul>
|
|
150
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
151
|
-
<section class="tsd-panel tsd-member tsd-is-
|
|
152
|
-
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-
|
|
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>
|
|
173
|
+
<section class="tsd-panel tsd-member tsd-is-private"><a id="_loopType" class="tsd-anchor"></a>
|
|
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>
|
|
153
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">
|
|
154
176
|
<ul>
|
|
155
|
-
<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>
|
|
156
178
|
<section class="tsd-panel tsd-member tsd-is-private"><a id="_maxId" class="tsd-anchor"></a>
|
|
157
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>
|
|
158
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">
|
|
159
181
|
<ul>
|
|
160
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
161
|
-
<section class="tsd-panel tsd-member tsd-is-
|
|
162
|
-
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-
|
|
163
|
-
<div class="tsd-signature"><span class="tsd-kind-property">_root</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
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>
|
|
183
|
+
<section class="tsd-panel tsd-member tsd-is-private"><a id="_root" class="tsd-anchor"></a>
|
|
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>
|
|
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">
|
|
164
186
|
<ul>
|
|
165
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
166
|
-
<section class="tsd-panel tsd-member tsd-is-
|
|
167
|
-
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-
|
|
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>
|
|
188
|
+
<section class="tsd-panel tsd-member tsd-is-private"><a id="_size" class="tsd-anchor"></a>
|
|
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>
|
|
168
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">
|
|
169
191
|
<ul>
|
|
170
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
171
|
-
<section class="tsd-panel tsd-member tsd-is-
|
|
172
|
-
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-
|
|
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>
|
|
193
|
+
<section class="tsd-panel tsd-member tsd-is-private"><a id="_visitedCount" class="tsd-anchor"></a>
|
|
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>
|
|
173
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">
|
|
174
196
|
<ul>
|
|
175
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
176
|
-
<section class="tsd-panel tsd-member tsd-is-
|
|
177
|
-
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-
|
|
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>
|
|
198
|
+
<section class="tsd-panel tsd-member tsd-is-private"><a id="_visitedId" class="tsd-anchor"></a>
|
|
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>
|
|
178
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">
|
|
179
201
|
<ul>
|
|
180
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
181
|
-
<section class="tsd-panel tsd-member tsd-is-
|
|
182
|
-
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-
|
|
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>
|
|
203
|
+
<section class="tsd-panel tsd-member tsd-is-private"><a id="_visitedLeftSum" class="tsd-anchor"></a>
|
|
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>
|
|
183
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">
|
|
184
206
|
<ul>
|
|
185
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
186
|
-
<section class="tsd-panel tsd-member tsd-is-
|
|
187
|
-
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-
|
|
188
|
-
<div class="tsd-signature"><span class="tsd-kind-property">_visited<wbr/>Node</span><span class="tsd-signature-symbol">:</span> <
|
|
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>
|
|
208
|
+
<section class="tsd-panel tsd-member tsd-is-private"><a id="_visitedNode" class="tsd-anchor"></a>
|
|
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>
|
|
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">
|
|
189
211
|
<ul>
|
|
190
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
191
|
-
<section class="tsd-panel tsd-member tsd-is-
|
|
192
|
-
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-
|
|
193
|
-
<div class="tsd-signature"><span class="tsd-kind-property">_visited<wbr/>Val</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type tsd-kind-type-parameter">
|
|
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>
|
|
213
|
+
<section class="tsd-panel tsd-member tsd-is-private"><a id="_visitedVal" class="tsd-anchor"></a>
|
|
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>
|
|
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">
|
|
194
216
|
<ul>
|
|
195
|
-
<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>
|
|
196
218
|
<section class="tsd-panel-group tsd-member-group">
|
|
197
219
|
<h2>Accessors</h2>
|
|
220
|
+
<section class="tsd-panel tsd-member"><a id="autoIncrementId" class="tsd-anchor"></a>
|
|
221
|
+
<h3 class="tsd-anchor-link"><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>
|
|
222
|
+
<ul class="tsd-signatures">
|
|
223
|
+
<li class="tsd-signature" id="autoIncrementId.autoIncrementId-1"><span class="tsd-signature-symbol">get</span> autoIncrementId<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
|
|
224
|
+
<li class="tsd-description">
|
|
225
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources">
|
|
226
|
+
<ul>
|
|
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>
|
|
198
228
|
<section class="tsd-panel tsd-member"><a id="count" class="tsd-anchor"></a>
|
|
199
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>
|
|
200
230
|
<ul class="tsd-signatures">
|
|
@@ -202,35 +232,39 @@ isDuplicatedVal based on the provided options.</p>
|
|
|
202
232
|
<li class="tsd-description">
|
|
203
233
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
|
|
204
234
|
<ul>
|
|
205
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
206
|
-
<
|
|
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>
|
|
236
|
+
<section class="tsd-panel tsd-member"><a id="isDuplicatedVal" class="tsd-anchor"></a>
|
|
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>
|
|
238
|
+
<ul class="tsd-signatures">
|
|
239
|
+
<li class="tsd-signature" id="isDuplicatedVal.isDuplicatedVal-1"><span class="tsd-signature-symbol">get</span> isDuplicatedVal<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
|
|
207
240
|
<li class="tsd-description">
|
|
208
|
-
<
|
|
209
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
210
|
-
<ul class="tsd-parameter-list">
|
|
211
|
-
<li>
|
|
212
|
-
<h5><span class="tsd-kind-parameter">v</span>: <span class="tsd-signature-type">number</span></h5></li></ul></div>
|
|
213
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
241
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources">
|
|
214
242
|
<ul>
|
|
215
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
216
|
-
<section class="tsd-panel tsd-member"><a id="
|
|
217
|
-
<h3 class="tsd-anchor-link"><span>
|
|
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>
|
|
244
|
+
<section class="tsd-panel tsd-member"><a id="loopType" class="tsd-anchor"></a>
|
|
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>
|
|
218
246
|
<ul class="tsd-signatures">
|
|
219
|
-
<li class="tsd-signature" id="
|
|
247
|
+
<li class="tsd-signature" id="loopType.loopType-1"><span class="tsd-signature-symbol">get</span> loopType<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../enums/LoopType.html" class="tsd-signature-type tsd-kind-enum">LoopType</a></li>
|
|
220
248
|
<li class="tsd-description">
|
|
221
|
-
<h4 class="tsd-returns-title">Returns <
|
|
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">
|
|
222
250
|
<ul>
|
|
223
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
224
|
-
<
|
|
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>
|
|
252
|
+
<section class="tsd-panel tsd-member"><a id="maxId" class="tsd-anchor"></a>
|
|
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>
|
|
254
|
+
<ul class="tsd-signatures">
|
|
255
|
+
<li class="tsd-signature" id="maxId.maxId-1"><span class="tsd-signature-symbol">get</span> maxId<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li>
|
|
225
256
|
<li class="tsd-description">
|
|
226
|
-
<
|
|
227
|
-
<
|
|
228
|
-
<
|
|
229
|
-
<
|
|
230
|
-
<
|
|
231
|
-
<
|
|
257
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
|
|
258
|
+
<ul>
|
|
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>
|
|
260
|
+
<section class="tsd-panel tsd-member"><a id="root" class="tsd-anchor"></a>
|
|
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>
|
|
262
|
+
<ul class="tsd-signatures">
|
|
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>
|
|
264
|
+
<li class="tsd-description">
|
|
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">
|
|
232
266
|
<ul>
|
|
233
|
-
<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>
|
|
234
268
|
<section class="tsd-panel tsd-member"><a id="size" class="tsd-anchor"></a>
|
|
235
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>
|
|
236
270
|
<ul class="tsd-signatures">
|
|
@@ -238,17 +272,47 @@ isDuplicatedVal based on the provided options.</p>
|
|
|
238
272
|
<li class="tsd-description">
|
|
239
273
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
|
|
240
274
|
<ul>
|
|
241
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
242
|
-
<
|
|
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>
|
|
276
|
+
<section class="tsd-panel tsd-member"><a id="visitedCount" class="tsd-anchor"></a>
|
|
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>
|
|
278
|
+
<ul class="tsd-signatures">
|
|
279
|
+
<li class="tsd-signature" id="visitedCount.visitedCount-1"><span class="tsd-signature-symbol">get</span> visitedCount<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></li>
|
|
243
280
|
<li class="tsd-description">
|
|
244
|
-
<
|
|
245
|
-
<
|
|
246
|
-
<
|
|
247
|
-
<
|
|
248
|
-
<
|
|
249
|
-
<
|
|
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">
|
|
282
|
+
<ul>
|
|
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>
|
|
284
|
+
<section class="tsd-panel tsd-member"><a id="visitedId" class="tsd-anchor"></a>
|
|
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>
|
|
286
|
+
<ul class="tsd-signatures">
|
|
287
|
+
<li class="tsd-signature" id="visitedId.visitedId-1"><span class="tsd-signature-symbol">get</span> visitedId<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></li>
|
|
288
|
+
<li class="tsd-description">
|
|
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">
|
|
290
|
+
<ul>
|
|
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>
|
|
292
|
+
<section class="tsd-panel tsd-member"><a id="visitedLeftSum" class="tsd-anchor"></a>
|
|
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>
|
|
294
|
+
<ul class="tsd-signatures">
|
|
295
|
+
<li class="tsd-signature" id="visitedLeftSum.visitedLeftSum-1"><span class="tsd-signature-symbol">get</span> visitedLeftSum<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></li>
|
|
296
|
+
<li class="tsd-description">
|
|
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">
|
|
250
298
|
<ul>
|
|
251
|
-
<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>
|
|
300
|
+
<section class="tsd-panel tsd-member"><a id="visitedNode" class="tsd-anchor"></a>
|
|
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>
|
|
302
|
+
<ul class="tsd-signatures">
|
|
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>
|
|
304
|
+
<li class="tsd-description">
|
|
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">
|
|
306
|
+
<ul>
|
|
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>
|
|
308
|
+
<section class="tsd-panel tsd-member"><a id="visitedVal" class="tsd-anchor"></a>
|
|
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>
|
|
310
|
+
<ul class="tsd-signatures">
|
|
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>
|
|
312
|
+
<li class="tsd-description">
|
|
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">
|
|
314
|
+
<ul>
|
|
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>
|
|
252
316
|
<section class="tsd-panel-group tsd-member-group">
|
|
253
317
|
<h2>Methods</h2>
|
|
254
318
|
<section class="tsd-panel tsd-member"><a id="BFS" class="tsd-anchor"></a>
|
|
@@ -259,11 +323,11 @@ isDuplicatedVal based on the provided options.</p>
|
|
|
259
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
|
|
260
324
|
or property name.</p>
|
|
261
325
|
</div>
|
|
262
|
-
<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>
|
|
263
327
|
|
|
264
328
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
265
329
|
<ul>
|
|
266
|
-
<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>
|
|
267
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>
|
|
268
332
|
<li class="tsd-description">
|
|
269
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
|
|
@@ -280,12 +344,12 @@ performed starting from that node. If a property name is provided, the breadth-f
|
|
|
280
344
|
performed starting from the root node</p>
|
|
281
345
|
</div>
|
|
282
346
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
283
|
-
<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>
|
|
284
348
|
|
|
285
349
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
286
350
|
<ul>
|
|
287
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
288
|
-
<li class="tsd-signature tsd-anchor-link" id="BFS.BFS-3"><span class="tsd-kind-call-signature">BFS</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
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>
|
|
289
353
|
<li class="tsd-description">
|
|
290
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
|
|
291
355
|
or property name.</p>
|
|
@@ -301,12 +365,12 @@ performed starting from that node. If a property name is provided, the breadth-f
|
|
|
301
365
|
performed starting from the root node</p>
|
|
302
366
|
</div>
|
|
303
367
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
304
|
-
<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>
|
|
305
369
|
|
|
306
370
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
307
371
|
<ul>
|
|
308
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
309
|
-
<li class="tsd-signature tsd-anchor-link" id="BFS.BFS-4"><span class="tsd-kind-call-signature">BFS</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><
|
|
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>
|
|
310
374
|
<li class="tsd-description">
|
|
311
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
|
|
312
376
|
or property name.</p>
|
|
@@ -322,11 +386,11 @@ performed starting from that node. If a property name is provided, the breadth-f
|
|
|
322
386
|
performed starting from the root node</p>
|
|
323
387
|
</div>
|
|
324
388
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
325
|
-
<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>
|
|
326
390
|
|
|
327
391
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
328
392
|
<ul>
|
|
329
|
-
<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>
|
|
330
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>
|
|
331
395
|
<li class="tsd-description">
|
|
332
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
|
|
@@ -343,11 +407,11 @@ performed starting from that node. If a property name is provided, the breadth-f
|
|
|
343
407
|
performed starting from the root node</p>
|
|
344
408
|
</div>
|
|
345
409
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
346
|
-
<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>
|
|
347
411
|
|
|
348
412
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
349
413
|
<ul>
|
|
350
|
-
<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>
|
|
351
415
|
<section class="tsd-panel tsd-member"><a id="DFS" class="tsd-anchor"></a>
|
|
352
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>
|
|
353
417
|
<ul class="tsd-signatures">
|
|
@@ -356,11 +420,11 @@ performed starting from the root node</p>
|
|
|
356
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
|
|
357
421
|
specified pattern and node or property name.</p>
|
|
358
422
|
</div>
|
|
359
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>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>
|
|
360
424
|
|
|
361
425
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
362
426
|
<ul>
|
|
363
|
-
<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>
|
|
364
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>
|
|
365
429
|
<li class="tsd-description">
|
|
366
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
|
|
@@ -384,12 +448,12 @@ either the name of a property in the <code>BinaryTreeNode</code> object or the v
|
|
|
384
448
|
no value</p>
|
|
385
449
|
</div>
|
|
386
450
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
387
|
-
<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>
|
|
388
452
|
|
|
389
453
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
390
454
|
<ul>
|
|
391
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
392
|
-
<li class="tsd-signature tsd-anchor-link" id="DFS.DFS-3"><span class="tsd-kind-call-signature">DFS</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
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>
|
|
393
457
|
<li class="tsd-description">
|
|
394
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
|
|
395
459
|
specified pattern and node or property name.</p>
|
|
@@ -412,12 +476,12 @@ either the name of a property in the <code>BinaryTreeNode</code> object or the v
|
|
|
412
476
|
no value</p>
|
|
413
477
|
</div>
|
|
414
478
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
415
|
-
<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>
|
|
416
480
|
|
|
417
481
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
418
482
|
<ul>
|
|
419
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
420
|
-
<li class="tsd-signature tsd-anchor-link" id="DFS.DFS-4"><span class="tsd-kind-call-signature">DFS</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><
|
|
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>
|
|
421
485
|
<li class="tsd-description">
|
|
422
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
|
|
423
487
|
specified pattern and node or property name.</p>
|
|
@@ -440,11 +504,11 @@ either the name of a property in the <code>BinaryTreeNode</code> object or the v
|
|
|
440
504
|
no value</p>
|
|
441
505
|
</div>
|
|
442
506
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
443
|
-
<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>
|
|
444
508
|
|
|
445
509
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
446
510
|
<ul>
|
|
447
|
-
<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>
|
|
448
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>
|
|
449
513
|
<li class="tsd-description">
|
|
450
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
|
|
@@ -468,11 +532,11 @@ either the name of a property in the <code>BinaryTreeNode</code> object or the v
|
|
|
468
532
|
no value</p>
|
|
469
533
|
</div>
|
|
470
534
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
471
|
-
<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>
|
|
472
536
|
|
|
473
537
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
474
538
|
<ul>
|
|
475
|
-
<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>
|
|
476
540
|
<section class="tsd-panel tsd-member"><a id="DFSIterative" class="tsd-anchor"></a>
|
|
477
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>
|
|
478
542
|
<ul class="tsd-signatures">
|
|
@@ -484,7 +548,7 @@ Space complexity of Iterative DFS equals to recursive DFS which is O(n) because
|
|
|
484
548
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4>
|
|
485
549
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
486
550
|
<ul>
|
|
487
|
-
<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>
|
|
488
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>
|
|
489
553
|
<li class="tsd-description">
|
|
490
554
|
<div class="tsd-comment tsd-typography"><p>Time complexity is O(n)
|
|
@@ -502,8 +566,8 @@ Space complexity of Iterative DFS equals to recursive DFS which is O(n) because
|
|
|
502
566
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4>
|
|
503
567
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
504
568
|
<ul>
|
|
505
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
506
|
-
<li class="tsd-signature tsd-anchor-link" id="DFSIterative.DFSIterative-3"><span class="tsd-kind-call-signature">DFSIterative</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
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>
|
|
507
571
|
<li class="tsd-description">
|
|
508
572
|
<div class="tsd-comment tsd-typography"><p>Time complexity is O(n)
|
|
509
573
|
Space complexity of Iterative DFS equals to recursive DFS which is O(n) because of the stack</p>
|
|
@@ -517,11 +581,11 @@ Space complexity of Iterative DFS equals to recursive DFS which is O(n) because
|
|
|
517
581
|
<li>
|
|
518
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>
|
|
519
583
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
520
|
-
<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>
|
|
521
585
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
522
586
|
<ul>
|
|
523
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
524
|
-
<li class="tsd-signature tsd-anchor-link" id="DFSIterative.DFSIterative-4"><span class="tsd-kind-call-signature">DFSIterative</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><
|
|
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>
|
|
525
589
|
<li class="tsd-description">
|
|
526
590
|
<div class="tsd-comment tsd-typography"><p>Time complexity is O(n)
|
|
527
591
|
Space complexity of Iterative DFS equals to recursive DFS which is O(n) because of the stack</p>
|
|
@@ -535,10 +599,10 @@ Space complexity of Iterative DFS equals to recursive DFS which is O(n) because
|
|
|
535
599
|
<li>
|
|
536
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>
|
|
537
601
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
538
|
-
<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>
|
|
539
603
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
540
604
|
<ul>
|
|
541
|
-
<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>
|
|
542
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>
|
|
543
607
|
<li class="tsd-description">
|
|
544
608
|
<div class="tsd-comment tsd-typography"><p>Time complexity is O(n)
|
|
@@ -556,7 +620,7 @@ Space complexity of Iterative DFS equals to recursive DFS which is O(n) because
|
|
|
556
620
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4>
|
|
557
621
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
558
622
|
<ul>
|
|
559
|
-
<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>
|
|
560
624
|
<section class="tsd-panel tsd-member tsd-is-protected"><a id="_accumulatedByPropertyName" class="tsd-anchor"></a>
|
|
561
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>
|
|
562
626
|
<ul class="tsd-signatures tsd-is-protected">
|
|
@@ -569,8 +633,8 @@ provided property name or a default property name.</p>
|
|
|
569
633
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
570
634
|
<ul class="tsd-parameter-list">
|
|
571
635
|
<li>
|
|
572
|
-
<h5><span class="tsd-kind-parameter">node</span>: <
|
|
573
|
-
<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>
|
|
574
638
|
</div>
|
|
575
639
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
576
640
|
<li>
|
|
@@ -583,11 +647,46 @@ the property name of the node that should be accumulated. If it is a node object
|
|
|
583
647
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
584
648
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
585
649
|
<ul>
|
|
586
|
-
<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>
|
|
587
686
|
<section class="tsd-panel tsd-member tsd-is-protected"><a id="_getResultByPropertyName" class="tsd-anchor"></a>
|
|
588
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>
|
|
589
688
|
<ul class="tsd-signatures tsd-is-protected">
|
|
590
|
-
<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>
|
|
591
690
|
<li class="tsd-description">
|
|
592
691
|
<div class="tsd-comment tsd-typography"><p>The function <code>_getResultByPropertyName</code> returns different results based on the provided property name or defaulting
|
|
593
692
|
to 'id'.</p>
|
|
@@ -601,11 +700,11 @@ to 'id'.</p>
|
|
|
601
700
|
can accept a value of type <code>NodeOrPropertyName</code>.</p>
|
|
602
701
|
</div>
|
|
603
702
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
604
|
-
<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>
|
|
605
704
|
|
|
606
705
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
607
706
|
<ul>
|
|
608
|
-
<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>
|
|
609
708
|
<section class="tsd-panel tsd-member tsd-is-protected"><a id="_pushByPropertyNameStopOrNot" class="tsd-anchor"></a>
|
|
610
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>
|
|
611
710
|
<ul class="tsd-signatures tsd-is-protected">
|
|
@@ -618,18 +717,18 @@ a result array.</p>
|
|
|
618
717
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
619
718
|
<ul class="tsd-parameter-list">
|
|
620
719
|
<li>
|
|
621
|
-
<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>
|
|
622
721
|
<div class="tsd-comment tsd-typography"><p>The current binary tree node that is being checked.</p>
|
|
623
722
|
</div>
|
|
624
723
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
625
724
|
<li>
|
|
626
|
-
<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>
|
|
627
726
|
<div class="tsd-comment tsd-typography"><p>An array that stores the matching nodes found during the
|
|
628
727
|
traversal.</p>
|
|
629
728
|
</div>
|
|
630
729
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
631
730
|
<li>
|
|
632
|
-
<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>
|
|
633
732
|
<div class="tsd-comment tsd-typography"><p>The <code>nodeProperty</code> parameter is the value that we are searching for in
|
|
634
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>
|
|
635
734
|
</div>
|
|
@@ -652,7 +751,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
652
751
|
|
|
653
752
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
654
753
|
<ul>
|
|
655
|
-
<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>
|
|
656
755
|
<section class="tsd-panel tsd-member tsd-is-protected"><a id="_resetResults" class="tsd-anchor"></a>
|
|
657
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>
|
|
658
757
|
<ul class="tsd-signatures tsd-is-protected">
|
|
@@ -663,11 +762,154 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
663
762
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
664
763
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
665
764
|
<ul>
|
|
666
|
-
<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>
|
|
766
|
+
<section class="tsd-panel tsd-member tsd-is-protected"><a id="_setAutoIncrementId" class="tsd-anchor"></a>
|
|
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>
|
|
768
|
+
<ul class="tsd-signatures tsd-is-protected">
|
|
769
|
+
<li class="tsd-signature tsd-anchor-link" id="_setAutoIncrementId._setAutoIncrementId-1"><span class="tsd-kind-call-signature">_set<wbr/>Auto<wbr/>Increment<wbr/>Id</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#_setAutoIncrementId._setAutoIncrementId-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
770
|
+
<li class="tsd-description">
|
|
771
|
+
<div class="tsd-parameters">
|
|
772
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
773
|
+
<ul class="tsd-parameter-list">
|
|
774
|
+
<li>
|
|
775
|
+
<h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">boolean</span></h5></li></ul></div>
|
|
776
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
777
|
+
<ul>
|
|
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>
|
|
779
|
+
<section class="tsd-panel tsd-member tsd-is-protected"><a id="_setCount" class="tsd-anchor"></a>
|
|
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>
|
|
781
|
+
<ul class="tsd-signatures tsd-is-protected">
|
|
782
|
+
<li class="tsd-signature tsd-anchor-link" id="_setCount._setCount-1"><span class="tsd-kind-call-signature">_set<wbr/>Count</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">v</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#_setCount._setCount-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
783
|
+
<li class="tsd-description">
|
|
784
|
+
<div class="tsd-parameters">
|
|
785
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
786
|
+
<ul class="tsd-parameter-list">
|
|
787
|
+
<li>
|
|
788
|
+
<h5><span class="tsd-kind-parameter">v</span>: <span class="tsd-signature-type">number</span></h5></li></ul></div>
|
|
789
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
790
|
+
<ul>
|
|
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>
|
|
792
|
+
<section class="tsd-panel tsd-member tsd-is-protected"><a id="_setIsDuplicatedVal" class="tsd-anchor"></a>
|
|
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>
|
|
794
|
+
<ul class="tsd-signatures tsd-is-protected">
|
|
795
|
+
<li class="tsd-signature tsd-anchor-link" id="_setIsDuplicatedVal._setIsDuplicatedVal-1"><span class="tsd-kind-call-signature">_set<wbr/>Is<wbr/>Duplicated<wbr/>Val</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#_setIsDuplicatedVal._setIsDuplicatedVal-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
796
|
+
<li class="tsd-description">
|
|
797
|
+
<div class="tsd-parameters">
|
|
798
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
799
|
+
<ul class="tsd-parameter-list">
|
|
800
|
+
<li>
|
|
801
|
+
<h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">boolean</span></h5></li></ul></div>
|
|
802
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
803
|
+
<ul>
|
|
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>
|
|
805
|
+
<section class="tsd-panel tsd-member tsd-is-protected"><a id="_setLoopType" class="tsd-anchor"></a>
|
|
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>
|
|
807
|
+
<ul class="tsd-signatures tsd-is-protected">
|
|
808
|
+
<li class="tsd-signature tsd-anchor-link" id="_setLoopType._setLoopType-1"><span class="tsd-kind-call-signature">_set<wbr/>Loop<wbr/>Type</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#_setLoopType._setLoopType-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
809
|
+
<li class="tsd-description">
|
|
810
|
+
<div class="tsd-parameters">
|
|
811
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
812
|
+
<ul class="tsd-parameter-list">
|
|
813
|
+
<li>
|
|
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>
|
|
815
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
816
|
+
<ul>
|
|
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>
|
|
818
|
+
<section class="tsd-panel tsd-member tsd-is-protected"><a id="_setMaxId" class="tsd-anchor"></a>
|
|
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>
|
|
820
|
+
<ul class="tsd-signatures tsd-is-protected">
|
|
821
|
+
<li class="tsd-signature tsd-anchor-link" id="_setMaxId._setMaxId-1"><span class="tsd-kind-call-signature">_set<wbr/>Max<wbr/>Id</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#_setMaxId._setMaxId-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
822
|
+
<li class="tsd-description">
|
|
823
|
+
<div class="tsd-parameters">
|
|
824
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
825
|
+
<ul class="tsd-parameter-list">
|
|
826
|
+
<li>
|
|
827
|
+
<h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">number</span></h5></li></ul></div>
|
|
828
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
829
|
+
<ul>
|
|
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>
|
|
831
|
+
<section class="tsd-panel tsd-member tsd-is-protected"><a id="_setRoot" class="tsd-anchor"></a>
|
|
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>
|
|
833
|
+
<ul class="tsd-signatures tsd-is-protected">
|
|
834
|
+
<li class="tsd-signature tsd-anchor-link" id="_setRoot._setRoot-1"><span class="tsd-kind-call-signature">_set<wbr/>Root</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">v</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#_setRoot._setRoot-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
835
|
+
<li class="tsd-description">
|
|
836
|
+
<div class="tsd-parameters">
|
|
837
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
838
|
+
<ul class="tsd-parameter-list">
|
|
839
|
+
<li>
|
|
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>
|
|
841
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
842
|
+
<ul>
|
|
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>
|
|
844
|
+
<section class="tsd-panel tsd-member tsd-is-protected"><a id="_setSize" class="tsd-anchor"></a>
|
|
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>
|
|
846
|
+
<ul class="tsd-signatures tsd-is-protected">
|
|
847
|
+
<li class="tsd-signature tsd-anchor-link" id="_setSize._setSize-1"><span class="tsd-kind-call-signature">_set<wbr/>Size</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">v</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#_setSize._setSize-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
848
|
+
<li class="tsd-description">
|
|
849
|
+
<div class="tsd-parameters">
|
|
850
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
851
|
+
<ul class="tsd-parameter-list">
|
|
852
|
+
<li>
|
|
853
|
+
<h5><span class="tsd-kind-parameter">v</span>: <span class="tsd-signature-type">number</span></h5></li></ul></div>
|
|
854
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
855
|
+
<ul>
|
|
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>
|
|
857
|
+
<section class="tsd-panel tsd-member tsd-is-protected"><a id="_setVisitedId" class="tsd-anchor"></a>
|
|
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>
|
|
859
|
+
<ul class="tsd-signatures tsd-is-protected">
|
|
860
|
+
<li class="tsd-signature tsd-anchor-link" id="_setVisitedId._setVisitedId-1"><span class="tsd-kind-call-signature">_set<wbr/>Visited<wbr/>Id</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#_setVisitedId._setVisitedId-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
861
|
+
<li class="tsd-description">
|
|
862
|
+
<div class="tsd-parameters">
|
|
863
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
864
|
+
<ul class="tsd-parameter-list">
|
|
865
|
+
<li>
|
|
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>
|
|
867
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
868
|
+
<ul>
|
|
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>
|
|
870
|
+
<section class="tsd-panel tsd-member tsd-is-protected"><a id="_setVisitedLeftSum" class="tsd-anchor"></a>
|
|
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>
|
|
872
|
+
<ul class="tsd-signatures tsd-is-protected">
|
|
873
|
+
<li class="tsd-signature tsd-anchor-link" id="_setVisitedLeftSum._setVisitedLeftSum-1"><span class="tsd-kind-call-signature">_set<wbr/>Visited<wbr/>Left<wbr/>Sum</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#_setVisitedLeftSum._setVisitedLeftSum-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
874
|
+
<li class="tsd-description">
|
|
875
|
+
<div class="tsd-parameters">
|
|
876
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
877
|
+
<ul class="tsd-parameter-list">
|
|
878
|
+
<li>
|
|
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>
|
|
880
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
881
|
+
<ul>
|
|
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>
|
|
883
|
+
<section class="tsd-panel tsd-member tsd-is-protected"><a id="_setVisitedNode" class="tsd-anchor"></a>
|
|
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>
|
|
885
|
+
<ul class="tsd-signatures tsd-is-protected">
|
|
886
|
+
<li class="tsd-signature tsd-anchor-link" id="_setVisitedNode._setVisitedNode-1"><span class="tsd-kind-call-signature">_set<wbr/>Visited<wbr/>Node</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#_setVisitedNode._setVisitedNode-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
887
|
+
<li class="tsd-description">
|
|
888
|
+
<div class="tsd-parameters">
|
|
889
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
890
|
+
<ul class="tsd-parameter-list">
|
|
891
|
+
<li>
|
|
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>
|
|
893
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
894
|
+
<ul>
|
|
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>
|
|
896
|
+
<section class="tsd-panel tsd-member tsd-is-protected"><a id="_setVisitedVal" class="tsd-anchor"></a>
|
|
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>
|
|
898
|
+
<ul class="tsd-signatures tsd-is-protected">
|
|
899
|
+
<li class="tsd-signature tsd-anchor-link" id="_setVisitedVal._setVisitedVal-1"><span class="tsd-kind-call-signature">_set<wbr/>Visited<wbr/>Val</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#_setVisitedVal._setVisitedVal-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
900
|
+
<li class="tsd-description">
|
|
901
|
+
<div class="tsd-parameters">
|
|
902
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
903
|
+
<ul class="tsd-parameter-list">
|
|
904
|
+
<li>
|
|
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>
|
|
906
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
907
|
+
<ul>
|
|
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>
|
|
667
909
|
<section class="tsd-panel tsd-member"><a id="add" class="tsd-anchor"></a>
|
|
668
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>
|
|
669
911
|
<ul class="tsd-signatures">
|
|
670
|
-
<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>
|
|
671
913
|
<li class="tsd-description">
|
|
672
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
|
|
673
915
|
already exists.</p>
|
|
@@ -682,7 +924,7 @@ identify each node in the binary tree.</p>
|
|
|
682
924
|
</div>
|
|
683
925
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
684
926
|
<li>
|
|
685
|
-
<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>
|
|
686
928
|
<div class="tsd-comment tsd-typography"><p>The value to be inserted into the binary tree.</p>
|
|
687
929
|
</div>
|
|
688
930
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
@@ -692,16 +934,16 @@ identify each node in the binary tree.</p>
|
|
|
692
934
|
value should be inserted into the binary tree. If not provided, it defaults to 1.</p>
|
|
693
935
|
</div>
|
|
694
936
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
695
|
-
<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
|
|
696
938
|
is inserted, or <code>undefined</code> if the insertion fails.</p>
|
|
697
939
|
|
|
698
940
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
699
941
|
<ul>
|
|
700
|
-
<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>
|
|
701
943
|
<section class="tsd-panel tsd-member"><a id="addMany" class="tsd-anchor"></a>
|
|
702
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>
|
|
703
945
|
<ul class="tsd-signatures">
|
|
704
|
-
<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>
|
|
705
947
|
<li class="tsd-description">
|
|
706
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
|
|
707
949
|
null/undefined values.</p>
|
|
@@ -710,20 +952,20 @@ null/undefined values.</p>
|
|
|
710
952
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
711
953
|
<ul class="tsd-parameter-list">
|
|
712
954
|
<li>
|
|
713
|
-
<h5><span class="tsd-kind-parameter">data</span>: <span class="tsd-signature-type tsd-kind-type-parameter">
|
|
714
|
-
<div class="tsd-comment tsd-typography"><p>The <code>data</code> parameter can be either an array of elements of type <code>
|
|
715
|
-
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>
|
|
716
958
|
</div>
|
|
717
959
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
718
|
-
<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>
|
|
719
961
|
|
|
720
962
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
721
963
|
<ul>
|
|
722
|
-
<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>
|
|
723
965
|
<section class="tsd-panel tsd-member"><a id="addTo" class="tsd-anchor"></a>
|
|
724
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>
|
|
725
967
|
<ul class="tsd-signatures">
|
|
726
|
-
<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>
|
|
727
969
|
<li class="tsd-description">
|
|
728
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>
|
|
729
971
|
</div>
|
|
@@ -731,22 +973,22 @@ array of <code>BinaryTreeNode<T></code> objects.</p>
|
|
|
731
973
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
732
974
|
<ul class="tsd-parameter-list">
|
|
733
975
|
<li>
|
|
734
|
-
<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>
|
|
735
977
|
<div class="tsd-comment tsd-typography"><p>The <code>newNode</code> parameter is an instance of the <code>BinaryTreeNode</code> class or
|
|
736
978
|
<code>null</code>. It represents the node that needs to be inserted into the binary tree.</p>
|
|
737
979
|
</div>
|
|
738
980
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
739
981
|
<li>
|
|
740
|
-
<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>
|
|
741
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
|
|
742
984
|
will be inserted as a child.</p>
|
|
743
985
|
</div>
|
|
744
986
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
745
|
-
<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>
|
|
746
988
|
|
|
747
989
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
748
990
|
<ul>
|
|
749
|
-
<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>
|
|
750
992
|
<section class="tsd-panel tsd-member"><a id="clear" class="tsd-anchor"></a>
|
|
751
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>
|
|
752
994
|
<ul class="tsd-signatures">
|
|
@@ -757,42 +999,7 @@ will be inserted as a child.</p>
|
|
|
757
999
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
758
1000
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
759
1001
|
<ul>
|
|
760
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
761
|
-
<section class="tsd-panel tsd-member"><a id="createNode" class="tsd-anchor"></a>
|
|
762
|
-
<h3 class="tsd-anchor-link"><span>create<wbr/>Node</span><a href="#createNode" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
763
|
-
<ul class="tsd-signatures">
|
|
764
|
-
<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>
|
|
765
|
-
<li class="tsd-description">
|
|
766
|
-
<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
|
|
767
|
-
null.</p>
|
|
768
|
-
</div>
|
|
769
|
-
<div class="tsd-parameters">
|
|
770
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
771
|
-
<ul class="tsd-parameter-list">
|
|
772
|
-
<li>
|
|
773
|
-
<h5><span class="tsd-kind-parameter">id</span>: <span class="tsd-signature-type">number</span></h5>
|
|
774
|
-
<div class="tsd-comment tsd-typography"><p>The <code>id</code> parameter is the identifier for the binary tree node. It is of type
|
|
775
|
-
<code>BinaryTreeNodeId</code>, which could be a string or a number, depending on how you want to identify your nodes.</p>
|
|
776
|
-
</div>
|
|
777
|
-
<div class="tsd-comment tsd-typography"></div></li>
|
|
778
|
-
<li>
|
|
779
|
-
<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>
|
|
780
|
-
<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
|
|
781
|
-
any type <code>T</code> or <code>null</code>.</p>
|
|
782
|
-
</div>
|
|
783
|
-
<div class="tsd-comment tsd-typography"></div></li>
|
|
784
|
-
<li>
|
|
785
|
-
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">count</span>: <span class="tsd-signature-type">number</span></h5>
|
|
786
|
-
<div class="tsd-comment tsd-typography"><p>The count parameter is an optional parameter that represents the number of occurrences of
|
|
787
|
-
the value in the binary tree node. It is of type number.</p>
|
|
788
|
-
</div>
|
|
789
|
-
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
790
|
-
<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.
|
|
791
|
-
Otherwise, it returns null.</p>
|
|
792
|
-
|
|
793
|
-
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
794
|
-
<ul>
|
|
795
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L307">src/data-structures/binary-tree/binary-tree.ts:307</a></li></ul></aside></li></ul></section>
|
|
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>
|
|
796
1003
|
<section class="tsd-panel tsd-member"><a id="fill" class="tsd-anchor"></a>
|
|
797
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>
|
|
798
1005
|
<ul class="tsd-signatures">
|
|
@@ -805,20 +1012,20 @@ was successful.</p>
|
|
|
805
1012
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
806
1013
|
<ul class="tsd-parameter-list">
|
|
807
1014
|
<li>
|
|
808
|
-
<h5><span class="tsd-kind-parameter">data</span>: <span class="tsd-signature-type tsd-kind-type-parameter">
|
|
809
|
-
<div class="tsd-comment tsd-typography"><p>The <code>data</code> parameter can be either an array of elements of type <code>
|
|
810
|
-
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>
|
|
811
1018
|
</div>
|
|
812
1019
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
813
1020
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>The method is returning a boolean value.</p>
|
|
814
1021
|
|
|
815
1022
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
816
1023
|
<ul>
|
|
817
|
-
<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>
|
|
818
1025
|
<section class="tsd-panel tsd-member"><a id="get" class="tsd-anchor"></a>
|
|
819
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>
|
|
820
1027
|
<ul class="tsd-signatures">
|
|
821
|
-
<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>
|
|
822
1029
|
<li class="tsd-description">
|
|
823
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
|
|
824
1031
|
is found.</p>
|
|
@@ -827,9 +1034,9 @@ is found.</p>
|
|
|
827
1034
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
828
1035
|
<ul class="tsd-parameter-list">
|
|
829
1036
|
<li>
|
|
830
|
-
<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>
|
|
831
1038
|
<div class="tsd-comment tsd-typography"><p>The <code>nodeProperty</code> parameter can be either a <code>BinaryTreeNodeId</code> or a
|
|
832
|
-
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>
|
|
833
1040
|
</div>
|
|
834
1041
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
835
1042
|
<li>
|
|
@@ -838,22 +1045,11 @@ generic type <code>T</code>. It represents the property of the binary tree node
|
|
|
838
1045
|
specifies the property of the binary tree node to search for. If not provided, it defaults to <code>'id'</code>.</p>
|
|
839
1046
|
</div>
|
|
840
1047
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
841
|
-
<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>
|
|
842
1049
|
|
|
843
1050
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
844
1051
|
<ul>
|
|
845
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
846
|
-
<section class="tsd-panel tsd-member"><a id="getCount" class="tsd-anchor"></a>
|
|
847
|
-
<h3 class="tsd-anchor-link"><span>get<wbr/>Count</span><a href="#getCount" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
848
|
-
<ul class="tsd-signatures">
|
|
849
|
-
<li class="tsd-signature tsd-anchor-link" id="getCount.getCount-1"><span class="tsd-kind-call-signature">get<wbr/>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">number</span><a href="#getCount.getCount-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
850
|
-
<li class="tsd-description">
|
|
851
|
-
<div class="tsd-comment tsd-typography"><p>Starting from TypeScript version 5.0 and onwards, the use of distinct access modifiers for Getters and Setters is not permitted. As an alternative, to ensure compatibility, it is necessary to adopt a Java-style approach for Setters (using the same name as the property) while utilizing separate method names for Getters.</p>
|
|
852
|
-
</div>
|
|
853
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4>
|
|
854
|
-
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
855
|
-
<ul>
|
|
856
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L291">src/data-structures/binary-tree/binary-tree.ts:291</a></li></ul></aside></li></ul></section>
|
|
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>
|
|
857
1053
|
<section class="tsd-panel tsd-member"><a id="getDepth" class="tsd-anchor"></a>
|
|
858
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>
|
|
859
1055
|
<ul class="tsd-signatures">
|
|
@@ -865,8 +1061,8 @@ specifies the property of the binary tree node to search for. If not provided, i
|
|
|
865
1061
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
866
1062
|
<ul class="tsd-parameter-list">
|
|
867
1063
|
<li>
|
|
868
|
-
<h5><span class="tsd-kind-parameter">node</span>: <
|
|
869
|
-
<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,
|
|
870
1066
|
meaning it can represent any type of data that we want to store in the node.</p>
|
|
871
1067
|
</div>
|
|
872
1068
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
@@ -874,7 +1070,7 @@ meaning it can represent any type of data that we want to store in the node.</p>
|
|
|
874
1070
|
|
|
875
1071
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
876
1072
|
<ul>
|
|
877
|
-
<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>
|
|
878
1074
|
<section class="tsd-panel tsd-member"><a id="getHeight" class="tsd-anchor"></a>
|
|
879
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>
|
|
880
1076
|
<ul class="tsd-signatures">
|
|
@@ -887,9 +1083,9 @@ approach.</p>
|
|
|
887
1083
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
888
1084
|
<ul class="tsd-parameter-list">
|
|
889
1085
|
<li>
|
|
890
|
-
<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>
|
|
891
1087
|
<div class="tsd-comment tsd-typography"><p>The <code>beginRoot</code> parameter is an optional parameter of type
|
|
892
|
-
<code>
|
|
1088
|
+
<code>N | null</code>. It represents the starting node from which to calculate the height of the binary tree.
|
|
893
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>
|
|
894
1090
|
</div>
|
|
895
1091
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
@@ -897,21 +1093,21 @@ If no value is provided for <code>beginRoot</code>, the function will use the <c
|
|
|
897
1093
|
|
|
898
1094
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
899
1095
|
<ul>
|
|
900
|
-
<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>
|
|
901
1097
|
<section class="tsd-panel tsd-member"><a id="getLeftMost" class="tsd-anchor"></a>
|
|
902
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>
|
|
903
1099
|
<ul class="tsd-signatures">
|
|
904
|
-
<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>
|
|
905
1101
|
<li class="tsd-description">
|
|
906
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
|
|
907
1103
|
recursion optimization.</p>
|
|
908
1104
|
</div>
|
|
909
|
-
<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>
|
|
910
1106
|
|
|
911
1107
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
912
1108
|
<ul>
|
|
913
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
914
|
-
<li class="tsd-signature tsd-anchor-link" id="getLeftMost.getLeftMost-2"><span class="tsd-kind-call-signature">get<wbr/>Left<wbr/>Most</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><
|
|
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>
|
|
915
1111
|
<li class="tsd-description">
|
|
916
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
|
|
917
1113
|
recursion optimization.</p>
|
|
@@ -920,16 +1116,16 @@ recursion optimization.</p>
|
|
|
920
1116
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
921
1117
|
<ul class="tsd-parameter-list">
|
|
922
1118
|
<li>
|
|
923
|
-
<h5><span class="tsd-kind-parameter">node</span>: <
|
|
924
|
-
<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
|
|
925
1121
|
provided, the function will use the root node of the binary tree.</p>
|
|
926
1122
|
</div>
|
|
927
1123
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
928
|
-
<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>
|
|
929
1125
|
|
|
930
1126
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
931
1127
|
<ul>
|
|
932
|
-
<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>
|
|
933
1129
|
<section class="tsd-panel tsd-member"><a id="getMinHeight" class="tsd-anchor"></a>
|
|
934
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>
|
|
935
1131
|
<ul class="tsd-signatures">
|
|
@@ -942,9 +1138,9 @@ approach.</p>
|
|
|
942
1138
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
943
1139
|
<ul class="tsd-parameter-list">
|
|
944
1140
|
<li>
|
|
945
|
-
<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>
|
|
946
1142
|
<div class="tsd-comment tsd-typography"><p>The <code>beginRoot</code> parameter is an optional parameter of type
|
|
947
|
-
<code>
|
|
1143
|
+
<code>N | null</code>. It represents the starting node from which to calculate the minimum height of the binary
|
|
948
1144
|
tree. If no value is provided for <code>beginRoot</code>, the function will use the root node of the binary tree.</p>
|
|
949
1145
|
</div>
|
|
950
1146
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
@@ -952,11 +1148,11 @@ tree. If no value is provided for <code>beginRoot</code>, the function will use
|
|
|
952
1148
|
|
|
953
1149
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
954
1150
|
<ul>
|
|
955
|
-
<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>
|
|
956
1152
|
<section class="tsd-panel tsd-member"><a id="getNodes" class="tsd-anchor"></a>
|
|
957
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>
|
|
958
1154
|
<ul class="tsd-signatures">
|
|
959
|
-
<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>
|
|
960
1156
|
<li class="tsd-description">
|
|
961
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
|
|
962
1158
|
searching recursively or iteratively.</p>
|
|
@@ -965,9 +1161,9 @@ searching recursively or iteratively.</p>
|
|
|
965
1161
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
966
1162
|
<ul class="tsd-parameter-list">
|
|
967
1163
|
<li>
|
|
968
|
-
<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>
|
|
969
1165
|
<div class="tsd-comment tsd-typography"><p>The <code>nodeProperty</code> parameter can be either a <code>BinaryTreeNodeId</code> or a
|
|
970
|
-
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>
|
|
971
1167
|
</div>
|
|
972
1168
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
973
1169
|
<li>
|
|
@@ -980,17 +1176,17 @@ specifies the property name to use when searching for nodes. If not provided, it
|
|
|
980
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>
|
|
981
1177
|
<div class="tsd-comment tsd-typography"><p>The <code>onlyOne</code> parameter is an optional boolean parameter that determines whether to
|
|
982
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
|
|
983
|
-
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>
|
|
984
1180
|
</div>
|
|
985
1181
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
986
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">(</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
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>
|
|
987
1183
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
988
1184
|
<ul>
|
|
989
|
-
<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>
|
|
990
1186
|
<section class="tsd-panel tsd-member"><a id="getPathToRoot" class="tsd-anchor"></a>
|
|
991
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>
|
|
992
1188
|
<ul class="tsd-signatures">
|
|
993
|
-
<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>
|
|
994
1190
|
<li class="tsd-description">
|
|
995
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
|
|
996
1192
|
root of a binary tree.</p>
|
|
@@ -999,20 +1195,20 @@ root of a binary tree.</p>
|
|
|
999
1195
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1000
1196
|
<ul class="tsd-parameter-list">
|
|
1001
1197
|
<li>
|
|
1002
|
-
<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>
|
|
1003
1199
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object.</p>
|
|
1004
1200
|
</div>
|
|
1005
1201
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1006
|
-
<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
|
|
1007
1203
|
the given <code>node</code> to the root of the binary tree.</p>
|
|
1008
1204
|
|
|
1009
1205
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1010
1206
|
<ul>
|
|
1011
|
-
<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>
|
|
1012
1208
|
<section class="tsd-panel tsd-member"><a id="getPredecessor" class="tsd-anchor"></a>
|
|
1013
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>
|
|
1014
1210
|
<ul class="tsd-signatures">
|
|
1015
|
-
<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>
|
|
1016
1212
|
<li class="tsd-description">
|
|
1017
1213
|
<div class="tsd-comment tsd-typography"><p>The function returns the predecessor of a given node in a binary tree.</p>
|
|
1018
1214
|
</div>
|
|
@@ -1020,29 +1216,29 @@ the given <code>node</code> to the root of the binary tree.</p>
|
|
|
1020
1216
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1021
1217
|
<ul class="tsd-parameter-list">
|
|
1022
1218
|
<li>
|
|
1023
|
-
<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>
|
|
1024
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>
|
|
1025
1221
|
</div>
|
|
1026
1222
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1027
|
-
<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>
|
|
1028
1224
|
|
|
1029
1225
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1030
1226
|
<ul>
|
|
1031
|
-
<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>
|
|
1032
1228
|
<section class="tsd-panel tsd-member"><a id="getRightMost" class="tsd-anchor"></a>
|
|
1033
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>
|
|
1034
1230
|
<ul class="tsd-signatures">
|
|
1035
|
-
<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>
|
|
1036
1232
|
<li class="tsd-description">
|
|
1037
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
|
|
1038
1234
|
tail recursion optimization.</p>
|
|
1039
1235
|
</div>
|
|
1040
|
-
<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>
|
|
1041
1237
|
|
|
1042
1238
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1043
1239
|
<ul>
|
|
1044
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1045
|
-
<li class="tsd-signature tsd-anchor-link" id="getRightMost.getRightMost-2"><span class="tsd-kind-call-signature">get<wbr/>Right<wbr/>Most</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><
|
|
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>
|
|
1046
1242
|
<li class="tsd-description">
|
|
1047
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
|
|
1048
1244
|
tail recursion optimization.</p>
|
|
@@ -1051,39 +1247,16 @@ tail recursion optimization.</p>
|
|
|
1051
1247
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1052
1248
|
<ul class="tsd-parameter-list">
|
|
1053
1249
|
<li>
|
|
1054
|
-
<h5><span class="tsd-kind-parameter">node</span>: <
|
|
1055
|
-
<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
|
|
1056
1252
|
provided, the function will use the root node of the binary tree.</p>
|
|
1057
1253
|
</div>
|
|
1058
1254
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1059
|
-
<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>
|
|
1060
1256
|
|
|
1061
1257
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1062
1258
|
<ul>
|
|
1063
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1064
|
-
<section class="tsd-panel tsd-member"><a id="getRoot" class="tsd-anchor"></a>
|
|
1065
|
-
<h3 class="tsd-anchor-link"><span>get<wbr/>Root</span><a href="#getRoot" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1066
|
-
<ul class="tsd-signatures">
|
|
1067
|
-
<li class="tsd-signature tsd-anchor-link" id="getRoot.getRoot-1"><span class="tsd-kind-call-signature">get<wbr/>Root</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="#getRoot.getRoot-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1068
|
-
<li class="tsd-description">
|
|
1069
|
-
<div class="tsd-comment tsd-typography"><p>Starting from TypeScript version 5.0 and onwards, the use of distinct access modifiers for Getters and Setters is not permitted. As an alternative, to ensure compatibility, it is necessary to adopt a Java-style approach for Getters (using the same name as the property) while utilizing separate method names for Setters.</p>
|
|
1070
|
-
</div>
|
|
1071
|
-
<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 method is returning either a BinaryTreeNode object of type T or null.</p>
|
|
1072
|
-
|
|
1073
|
-
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1074
|
-
<ul>
|
|
1075
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L277">src/data-structures/binary-tree/binary-tree.ts:277</a></li></ul></aside></li></ul></section>
|
|
1076
|
-
<section class="tsd-panel tsd-member"><a id="getSize" class="tsd-anchor"></a>
|
|
1077
|
-
<h3 class="tsd-anchor-link"><span>get<wbr/>Size</span><a href="#getSize" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1078
|
-
<ul class="tsd-signatures">
|
|
1079
|
-
<li class="tsd-signature tsd-anchor-link" id="getSize.getSize-1"><span class="tsd-kind-call-signature">get<wbr/>Size</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><a href="#getSize.getSize-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1080
|
-
<li class="tsd-description">
|
|
1081
|
-
<div class="tsd-comment tsd-typography"><p>Starting from TypeScript version 5.0 and onwards, the use of distinct access modifiers for Getters and Setters is not permitted. As an alternative, to ensure compatibility, it is necessary to adopt a Java-style approach for Setters (using the same name as the property) while utilizing separate method names for Getters.</p>
|
|
1082
|
-
</div>
|
|
1083
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4>
|
|
1084
|
-
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1085
|
-
<ul>
|
|
1086
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L284">src/data-structures/binary-tree/binary-tree.ts:284</a></li></ul></aside></li></ul></section>
|
|
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>
|
|
1087
1260
|
<section class="tsd-panel tsd-member"><a id="getSubTreeSizeAndCount" class="tsd-anchor"></a>
|
|
1088
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>
|
|
1089
1262
|
<ul class="tsd-signatures">
|
|
@@ -1096,7 +1269,7 @@ traversal.</p>
|
|
|
1096
1269
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1097
1270
|
<ul class="tsd-parameter-list">
|
|
1098
1271
|
<li>
|
|
1099
|
-
<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>
|
|
1100
1273
|
<div class="tsd-comment tsd-typography"><p>The <code>subTreeRoot</code> parameter is the root node of a binary
|
|
1101
1274
|
tree.</p>
|
|
1102
1275
|
</div>
|
|
@@ -1106,7 +1279,7 @@ represents the size of the subtree, and the second element represents the count
|
|
|
1106
1279
|
|
|
1107
1280
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1108
1281
|
<ul>
|
|
1109
|
-
<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>
|
|
1110
1283
|
<section class="tsd-panel tsd-member"><a id="has" class="tsd-anchor"></a>
|
|
1111
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>
|
|
1112
1285
|
<ul class="tsd-signatures">
|
|
@@ -1119,9 +1292,9 @@ property.</p>
|
|
|
1119
1292
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1120
1293
|
<ul class="tsd-parameter-list">
|
|
1121
1294
|
<li>
|
|
1122
|
-
<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>
|
|
1123
1296
|
<div class="tsd-comment tsd-typography"><p>The <code>nodeProperty</code> parameter can be either a <code>BinaryTreeNodeId</code> or a
|
|
1124
|
-
generic type <code>
|
|
1297
|
+
generic type <code>N</code>. It represents the property of a binary tree node that you want to check.</p>
|
|
1125
1298
|
</div>
|
|
1126
1299
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
1127
1300
|
<li>
|
|
@@ -1134,7 +1307,7 @@ specifies the name of the property to check for in the nodes.</p>
|
|
|
1134
1307
|
|
|
1135
1308
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1136
1309
|
<ul>
|
|
1137
|
-
<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>
|
|
1138
1311
|
<section class="tsd-panel tsd-member"><a id="isBST" class="tsd-anchor"></a>
|
|
1139
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>
|
|
1140
1313
|
<ul class="tsd-signatures">
|
|
@@ -1146,8 +1319,8 @@ specifies the name of the property to check for in the nodes.</p>
|
|
|
1146
1319
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1147
1320
|
<ul class="tsd-parameter-list">
|
|
1148
1321
|
<li>
|
|
1149
|
-
<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><
|
|
1150
|
-
<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
|
|
1151
1324
|
is provided, the function will default to using the root node of the BST instance that</p>
|
|
1152
1325
|
</div>
|
|
1153
1326
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
@@ -1156,7 +1329,7 @@ tree, and <code>false</code> otherwise.</p>
|
|
|
1156
1329
|
|
|
1157
1330
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1158
1331
|
<ul>
|
|
1159
|
-
<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>
|
|
1160
1333
|
<section class="tsd-panel tsd-member"><a id="isBalanced" class="tsd-anchor"></a>
|
|
1161
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>
|
|
1162
1335
|
<ul class="tsd-signatures">
|
|
@@ -1168,16 +1341,16 @@ tree, and <code>false</code> otherwise.</p>
|
|
|
1168
1341
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1169
1342
|
<ul class="tsd-parameter-list">
|
|
1170
1343
|
<li>
|
|
1171
|
-
<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>
|
|
1172
1345
|
<div class="tsd-comment tsd-typography"><p>The <code>beginRoot</code> parameter is the root node of a binary tree. It is
|
|
1173
|
-
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>
|
|
1174
1347
|
</div>
|
|
1175
1348
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1176
1349
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>The method is returning a boolean value.</p>
|
|
1177
1350
|
|
|
1178
1351
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1179
1352
|
<ul>
|
|
1180
|
-
<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>
|
|
1181
1354
|
<section class="tsd-panel tsd-member"><a id="isEmpty" class="tsd-anchor"></a>
|
|
1182
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>
|
|
1183
1356
|
<ul class="tsd-signatures">
|
|
@@ -1189,7 +1362,7 @@ of type <code>BinaryTreeNode<T> | null</code>, which means it can either b
|
|
|
1189
1362
|
|
|
1190
1363
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1191
1364
|
<ul>
|
|
1192
|
-
<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>
|
|
1193
1366
|
<section class="tsd-panel tsd-member"><a id="levelIterative" class="tsd-anchor"></a>
|
|
1194
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>
|
|
1195
1368
|
<ul class="tsd-signatures">
|
|
@@ -1202,17 +1375,17 @@ in an array, based on a specified property name.</p>
|
|
|
1202
1375
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1203
1376
|
<ul class="tsd-parameter-list">
|
|
1204
1377
|
<li>
|
|
1205
|
-
<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>
|
|
1206
1379
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object representing the starting
|
|
1207
1380
|
node for the level order traversal. It can be null if no specific node is provided, in which case the root node of
|
|
1208
1381
|
the tree is used as the starting node.</p>
|
|
1209
1382
|
</div>
|
|
1210
1383
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1211
|
-
<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>
|
|
1212
1385
|
|
|
1213
1386
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1214
1387
|
<ul>
|
|
1215
|
-
<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>
|
|
1216
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>
|
|
1217
1390
|
<li class="tsd-description">
|
|
1218
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
|
|
@@ -1222,7 +1395,7 @@ in an array, based on a specified property name.</p>
|
|
|
1222
1395
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1223
1396
|
<ul class="tsd-parameter-list">
|
|
1224
1397
|
<li>
|
|
1225
|
-
<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>
|
|
1226
1399
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object representing the starting
|
|
1227
1400
|
node for the level order traversal. It can be null if no specific node is provided, in which case the root node of
|
|
1228
1401
|
the tree is used as the starting node.</p>
|
|
@@ -1236,12 +1409,12 @@ will accumulate results based on that property. If no property name is provided,
|
|
|
1236
1409
|
accumulating results</p>
|
|
1237
1410
|
</div>
|
|
1238
1411
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1239
|
-
<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>
|
|
1240
1413
|
|
|
1241
1414
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1242
1415
|
<ul>
|
|
1243
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1244
|
-
<li class="tsd-signature tsd-anchor-link" id="levelIterative.levelIterative-3"><span class="tsd-kind-call-signature">level<wbr/>Iterative</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
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>
|
|
1245
1418
|
<li class="tsd-description">
|
|
1246
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
|
|
1247
1420
|
in an array, based on a specified property name.</p>
|
|
@@ -1250,7 +1423,7 @@ in an array, based on a specified property name.</p>
|
|
|
1250
1423
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1251
1424
|
<ul class="tsd-parameter-list">
|
|
1252
1425
|
<li>
|
|
1253
|
-
<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>
|
|
1254
1427
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object representing the starting
|
|
1255
1428
|
node for the level order traversal. It can be null if no specific node is provided, in which case the root node of
|
|
1256
1429
|
the tree is used as the starting node.</p>
|
|
@@ -1264,12 +1437,12 @@ will accumulate results based on that property. If no property name is provided,
|
|
|
1264
1437
|
accumulating results</p>
|
|
1265
1438
|
</div>
|
|
1266
1439
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1267
|
-
<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>
|
|
1268
1441
|
|
|
1269
1442
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1270
1443
|
<ul>
|
|
1271
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1272
|
-
<li class="tsd-signature tsd-anchor-link" id="levelIterative.levelIterative-4"><span class="tsd-kind-call-signature">level<wbr/>Iterative</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><
|
|
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>
|
|
1273
1446
|
<li class="tsd-description">
|
|
1274
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
|
|
1275
1448
|
in an array, based on a specified property name.</p>
|
|
@@ -1278,7 +1451,7 @@ in an array, based on a specified property name.</p>
|
|
|
1278
1451
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1279
1452
|
<ul class="tsd-parameter-list">
|
|
1280
1453
|
<li>
|
|
1281
|
-
<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>
|
|
1282
1455
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object representing the starting
|
|
1283
1456
|
node for the level order traversal. It can be null if no specific node is provided, in which case the root node of
|
|
1284
1457
|
the tree is used as the starting node.</p>
|
|
@@ -1292,11 +1465,11 @@ will accumulate results based on that property. If no property name is provided,
|
|
|
1292
1465
|
accumulating results</p>
|
|
1293
1466
|
</div>
|
|
1294
1467
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1295
|
-
<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>
|
|
1296
1469
|
|
|
1297
1470
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1298
1471
|
<ul>
|
|
1299
|
-
<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>
|
|
1300
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>
|
|
1301
1474
|
<li class="tsd-description">
|
|
1302
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
|
|
@@ -1306,7 +1479,7 @@ in an array, based on a specified property name.</p>
|
|
|
1306
1479
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1307
1480
|
<ul class="tsd-parameter-list">
|
|
1308
1481
|
<li>
|
|
1309
|
-
<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>
|
|
1310
1483
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object representing the starting
|
|
1311
1484
|
node for the level order traversal. It can be null if no specific node is provided, in which case the root node of
|
|
1312
1485
|
the tree is used as the starting node.</p>
|
|
@@ -1320,11 +1493,11 @@ will accumulate results based on that property. If no property name is provided,
|
|
|
1320
1493
|
accumulating results</p>
|
|
1321
1494
|
</div>
|
|
1322
1495
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1323
|
-
<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>
|
|
1324
1497
|
|
|
1325
1498
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1326
1499
|
<ul>
|
|
1327
|
-
<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>
|
|
1328
1501
|
<section class="tsd-panel tsd-member"><a id="listLevels" class="tsd-anchor"></a>
|
|
1329
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>
|
|
1330
1503
|
<ul class="tsd-signatures">
|
|
@@ -1336,16 +1509,16 @@ accumulating results</p>
|
|
|
1336
1509
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1337
1510
|
<ul class="tsd-parameter-list">
|
|
1338
1511
|
<li>
|
|
1339
|
-
<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>
|
|
1340
1513
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object or null. It represents the
|
|
1341
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>
|
|
1342
1515
|
</div>
|
|
1343
1516
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1344
|
-
<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>
|
|
1345
1518
|
|
|
1346
1519
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1347
1520
|
<ul>
|
|
1348
|
-
<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>
|
|
1349
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>
|
|
1350
1523
|
<li class="tsd-description">
|
|
1351
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>
|
|
@@ -1354,7 +1527,7 @@ root node of a binary tree. If it is null, the function will use the root node o
|
|
|
1354
1527
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1355
1528
|
<ul class="tsd-parameter-list">
|
|
1356
1529
|
<li>
|
|
1357
|
-
<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>
|
|
1358
1531
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object or null. It represents the
|
|
1359
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>
|
|
1360
1533
|
</div>
|
|
@@ -1366,12 +1539,12 @@ specifies the property of the <code>BinaryTreeNode</code> object to collect at e
|
|
|
1366
1539
|
values:</p>
|
|
1367
1540
|
</div>
|
|
1368
1541
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1369
|
-
<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>
|
|
1370
1543
|
|
|
1371
1544
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1372
1545
|
<ul>
|
|
1373
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1374
|
-
<li class="tsd-signature tsd-anchor-link" id="listLevels.listLevels-3"><span class="tsd-kind-call-signature">list<wbr/>Levels</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
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>
|
|
1375
1548
|
<li class="tsd-description">
|
|
1376
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>
|
|
1377
1550
|
</div>
|
|
@@ -1379,7 +1552,7 @@ values:</p>
|
|
|
1379
1552
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1380
1553
|
<ul class="tsd-parameter-list">
|
|
1381
1554
|
<li>
|
|
1382
|
-
<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>
|
|
1383
1556
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object or null. It represents the
|
|
1384
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>
|
|
1385
1558
|
</div>
|
|
@@ -1391,12 +1564,12 @@ specifies the property of the <code>BinaryTreeNode</code> object to collect at e
|
|
|
1391
1564
|
values:</p>
|
|
1392
1565
|
</div>
|
|
1393
1566
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1394
|
-
<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>
|
|
1395
1568
|
|
|
1396
1569
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1397
1570
|
<ul>
|
|
1398
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1399
|
-
<li class="tsd-signature tsd-anchor-link" id="listLevels.listLevels-4"><span class="tsd-kind-call-signature">list<wbr/>Levels</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><
|
|
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>
|
|
1400
1573
|
<li class="tsd-description">
|
|
1401
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>
|
|
1402
1575
|
</div>
|
|
@@ -1404,7 +1577,7 @@ values:</p>
|
|
|
1404
1577
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1405
1578
|
<ul class="tsd-parameter-list">
|
|
1406
1579
|
<li>
|
|
1407
|
-
<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>
|
|
1408
1581
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object or null. It represents the
|
|
1409
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>
|
|
1410
1583
|
</div>
|
|
@@ -1416,11 +1589,11 @@ specifies the property of the <code>BinaryTreeNode</code> object to collect at e
|
|
|
1416
1589
|
values:</p>
|
|
1417
1590
|
</div>
|
|
1418
1591
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1419
|
-
<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>
|
|
1420
1593
|
|
|
1421
1594
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1422
1595
|
<ul>
|
|
1423
|
-
<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>
|
|
1424
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>
|
|
1425
1598
|
<li class="tsd-description">
|
|
1426
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>
|
|
@@ -1429,7 +1602,7 @@ values:</p>
|
|
|
1429
1602
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1430
1603
|
<ul class="tsd-parameter-list">
|
|
1431
1604
|
<li>
|
|
1432
|
-
<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>
|
|
1433
1606
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object or null. It represents the
|
|
1434
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>
|
|
1435
1608
|
</div>
|
|
@@ -1441,11 +1614,11 @@ specifies the property of the <code>BinaryTreeNode</code> object to collect at e
|
|
|
1441
1614
|
values:</p>
|
|
1442
1615
|
</div>
|
|
1443
1616
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1444
|
-
<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>
|
|
1445
1618
|
|
|
1446
1619
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1447
1620
|
<ul>
|
|
1448
|
-
<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>
|
|
1449
1622
|
<section class="tsd-panel tsd-member"><a id="morris" class="tsd-anchor"></a>
|
|
1450
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>
|
|
1451
1624
|
<ul class="tsd-signatures">
|
|
@@ -1456,11 +1629,11 @@ traversal algorithm and returns the results based on the specified property name
|
|
|
1456
1629
|
The time complexity of Morris traversal is O(n), it's may slower than others
|
|
1457
1630
|
The space complexity Morris traversal is O(1) because no using stack</p>
|
|
1458
1631
|
</div>
|
|
1459
|
-
<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>
|
|
1460
1633
|
|
|
1461
1634
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1462
1635
|
<ul>
|
|
1463
|
-
<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>
|
|
1464
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>
|
|
1465
1638
|
<li class="tsd-description">
|
|
1466
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
|
|
@@ -1484,12 +1657,12 @@ property of the nodes that you want to retrieve in the results. It can be either
|
|
|
1484
1657
|
property. If not provided, it defaults to <code>'id'</code>.</p>
|
|
1485
1658
|
</div>
|
|
1486
1659
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1487
|
-
<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>
|
|
1488
1661
|
|
|
1489
1662
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1490
1663
|
<ul>
|
|
1491
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1492
|
-
<li class="tsd-signature tsd-anchor-link" id="morris.morris-3"><span class="tsd-kind-call-signature">morris</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
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>
|
|
1493
1666
|
<li class="tsd-description">
|
|
1494
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
|
|
1495
1668
|
traversal algorithm and returns the results based on the specified property name.
|
|
@@ -1512,12 +1685,12 @@ property of the nodes that you want to retrieve in the results. It can be either
|
|
|
1512
1685
|
property. If not provided, it defaults to <code>'id'</code>.</p>
|
|
1513
1686
|
</div>
|
|
1514
1687
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1515
|
-
<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>
|
|
1516
1689
|
|
|
1517
1690
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1518
1691
|
<ul>
|
|
1519
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1520
|
-
<li class="tsd-signature tsd-anchor-link" id="morris.morris-4"><span class="tsd-kind-call-signature">morris</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><
|
|
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>
|
|
1521
1694
|
<li class="tsd-description">
|
|
1522
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
|
|
1523
1696
|
traversal algorithm and returns the results based on the specified property name.
|
|
@@ -1540,11 +1713,11 @@ property of the nodes that you want to retrieve in the results. It can be either
|
|
|
1540
1713
|
property. If not provided, it defaults to <code>'id'</code>.</p>
|
|
1541
1714
|
</div>
|
|
1542
1715
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1543
|
-
<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>
|
|
1544
1717
|
|
|
1545
1718
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1546
1719
|
<ul>
|
|
1547
|
-
<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>
|
|
1548
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>
|
|
1549
1722
|
<li class="tsd-description">
|
|
1550
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
|
|
@@ -1568,15 +1741,15 @@ property of the nodes that you want to retrieve in the results. It can be either
|
|
|
1568
1741
|
property. If not provided, it defaults to <code>'id'</code>.</p>
|
|
1569
1742
|
</div>
|
|
1570
1743
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1571
|
-
<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>
|
|
1572
1745
|
|
|
1573
1746
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1574
1747
|
<ul>
|
|
1575
|
-
<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>
|
|
1576
1749
|
<section class="tsd-panel tsd-member"><a id="remove" class="tsd-anchor"></a>
|
|
1577
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>
|
|
1578
1751
|
<ul class="tsd-signatures">
|
|
1579
|
-
<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>
|
|
1580
1753
|
<li class="tsd-description">
|
|
1581
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>
|
|
1582
1755
|
</div>
|
|
@@ -1596,13 +1769,26 @@ whether to ignore the count of the node being removed. If <code>ignoreCount</cod
|
|
|
1596
1769
|
not be decremented and the overall count of the binary tree will not be updated. If `</p>
|
|
1597
1770
|
</div>
|
|
1598
1771
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1599
|
-
<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
|
|
1600
1773
|
"needBalanced". The "deleted" property contains the deleted node or undefined if no node was deleted. The
|
|
1601
1774
|
"needBalanced" property is always null.</p>
|
|
1602
1775
|
|
|
1603
1776
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1604
1777
|
<ul>
|
|
1605
|
-
<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>
|
|
1779
|
+
<section class="tsd-panel tsd-member tsd-is-protected"><a id="setVisitedCount" class="tsd-anchor"></a>
|
|
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>
|
|
1781
|
+
<ul class="tsd-signatures tsd-is-protected">
|
|
1782
|
+
<li class="tsd-signature tsd-anchor-link" id="setVisitedCount.setVisitedCount-1"><span class="tsd-kind-call-signature">set<wbr/>Visited<wbr/>Count</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#setVisitedCount.setVisitedCount-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1783
|
+
<li class="tsd-description">
|
|
1784
|
+
<div class="tsd-parameters">
|
|
1785
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1786
|
+
<ul class="tsd-parameter-list">
|
|
1787
|
+
<li>
|
|
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>
|
|
1789
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
1790
|
+
<ul>
|
|
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>
|
|
1606
1792
|
<section class="tsd-panel tsd-member"><a id="subTreeAdd" class="tsd-anchor"></a>
|
|
1607
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>
|
|
1608
1794
|
<ul class="tsd-signatures">
|
|
@@ -1614,7 +1800,7 @@ not be decremented and the overall count of the binary tree will not be updated.
|
|
|
1614
1800
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1615
1801
|
<ul class="tsd-parameter-list">
|
|
1616
1802
|
<li>
|
|
1617
|
-
<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>
|
|
1618
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>
|
|
1619
1805
|
</div>
|
|
1620
1806
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
@@ -1634,7 +1820,7 @@ specifies the property of the <code>BinaryTreeNode</code> that should be modifie
|
|
|
1634
1820
|
|
|
1635
1821
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1636
1822
|
<ul>
|
|
1637
|
-
<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>
|
|
1638
1824
|
<section class="tsd-panel tsd-member"><a id="subTreeSum" class="tsd-anchor"></a>
|
|
1639
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>
|
|
1640
1826
|
<ul class="tsd-signatures">
|
|
@@ -1647,7 +1833,7 @@ iteratively.</p>
|
|
|
1647
1833
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1648
1834
|
<ul class="tsd-parameter-list">
|
|
1649
1835
|
<li>
|
|
1650
|
-
<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>
|
|
1651
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
|
|
1652
1838
|
sum.</p>
|
|
1653
1839
|
</div>
|
|
@@ -1663,7 +1849,7 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
1663
1849
|
|
|
1664
1850
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1665
1851
|
<ul>
|
|
1666
|
-
<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>
|
|
1667
1853
|
<div class="col-sidebar">
|
|
1668
1854
|
<div class="page-menu">
|
|
1669
1855
|
<div class="tsd-navigation settings">
|
|
@@ -1685,35 +1871,54 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
1685
1871
|
<ul>
|
|
1686
1872
|
<li><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-512"></use></svg><span>constructor</span></a></li>
|
|
1687
1873
|
<li><a href="#_autoIncrementId" class="tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_auto<wbr/>Increment<wbr/>Id</span></a></li>
|
|
1688
|
-
<li><a href="#_count" class="tsd-is-
|
|
1874
|
+
<li><a href="#_count" class="tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_count</span></a></li>
|
|
1689
1875
|
<li><a href="#_isDuplicatedVal" class="tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_is<wbr/>Duplicated<wbr/>Val</span></a></li>
|
|
1690
|
-
<li><a href="#_loopType" class="tsd-is-
|
|
1876
|
+
<li><a href="#_loopType" class="tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_loop<wbr/>Type</span></a></li>
|
|
1691
1877
|
<li><a href="#_maxId" class="tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_max<wbr/>Id</span></a></li>
|
|
1692
|
-
<li><a href="#_root" class="tsd-is-
|
|
1693
|
-
<li><a href="#_size" class="tsd-is-
|
|
1694
|
-
<li><a href="#_visitedCount" class="tsd-is-
|
|
1695
|
-
<li><a href="#_visitedId" class="tsd-is-
|
|
1696
|
-
<li><a href="#_visitedLeftSum" class="tsd-is-
|
|
1697
|
-
<li><a href="#_visitedNode" class="tsd-is-
|
|
1698
|
-
<li><a href="#_visitedVal" class="tsd-is-
|
|
1878
|
+
<li><a href="#_root" class="tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_root</span></a></li>
|
|
1879
|
+
<li><a href="#_size" class="tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_size</span></a></li>
|
|
1880
|
+
<li><a href="#_visitedCount" class="tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_visited<wbr/>Count</span></a></li>
|
|
1881
|
+
<li><a href="#_visitedId" class="tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_visited<wbr/>Id</span></a></li>
|
|
1882
|
+
<li><a href="#_visitedLeftSum" class="tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_visited<wbr/>Left<wbr/>Sum</span></a></li>
|
|
1883
|
+
<li><a href="#_visitedNode" class="tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_visited<wbr/>Node</span></a></li>
|
|
1884
|
+
<li><a href="#_visitedVal" class="tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_visited<wbr/>Val</span></a></li>
|
|
1885
|
+
<li><a href="#autoIncrementId" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>auto<wbr/>Increment<wbr/>Id</span></a></li>
|
|
1699
1886
|
<li><a href="#count" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>count</span></a></li>
|
|
1887
|
+
<li><a href="#isDuplicatedVal" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>is<wbr/>Duplicated<wbr/>Val</span></a></li>
|
|
1888
|
+
<li><a href="#loopType" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>loop<wbr/>Type</span></a></li>
|
|
1889
|
+
<li><a href="#maxId" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>max<wbr/>Id</span></a></li>
|
|
1700
1890
|
<li><a href="#root" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>root</span></a></li>
|
|
1701
1891
|
<li><a href="#size" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>size</span></a></li>
|
|
1892
|
+
<li><a href="#visitedCount" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>visited<wbr/>Count</span></a></li>
|
|
1893
|
+
<li><a href="#visitedId" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>visited<wbr/>Id</span></a></li>
|
|
1894
|
+
<li><a href="#visitedLeftSum" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>visited<wbr/>Left<wbr/>Sum</span></a></li>
|
|
1895
|
+
<li><a href="#visitedNode" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>visited<wbr/>Node</span></a></li>
|
|
1896
|
+
<li><a href="#visitedVal" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>visited<wbr/>Val</span></a></li>
|
|
1702
1897
|
<li><a href="#BFS" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>BFS</span></a></li>
|
|
1703
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>
|
|
1704
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>
|
|
1705
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>
|
|
1706
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>
|
|
1707
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>
|
|
1708
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>
|
|
1905
|
+
<li><a href="#_setAutoIncrementId" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_set<wbr/>Auto<wbr/>Increment<wbr/>Id</span></a></li>
|
|
1906
|
+
<li><a href="#_setCount" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_set<wbr/>Count</span></a></li>
|
|
1907
|
+
<li><a href="#_setIsDuplicatedVal" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_set<wbr/>Is<wbr/>Duplicated<wbr/>Val</span></a></li>
|
|
1908
|
+
<li><a href="#_setLoopType" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_set<wbr/>Loop<wbr/>Type</span></a></li>
|
|
1909
|
+
<li><a href="#_setMaxId" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_set<wbr/>Max<wbr/>Id</span></a></li>
|
|
1910
|
+
<li><a href="#_setRoot" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_set<wbr/>Root</span></a></li>
|
|
1911
|
+
<li><a href="#_setSize" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_set<wbr/>Size</span></a></li>
|
|
1912
|
+
<li><a href="#_setVisitedId" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_set<wbr/>Visited<wbr/>Id</span></a></li>
|
|
1913
|
+
<li><a href="#_setVisitedLeftSum" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_set<wbr/>Visited<wbr/>Left<wbr/>Sum</span></a></li>
|
|
1914
|
+
<li><a href="#_setVisitedNode" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_set<wbr/>Visited<wbr/>Node</span></a></li>
|
|
1915
|
+
<li><a href="#_setVisitedVal" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_set<wbr/>Visited<wbr/>Val</span></a></li>
|
|
1709
1916
|
<li><a href="#add" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>add</span></a></li>
|
|
1710
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>
|
|
1711
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>
|
|
1712
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>
|
|
1713
|
-
<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>
|
|
1714
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>
|
|
1715
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>
|
|
1716
|
-
<li><a href="#getCount" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Count</span></a></li>
|
|
1717
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>
|
|
1718
1923
|
<li><a href="#getHeight" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Height</span></a></li>
|
|
1719
1924
|
<li><a href="#getLeftMost" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Left<wbr/>Most</span></a></li>
|
|
@@ -1722,8 +1927,6 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
1722
1927
|
<li><a href="#getPathToRoot" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Path<wbr/>To<wbr/>Root</span></a></li>
|
|
1723
1928
|
<li><a href="#getPredecessor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Predecessor</span></a></li>
|
|
1724
1929
|
<li><a href="#getRightMost" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Right<wbr/>Most</span></a></li>
|
|
1725
|
-
<li><a href="#getRoot" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Root</span></a></li>
|
|
1726
|
-
<li><a href="#getSize" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Size</span></a></li>
|
|
1727
1930
|
<li><a href="#getSubTreeSizeAndCount" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Sub<wbr/>Tree<wbr/>Size<wbr/>And<wbr/>Count</span></a></li>
|
|
1728
1931
|
<li><a href="#has" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>has</span></a></li>
|
|
1729
1932
|
<li><a href="#isBST" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>isBST</span></a></li>
|
|
@@ -1733,6 +1936,7 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
1733
1936
|
<li><a href="#listLevels" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>list<wbr/>Levels</span></a></li>
|
|
1734
1937
|
<li><a href="#morris" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>morris</span></a></li>
|
|
1735
1938
|
<li><a href="#remove" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>remove</span></a></li>
|
|
1939
|
+
<li><a href="#setVisitedCount" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>set<wbr/>Visited<wbr/>Count</span></a></li>
|
|
1736
1940
|
<li><a href="#subTreeAdd" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>sub<wbr/>Tree<wbr/>Add</span></a></li>
|
|
1737
1941
|
<li><a href="#subTreeSum" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>sub<wbr/>Tree<wbr/>Sum</span></a></li></ul></div></details></div>
|
|
1738
1942
|
<div class="site-menu">
|
|
@@ -1741,6 +1945,7 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
1741
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>
|
|
1742
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>
|
|
1743
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>
|
|
1744
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>
|
|
1745
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>
|
|
1746
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>
|
|
@@ -1763,6 +1968,7 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
1763
1968
|
<li><a href="DirectedVertex.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Directed<wbr/>Vertex</span></a></li>
|
|
1764
1969
|
<li><a href="DoublyLinkedList.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Doubly<wbr/>Linked<wbr/>List</span></a></li>
|
|
1765
1970
|
<li><a href="DoublyLinkedListNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Doubly<wbr/>Linked<wbr/>List<wbr/>Node</span></a></li>
|
|
1971
|
+
<li><a href="HashTable.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Hash<wbr/>Table</span></a></li>
|
|
1766
1972
|
<li><a href="Heap.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Heap</span></a></li>
|
|
1767
1973
|
<li><a href="HeapItem.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Heap<wbr/>Item</span></a></li>
|
|
1768
1974
|
<li><a href="Matrix2D.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Matrix2D</span></a></li>
|
|
@@ -1773,9 +1979,9 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
1773
1979
|
<li><a href="MinPriorityQueue.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Min<wbr/>Priority<wbr/>Queue</span></a></li>
|
|
1774
1980
|
<li><a href="Navigator.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Navigator</span></a></li>
|
|
1775
1981
|
<li><a href="ObjectDeque.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Object<wbr/>Deque</span></a></li>
|
|
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>
|
|
1776
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>
|
|
1777
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>
|
|
1778
|
-
<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>
|
|
1779
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>
|
|
1780
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>
|
|
1781
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>
|
|
@@ -1783,8 +1989,10 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
1783
1989
|
<li><a href="SkipLinkedList.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Skip<wbr/>Linked<wbr/>List</span></a></li>
|
|
1784
1990
|
<li><a href="SplayTree.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Splay<wbr/>Tree</span></a></li>
|
|
1785
1991
|
<li><a href="Stack.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Stack</span></a></li>
|
|
1992
|
+
<li><a href="TreeMap.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Tree<wbr/>Map</span></a></li>
|
|
1786
1993
|
<li><a href="TreeMultiSet.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Tree<wbr/>Multi<wbr/>Set</span></a></li>
|
|
1787
1994
|
<li><a href="TreeNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Tree<wbr/>Node</span></a></li>
|
|
1995
|
+
<li><a href="TreeSet.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Tree<wbr/>Set</span></a></li>
|
|
1788
1996
|
<li><a href="Trie.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Trie</span></a></li>
|
|
1789
1997
|
<li><a href="TrieNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Trie<wbr/>Node</span></a></li>
|
|
1790
1998
|
<li><a href="TwoThreeTree.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Two<wbr/>Three<wbr/>Tree</span></a></li>
|
|
@@ -1792,13 +2000,13 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
1792
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>
|
|
1793
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>
|
|
1794
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>
|
|
1795
|
-
<li><a href="../interfaces/
|
|
1796
|
-
<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>
|
|
1797
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>
|
|
1798
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>
|
|
1799
|
-
<li><a href="../interfaces/
|
|
1800
|
-
<li><a href="../
|
|
1801
|
-
<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>
|
|
1802
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>
|
|
1803
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>
|
|
1804
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>
|
|
@@ -1806,20 +2014,21 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
1806
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>
|
|
1807
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>
|
|
1808
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>
|
|
1809
|
-
<li><a href="../types/
|
|
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>
|
|
1810
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>
|
|
1811
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>
|
|
1812
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>
|
|
1813
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>
|
|
1814
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>
|
|
1815
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>
|
|
1816
|
-
<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>
|
|
1817
|
-
<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>
|
|
1818
|
-
<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>
|
|
1819
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>
|
|
1820
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>
|
|
1821
|
-
<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>
|
|
1822
|
-
<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>
|
|
1823
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>
|
|
1824
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>
|
|
1825
2034
|
<div class="tsd-generator">
|