data-structure-typed 1.18.0 → 1.18.6
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/abstract-binary-tree.d.ts +333 -0
- package/dist/data-structures/binary-tree/abstract-binary-tree.js +1455 -0
- package/dist/data-structures/binary-tree/avl-tree.d.ts +20 -25
- package/dist/data-structures/binary-tree/avl-tree.js +10 -18
- package/dist/data-structures/binary-tree/binary-tree.d.ts +18 -345
- package/dist/data-structures/binary-tree/binary-tree.js +39 -1444
- package/dist/data-structures/binary-tree/bst.d.ts +24 -31
- package/dist/data-structures/binary-tree/bst.js +46 -53
- package/dist/data-structures/binary-tree/index.d.ts +1 -0
- package/dist/data-structures/binary-tree/index.js +1 -0
- package/dist/data-structures/binary-tree/rb-tree.d.ts +1 -2
- package/dist/data-structures/binary-tree/rb-tree.js +64 -5
- package/dist/data-structures/binary-tree/tree-multiset.d.ts +11 -25
- package/dist/data-structures/binary-tree/tree-multiset.js +29 -31
- package/dist/data-structures/graph/abstract-graph.d.ts +56 -58
- package/dist/data-structures/graph/abstract-graph.js +84 -68
- package/dist/data-structures/graph/directed-graph.d.ts +124 -95
- package/dist/data-structures/graph/directed-graph.js +156 -108
- package/dist/data-structures/graph/undirected-graph.d.ts +83 -58
- package/dist/data-structures/graph/undirected-graph.js +98 -71
- package/dist/data-structures/hash/coordinate-set.d.ts +1 -1
- package/dist/data-structures/index.d.ts +1 -0
- package/dist/data-structures/index.js +1 -0
- package/dist/data-structures/interfaces/abstract-graph.d.ts +22 -0
- package/dist/data-structures/interfaces/abstract-graph.js +2 -0
- package/dist/data-structures/interfaces/avl-tree.d.ts +1 -0
- package/dist/data-structures/interfaces/avl-tree.js +2 -0
- package/dist/data-structures/interfaces/binary-tree.d.ts +26 -0
- package/dist/data-structures/interfaces/binary-tree.js +2 -0
- package/dist/data-structures/interfaces/bst.d.ts +1 -0
- package/dist/data-structures/interfaces/bst.js +2 -0
- package/dist/data-structures/interfaces/directed-graph.d.ts +9 -0
- package/dist/data-structures/interfaces/directed-graph.js +2 -0
- package/dist/data-structures/interfaces/doubly-linked-list.d.ts +1 -0
- package/dist/data-structures/interfaces/doubly-linked-list.js +2 -0
- package/dist/data-structures/interfaces/heap.d.ts +1 -0
- package/dist/data-structures/interfaces/heap.js +2 -0
- package/dist/data-structures/interfaces/index.d.ts +13 -0
- package/dist/data-structures/interfaces/index.js +29 -0
- package/dist/data-structures/interfaces/navigator.d.ts +1 -0
- package/dist/data-structures/interfaces/navigator.js +2 -0
- package/dist/data-structures/interfaces/priority-queue.d.ts +1 -0
- package/dist/data-structures/interfaces/priority-queue.js +2 -0
- package/dist/data-structures/interfaces/segment-tree.d.ts +1 -0
- package/dist/data-structures/interfaces/segment-tree.js +2 -0
- package/dist/data-structures/interfaces/singly-linked-list.d.ts +1 -0
- package/dist/data-structures/interfaces/singly-linked-list.js +2 -0
- package/dist/data-structures/interfaces/tree-multiset.d.ts +1 -0
- package/dist/data-structures/interfaces/tree-multiset.js +2 -0
- package/dist/data-structures/interfaces/undirected-graph.d.ts +2 -0
- package/dist/data-structures/interfaces/undirected-graph.js +2 -0
- package/dist/data-structures/linked-list/doubly-linked-list.d.ts +1 -1
- package/dist/data-structures/linked-list/singly-linked-list.d.ts +1 -1
- package/dist/data-structures/priority-queue/priority-queue.d.ts +1 -1
- package/dist/data-structures/priority-queue/priority-queue.js +4 -4
- package/dist/data-structures/queue/deque.d.ts +5 -5
- package/dist/data-structures/queue/deque.js +6 -6
- package/dist/data-structures/queue/queue.d.ts +1 -1
- package/dist/data-structures/stack/stack.d.ts +1 -1
- package/dist/data-structures/types/abstract-binary-tree.d.ts +32 -0
- package/dist/data-structures/types/abstract-binary-tree.js +21 -0
- package/dist/data-structures/types/abstract-graph.d.ts +1 -20
- package/dist/data-structures/types/avl-tree.d.ts +3 -4
- package/dist/data-structures/types/binary-tree.d.ts +3 -10
- package/dist/data-structures/types/bst.d.ts +10 -4
- package/dist/data-structures/types/bst.js +7 -0
- package/dist/data-structures/types/directed-graph.d.ts +5 -9
- package/dist/data-structures/types/directed-graph.js +7 -0
- package/dist/data-structures/types/heap.d.ts +2 -2
- package/dist/data-structures/types/helpers.d.ts +8 -0
- package/dist/data-structures/types/helpers.js +2 -0
- package/dist/data-structures/types/index.d.ts +3 -1
- package/dist/data-structures/types/index.js +3 -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/rb-tree.d.ts +6 -0
- package/dist/data-structures/types/rb-tree.js +8 -0
- package/dist/data-structures/types/tree-multiset.d.ts +5 -4
- package/docs/assets/search.js +1 -1
- package/docs/classes/AVLTree.html +310 -309
- package/docs/classes/AVLTreeNode.html +122 -68
- package/docs/classes/AaTree.html +30 -17
- package/docs/classes/AbstractBinaryTree.html +2023 -0
- package/docs/classes/AbstractBinaryTreeNode.html +491 -0
- package/docs/classes/AbstractEdge.html +84 -39
- package/docs/classes/AbstractGraph.html +235 -119
- package/docs/classes/AbstractVertex.html +87 -35
- package/docs/classes/ArrayDeque.html +43 -30
- package/docs/classes/BST.html +297 -285
- package/docs/classes/BSTNode.html +123 -62
- package/docs/classes/BTree.html +30 -17
- package/docs/classes/BinaryIndexedTree.html +38 -25
- package/docs/classes/BinaryTree.html +596 -589
- package/docs/classes/BinaryTreeNode.html +181 -161
- package/docs/classes/Character.html +33 -20
- package/docs/classes/CoordinateMap.html +38 -25
- package/docs/classes/CoordinateSet.html +39 -26
- package/docs/classes/Deque.html +63 -50
- package/docs/classes/DirectedEdge.html +90 -46
- package/docs/classes/DirectedGraph.html +374 -212
- package/docs/classes/DirectedVertex.html +79 -41
- package/docs/classes/DoublyLinkedList.html +68 -55
- package/docs/classes/DoublyLinkedListNode.html +40 -27
- package/docs/classes/HashTable.html +30 -17
- package/docs/classes/Heap.html +45 -32
- package/docs/classes/HeapItem.html +37 -24
- package/docs/classes/Matrix2D.html +45 -32
- package/docs/classes/MatrixNTI2D.html +33 -20
- package/docs/classes/MaxHeap.html +45 -32
- package/docs/classes/MaxPriorityQueue.html +83 -65
- package/docs/classes/MinHeap.html +45 -32
- package/docs/classes/MinPriorityQueue.html +83 -65
- package/docs/classes/Navigator.html +40 -27
- package/docs/classes/ObjectDeque.html +78 -55
- package/docs/classes/Pair.html +30 -17
- package/docs/classes/PriorityQueue.html +78 -60
- package/docs/classes/Queue.html +45 -32
- package/docs/classes/SegmentTree.html +46 -33
- package/docs/classes/SegmentTreeNode.html +49 -36
- package/docs/classes/SinglyLinkedList.html +65 -52
- package/docs/classes/SinglyLinkedListNode.html +37 -24
- package/docs/classes/SkipLinkedList.html +30 -17
- package/docs/classes/SplayTree.html +30 -17
- package/docs/classes/Stack.html +43 -30
- package/docs/classes/TreeMap.html +30 -17
- package/docs/classes/TreeMultiSet.html +330 -316
- package/docs/classes/TreeMultiSetNode.html +450 -0
- package/docs/classes/TreeNode.html +45 -32
- package/docs/classes/TreeSet.html +30 -17
- package/docs/classes/Trie.html +42 -29
- package/docs/classes/TrieNode.html +40 -27
- package/docs/classes/TwoThreeTree.html +30 -17
- package/docs/classes/UndirectedEdge.html +86 -56
- package/docs/classes/UndirectedGraph.html +286 -165
- package/docs/classes/UndirectedVertex.html +79 -41
- package/docs/classes/Vector2D.html +57 -44
- package/docs/enums/CP.html +36 -23
- package/docs/enums/FamilyPosition.html +48 -35
- package/docs/enums/LoopType.html +42 -29
- package/docs/{interfaces/PriorityQueueOptions.html → enums/RBColor.html} +52 -55
- package/docs/{interfaces/AVLTreeDeleted.html → enums/TopologicalProperty.html} +59 -48
- package/docs/index.html +211 -73
- package/docs/interfaces/{NavigatorParams.html → IBinaryTree.html} +56 -67
- package/docs/interfaces/IBinaryTreeNode.html +396 -0
- package/docs/interfaces/IDirectedGraph.html +36 -23
- package/docs/interfaces/IGraph.html +134 -93
- package/docs/interfaces/{HeapOptions.html → IUNDirectedGraph.html} +38 -57
- package/docs/modules.html +57 -31
- package/docs/types/{ToThunkFn.html → AVLTreeOptions.html} +35 -27
- package/docs/types/AbstractBinaryTreeOptions.html +150 -0
- package/docs/types/AbstractRecursiveBinaryTreeNode.html +146 -0
- package/docs/types/{ResultsByProperty.html → AbstractResultByProperty.html} +35 -22
- package/docs/types/{TreeMultiSetDeletedResult.html → AbstractResultsByProperty.html} +35 -29
- package/docs/types/BSTComparator.html +30 -17
- package/docs/types/{TrlAsyncFn.html → BSTOptions.html} +36 -31
- package/docs/types/BinaryTreeDeletedResult.html +153 -0
- package/docs/types/BinaryTreeNodeId.html +30 -17
- package/docs/types/BinaryTreeNodePropertyName.html +30 -17
- package/docs/types/{BinaryTreeDeleted.html → BinaryTreeOptions.html} +35 -31
- package/docs/types/DFSOrderPattern.html +30 -17
- package/docs/types/DijkstraResult.html +30 -17
- package/docs/types/Direction.html +30 -17
- package/docs/types/{SpecifyOptional.html → EdgeId.html} +34 -28
- package/docs/types/{TrlFn.html → HeapOptions.html} +45 -24
- package/docs/types/IdObject.html +151 -0
- package/docs/types/{BSTDeletedResult.html → KeyValObject.html} +36 -30
- package/docs/types/NavigatorParams.html +175 -0
- package/docs/types/NodeOrPropertyName.html +30 -17
- package/docs/types/PriorityQueueComparator.html +30 -17
- package/docs/types/PriorityQueueDFSOrderPattern.html +30 -17
- package/docs/types/PriorityQueueOptions.html +155 -0
- package/docs/types/{Thunk.html → RBTreeOptions.html} +35 -27
- package/docs/types/RecursiveAVLTreeNode.html +146 -0
- package/docs/types/RecursiveBSTNode.html +146 -0
- package/docs/types/RecursiveBinaryTreeNode.html +146 -0
- package/docs/types/RecursiveTreeMultiSetNode.html +146 -0
- package/docs/types/SegmentTreeNodeVal.html +30 -17
- package/docs/types/TopologicalStatus.html +30 -17
- package/docs/types/TreeMultiSetOptions.html +146 -0
- package/docs/types/Turning.html +30 -17
- package/docs/types/VertexId.html +30 -17
- package/notes/note.md +8 -1
- package/package.json +10 -2
- package/docs/classes/RBTree.html +0 -153
- package/docs/types/ResultByProperty.html +0 -133
package/docs/classes/BST.html
CHANGED
|
@@ -14,23 +14,27 @@
|
|
|
14
14
|
<ul class="tsd-breadcrumb">
|
|
15
15
|
<li><a href="../modules.html">data-structure-typed</a></li>
|
|
16
16
|
<li><a href="BST.html">BST</a></li></ul>
|
|
17
|
-
<h1>Class BST<
|
|
17
|
+
<h1>Class BST<N></h1></div>
|
|
18
18
|
<section class="tsd-panel">
|
|
19
19
|
<h4>Type Parameters</h4>
|
|
20
20
|
<ul class="tsd-type-parameter-list">
|
|
21
21
|
<li>
|
|
22
|
-
<h4><span class="tsd-kind-type-parameter">
|
|
22
|
+
<h4><span class="tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol"> extends </span><a href="BSTNode.html" class="tsd-signature-type tsd-kind-class">BSTNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">></span> = <a href="BSTNode.html" class="tsd-signature-type tsd-kind-class">BSTNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span></h4></li></ul></section>
|
|
23
23
|
<section class="tsd-panel tsd-hierarchy">
|
|
24
24
|
<h4>Hierarchy</h4>
|
|
25
25
|
<ul class="tsd-hierarchy">
|
|
26
|
-
<li><a href="BinaryTree.html" class="tsd-signature-type tsd-kind-class">BinaryTree</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
26
|
+
<li><a href="BinaryTree.html" class="tsd-signature-type tsd-kind-class">BinaryTree</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">></span>
|
|
27
27
|
<ul class="tsd-hierarchy">
|
|
28
28
|
<li><span class="target">BST</span>
|
|
29
29
|
<ul class="tsd-hierarchy">
|
|
30
30
|
<li><a href="AVLTree.html" class="tsd-signature-type tsd-kind-class">AVLTree</a></li>
|
|
31
|
-
<li><a href="TreeMultiSet.html" class="tsd-signature-type tsd-kind-class">TreeMultiSet</a></li></ul></li></ul></li></ul></section
|
|
31
|
+
<li><a href="TreeMultiSet.html" class="tsd-signature-type tsd-kind-class">TreeMultiSet</a></li></ul></li></ul></li></ul></section>
|
|
32
|
+
<section class="tsd-panel">
|
|
33
|
+
<h4>Implements</h4>
|
|
34
|
+
<ul class="tsd-hierarchy">
|
|
35
|
+
<li><a href="../interfaces/IBinaryTree.html" class="tsd-signature-type tsd-kind-interface">IBinaryTree</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">></span></li></ul></section><aside class="tsd-sources">
|
|
32
36
|
<ul>
|
|
33
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
37
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/bst.ts#L17">src/data-structures/binary-tree/bst.ts:17</a></li></ul></aside>
|
|
34
38
|
<section class="tsd-panel-group tsd-index-group">
|
|
35
39
|
<section class="tsd-panel tsd-index-panel">
|
|
36
40
|
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
|
|
@@ -66,6 +70,7 @@
|
|
|
66
70
|
<a href="BST.html#DFSIterative" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>DFSIterative</span></a>
|
|
67
71
|
<a href="BST.html#_accumulatedByPropertyName" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_accumulated<wbr/>By<wbr/>Property<wbr/>Name</span></a>
|
|
68
72
|
<a href="BST.html#_compare" class="tsd-index-link tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_compare</span></a>
|
|
73
|
+
<a href="BST.html#_createNode" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_create<wbr/>Node</span></a>
|
|
69
74
|
<a href="BST.html#_getResultByPropertyName" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_get<wbr/>Result<wbr/>By<wbr/>Property<wbr/>Name</span></a>
|
|
70
75
|
<a href="BST.html#_pushByPropertyNameStopOrNot" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_push<wbr/>By<wbr/>Property<wbr/>Name<wbr/>Stop<wbr/>Or<wbr/>Not</span></a>
|
|
71
76
|
<a href="BST.html#_resetResults" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_reset<wbr/>Results</span></a>
|
|
@@ -86,7 +91,6 @@
|
|
|
86
91
|
<a href="BST.html#allGreaterNodesAdd" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>all<wbr/>Greater<wbr/>Nodes<wbr/>Add</span></a>
|
|
87
92
|
<a href="BST.html#balance" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>balance</span></a>
|
|
88
93
|
<a href="BST.html#clear" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>clear</span></a>
|
|
89
|
-
<a href="BST.html#createNode" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>create<wbr/>Node</span></a>
|
|
90
94
|
<a href="BST.html#fill" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>fill</span></a>
|
|
91
95
|
<a href="BST.html#get" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get</span></a>
|
|
92
96
|
<a href="BST.html#getDepth" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Depth</span></a>
|
|
@@ -118,7 +122,7 @@
|
|
|
118
122
|
<section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a>
|
|
119
123
|
<h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><g stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" id="icon-anchor"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></g></svg></a></h3>
|
|
120
124
|
<ul class="tsd-signatures">
|
|
121
|
-
<li class="tsd-signature tsd-anchor-link" id="constructor.new_BST"><span class="tsd-kind-constructor-signature">new BST</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
125
|
+
<li class="tsd-signature tsd-anchor-link" id="constructor.new_BST"><span class="tsd-kind-constructor-signature">new BST</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="BST.html" class="tsd-signature-type tsd-kind-class">BST</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">></span><a href="#constructor.new_BST" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
122
126
|
<li class="tsd-description">
|
|
123
127
|
<div class="tsd-comment tsd-typography"><p>The constructor function accepts an optional options object and sets the comparator property if provided.</p>
|
|
124
128
|
</div>
|
|
@@ -126,32 +130,27 @@
|
|
|
126
130
|
<h4>Type Parameters</h4>
|
|
127
131
|
<ul class="tsd-type-parameter-list">
|
|
128
132
|
<li>
|
|
129
|
-
<h4><span class="tsd-kind-type-parameter">
|
|
133
|
+
<h4><span class="tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol"> extends </span><a href="BSTNode.html" class="tsd-signature-type tsd-kind-class">BSTNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">></span> = <a href="BSTNode.html" class="tsd-signature-type tsd-kind-class">BSTNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span><a href="../types/RecursiveBSTNode.html" class="tsd-signature-type tsd-kind-type-alias">RecursiveBSTNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span></h4></li></ul></section>
|
|
130
134
|
<div class="tsd-parameters">
|
|
131
135
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
132
136
|
<ul class="tsd-parameter-list">
|
|
133
137
|
<li>
|
|
134
|
-
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <
|
|
138
|
+
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <a href="../types/BSTOptions.html" class="tsd-signature-type tsd-kind-type-alias">BSTOptions</a></h5>
|
|
135
139
|
<div class="tsd-comment tsd-typography"><p>An optional object that can contain the following properties:</p>
|
|
136
140
|
</div>
|
|
137
|
-
<div class="tsd-comment tsd-typography"></div>
|
|
138
|
-
<
|
|
139
|
-
<li class="tsd-parameter">
|
|
140
|
-
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-property">comparator</span><span class="tsd-signature-symbol">?: </span><a href="../types/BSTComparator.html" class="tsd-signature-type tsd-kind-type-alias">BSTComparator</a></h5></li>
|
|
141
|
-
<li class="tsd-parameter">
|
|
142
|
-
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-property">loop<wbr/>Type</span><span class="tsd-signature-symbol">?: </span><a href="../enums/LoopType.html" class="tsd-signature-type tsd-kind-enum">LoopType</a></h5></li></ul></li></ul></div>
|
|
143
|
-
<h4 class="tsd-returns-title">Returns <a href="BST.html" class="tsd-signature-type tsd-kind-class">BST</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">></span></h4>
|
|
141
|
+
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
142
|
+
<h4 class="tsd-returns-title">Returns <a href="BST.html" class="tsd-signature-type tsd-kind-class">BST</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">></span></h4>
|
|
144
143
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
145
144
|
<p>Overrides <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#constructor">constructor</a></p>
|
|
146
145
|
<ul>
|
|
147
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
146
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/bst.ts#L22">src/data-structures/binary-tree/bst.ts:22</a></li></ul></aside></li></ul></section></section>
|
|
148
147
|
<section class="tsd-panel-group tsd-member-group">
|
|
149
148
|
<h2>Properties</h2>
|
|
150
149
|
<section class="tsd-panel tsd-member tsd-is-protected"><a id="_comparator" class="tsd-anchor"></a>
|
|
151
150
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_comparator</span><a href="#_comparator" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
152
151
|
<div class="tsd-signature"><span class="tsd-kind-property">_comparator</span><span class="tsd-signature-symbol">:</span> <a href="../types/BSTComparator.html" class="tsd-signature-type tsd-kind-type-alias">BSTComparator</a><span class="tsd-signature-symbol"> = ...</span></div><aside class="tsd-sources">
|
|
153
152
|
<ul>
|
|
154
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
153
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/bst.ts#L475">src/data-structures/binary-tree/bst.ts:475</a></li></ul></aside></section></section>
|
|
155
154
|
<section class="tsd-panel-group tsd-member-group">
|
|
156
155
|
<h2>Accessors</h2>
|
|
157
156
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="autoIncrementId" class="tsd-anchor"></a>
|
|
@@ -162,7 +161,7 @@
|
|
|
162
161
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources">
|
|
163
162
|
<p>Inherited from BinaryTree.autoIncrementId</p>
|
|
164
163
|
<ul>
|
|
165
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
164
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L207">src/data-structures/binary-tree/abstract-binary-tree.ts:207</a></li></ul></aside></li></ul></section>
|
|
166
165
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="count" class="tsd-anchor"></a>
|
|
167
166
|
<h3 class="tsd-anchor-link"><span>count</span><a href="#count" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
168
167
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -171,7 +170,7 @@
|
|
|
171
170
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
|
|
172
171
|
<p>Inherited from BinaryTree.count</p>
|
|
173
172
|
<ul>
|
|
174
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
173
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L237">src/data-structures/binary-tree/abstract-binary-tree.ts:237</a></li></ul></aside></li></ul></section>
|
|
175
174
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="isDuplicatedVal" class="tsd-anchor"></a>
|
|
176
175
|
<h3 class="tsd-anchor-link"><span>is<wbr/>Duplicated<wbr/>Val</span><a href="#isDuplicatedVal" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
177
176
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -180,7 +179,7 @@
|
|
|
180
179
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources">
|
|
181
180
|
<p>Inherited from BinaryTree.isDuplicatedVal</p>
|
|
182
181
|
<ul>
|
|
183
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
182
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L219">src/data-structures/binary-tree/abstract-binary-tree.ts:219</a></li></ul></aside></li></ul></section>
|
|
184
183
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="loopType" class="tsd-anchor"></a>
|
|
185
184
|
<h3 class="tsd-anchor-link"><span>loop<wbr/>Type</span><a href="#loopType" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
186
185
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -189,7 +188,7 @@
|
|
|
189
188
|
<h4 class="tsd-returns-title">Returns <a href="../enums/LoopType.html" class="tsd-signature-type tsd-kind-enum">LoopType</a></h4><aside class="tsd-sources">
|
|
190
189
|
<p>Inherited from BinaryTree.loopType</p>
|
|
191
190
|
<ul>
|
|
192
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
191
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L172">src/data-structures/binary-tree/abstract-binary-tree.ts:172</a></li></ul></aside></li></ul></section>
|
|
193
192
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="maxId" class="tsd-anchor"></a>
|
|
194
193
|
<h3 class="tsd-anchor-link"><span>max<wbr/>Id</span><a href="#maxId" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
195
194
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -198,16 +197,16 @@
|
|
|
198
197
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
|
|
199
198
|
<p>Inherited from BinaryTree.maxId</p>
|
|
200
199
|
<ul>
|
|
201
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
200
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L213">src/data-structures/binary-tree/abstract-binary-tree.ts:213</a></li></ul></aside></li></ul></section>
|
|
202
201
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="root" class="tsd-anchor"></a>
|
|
203
202
|
<h3 class="tsd-anchor-link"><span>root</span><a href="#root" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
204
203
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
205
|
-
<li class="tsd-signature" id="root.root-1"><span class="tsd-signature-symbol">get</span> root<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
204
|
+
<li class="tsd-signature" id="root.root-1"><span class="tsd-signature-symbol">get</span> root<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></li>
|
|
206
205
|
<li class="tsd-description">
|
|
207
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
206
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h4><aside class="tsd-sources">
|
|
208
207
|
<p>Inherited from BinaryTree.root</p>
|
|
209
208
|
<ul>
|
|
210
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
209
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L225">src/data-structures/binary-tree/abstract-binary-tree.ts:225</a></li></ul></aside></li></ul></section>
|
|
211
210
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="size" class="tsd-anchor"></a>
|
|
212
211
|
<h3 class="tsd-anchor-link"><span>size</span><a href="#size" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
213
212
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -216,7 +215,7 @@
|
|
|
216
215
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
|
|
217
216
|
<p>Inherited from BinaryTree.size</p>
|
|
218
217
|
<ul>
|
|
219
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
218
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L231">src/data-structures/binary-tree/abstract-binary-tree.ts:231</a></li></ul></aside></li></ul></section>
|
|
220
219
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="visitedCount" class="tsd-anchor"></a>
|
|
221
220
|
<h3 class="tsd-anchor-link"><span>visited<wbr/>Count</span><a href="#visitedCount" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
222
221
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -225,7 +224,7 @@
|
|
|
225
224
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources">
|
|
226
225
|
<p>Inherited from BinaryTree.visitedCount</p>
|
|
227
226
|
<ul>
|
|
228
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
227
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L195">src/data-structures/binary-tree/abstract-binary-tree.ts:195</a></li></ul></aside></li></ul></section>
|
|
229
228
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="visitedId" class="tsd-anchor"></a>
|
|
230
229
|
<h3 class="tsd-anchor-link"><span>visited<wbr/>Id</span><a href="#visitedId" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
231
230
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -234,7 +233,7 @@
|
|
|
234
233
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources">
|
|
235
234
|
<p>Inherited from BinaryTree.visitedId</p>
|
|
236
235
|
<ul>
|
|
237
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
236
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L177">src/data-structures/binary-tree/abstract-binary-tree.ts:177</a></li></ul></aside></li></ul></section>
|
|
238
237
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="visitedLeftSum" class="tsd-anchor"></a>
|
|
239
238
|
<h3 class="tsd-anchor-link"><span>visited<wbr/>Left<wbr/>Sum</span><a href="#visitedLeftSum" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
240
239
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -243,25 +242,25 @@
|
|
|
243
242
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources">
|
|
244
243
|
<p>Inherited from BinaryTree.visitedLeftSum</p>
|
|
245
244
|
<ul>
|
|
246
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
245
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L201">src/data-structures/binary-tree/abstract-binary-tree.ts:201</a></li></ul></aside></li></ul></section>
|
|
247
246
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="visitedNode" class="tsd-anchor"></a>
|
|
248
247
|
<h3 class="tsd-anchor-link"><span>visited<wbr/>Node</span><a href="#visitedNode" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
249
248
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
250
|
-
<li class="tsd-signature" id="visitedNode.visitedNode-1"><span class="tsd-signature-symbol">get</span> visitedNode<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><
|
|
249
|
+
<li class="tsd-signature" id="visitedNode.visitedNode-1"><span class="tsd-signature-symbol">get</span> visitedNode<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></li>
|
|
251
250
|
<li class="tsd-description">
|
|
252
|
-
<h4 class="tsd-returns-title">Returns <
|
|
251
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources">
|
|
253
252
|
<p>Inherited from BinaryTree.visitedNode</p>
|
|
254
253
|
<ul>
|
|
255
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
254
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L189">src/data-structures/binary-tree/abstract-binary-tree.ts:189</a></li></ul></aside></li></ul></section>
|
|
256
255
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="visitedVal" class="tsd-anchor"></a>
|
|
257
256
|
<h3 class="tsd-anchor-link"><span>visited<wbr/>Val</span><a href="#visitedVal" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
258
257
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
259
|
-
<li class="tsd-signature" id="visitedVal.visitedVal-1"><span class="tsd-signature-symbol">get</span> visitedVal<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
258
|
+
<li class="tsd-signature" id="visitedVal.visitedVal-1"><span class="tsd-signature-symbol">get</span> visitedVal<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[]</span></li>
|
|
260
259
|
<li class="tsd-description">
|
|
261
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">
|
|
260
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources">
|
|
262
261
|
<p>Inherited from BinaryTree.visitedVal</p>
|
|
263
262
|
<ul>
|
|
264
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
263
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L183">src/data-structures/binary-tree/abstract-binary-tree.ts:183</a></li></ul></aside></li></ul></section></section>
|
|
265
264
|
<section class="tsd-panel-group tsd-member-group">
|
|
266
265
|
<h2>Methods</h2>
|
|
267
266
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="BFS" class="tsd-anchor"></a>
|
|
@@ -272,12 +271,12 @@
|
|
|
272
271
|
<div class="tsd-comment tsd-typography"><p>The BFS function performs a breadth-first search on a binary tree and returns the results based on a specified node
|
|
273
272
|
or property name.</p>
|
|
274
273
|
</div>
|
|
275
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>
|
|
274
|
+
<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>AbstractResultsByProperty<N></code>.</p>
|
|
276
275
|
|
|
277
276
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
278
277
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#BFS">BFS</a></p>
|
|
279
278
|
<ul>
|
|
280
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
279
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L937">src/data-structures/binary-tree/abstract-binary-tree.ts:937</a></li></ul></aside></li>
|
|
281
280
|
<li class="tsd-signature tsd-anchor-link" id="BFS.BFS-2"><span class="tsd-kind-call-signature">BFS</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><a href="#BFS.BFS-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
282
281
|
<li class="tsd-description">
|
|
283
282
|
<div class="tsd-comment tsd-typography"><p>The BFS function performs a breadth-first search on a binary tree and returns the results based on a specified node
|
|
@@ -294,13 +293,13 @@ performed starting from that node. If a property name is provided, the breadth-f
|
|
|
294
293
|
performed starting from the root node</p>
|
|
295
294
|
</div>
|
|
296
295
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
297
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>
|
|
296
|
+
<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>AbstractResultsByProperty<N></code>.</p>
|
|
298
297
|
|
|
299
298
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
300
299
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#BFS">BFS</a></p>
|
|
301
300
|
<ul>
|
|
302
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
303
|
-
<li class="tsd-signature tsd-anchor-link" id="BFS.BFS-3"><span class="tsd-kind-call-signature">BFS</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
301
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L939">src/data-structures/binary-tree/abstract-binary-tree.ts:939</a></li></ul></aside></li>
|
|
302
|
+
<li class="tsd-signature tsd-anchor-link" id="BFS.BFS-3"><span class="tsd-kind-call-signature">BFS</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[]</span><a href="#BFS.BFS-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
304
303
|
<li class="tsd-description">
|
|
305
304
|
<div class="tsd-comment tsd-typography"><p>The BFS function performs a breadth-first search on a binary tree and returns the results based on a specified node
|
|
306
305
|
or property name.</p>
|
|
@@ -316,13 +315,13 @@ performed starting from that node. If a property name is provided, the breadth-f
|
|
|
316
315
|
performed starting from the root node</p>
|
|
317
316
|
</div>
|
|
318
317
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
319
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">
|
|
318
|
+
<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>AbstractResultsByProperty<N></code>.</p>
|
|
320
319
|
|
|
321
320
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
322
321
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#BFS">BFS</a></p>
|
|
323
322
|
<ul>
|
|
324
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
325
|
-
<li class="tsd-signature tsd-anchor-link" id="BFS.BFS-4"><span class="tsd-kind-call-signature">BFS</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><
|
|
323
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L941">src/data-structures/binary-tree/abstract-binary-tree.ts:941</a></li></ul></aside></li>
|
|
324
|
+
<li class="tsd-signature tsd-anchor-link" id="BFS.BFS-4"><span class="tsd-kind-call-signature">BFS</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span><a href="#BFS.BFS-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
326
325
|
<li class="tsd-description">
|
|
327
326
|
<div class="tsd-comment tsd-typography"><p>The BFS function performs a breadth-first search on a binary tree and returns the results based on a specified node
|
|
328
327
|
or property name.</p>
|
|
@@ -338,12 +337,12 @@ performed starting from that node. If a property name is provided, the breadth-f
|
|
|
338
337
|
performed starting from the root node</p>
|
|
339
338
|
</div>
|
|
340
339
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
341
|
-
<h4 class="tsd-returns-title">Returns <
|
|
340
|
+
<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>AbstractResultsByProperty<N></code>.</p>
|
|
342
341
|
|
|
343
342
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
344
343
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#BFS">BFS</a></p>
|
|
345
344
|
<ul>
|
|
346
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
345
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L943">src/data-structures/binary-tree/abstract-binary-tree.ts:943</a></li></ul></aside></li>
|
|
347
346
|
<li class="tsd-signature tsd-anchor-link" id="BFS.BFS-5"><span class="tsd-kind-call-signature">BFS</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><a href="#BFS.BFS-5" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
348
347
|
<li class="tsd-description">
|
|
349
348
|
<div class="tsd-comment tsd-typography"><p>The BFS function performs a breadth-first search on a binary tree and returns the results based on a specified node
|
|
@@ -360,12 +359,12 @@ performed starting from that node. If a property name is provided, the breadth-f
|
|
|
360
359
|
performed starting from the root node</p>
|
|
361
360
|
</div>
|
|
362
361
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
363
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>
|
|
362
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>AbstractResultsByProperty<N></code>.</p>
|
|
364
363
|
|
|
365
364
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
366
365
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#BFS">BFS</a></p>
|
|
367
366
|
<ul>
|
|
368
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
367
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L945">src/data-structures/binary-tree/abstract-binary-tree.ts:945</a></li></ul></aside></li></ul></section>
|
|
369
368
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="DFS" class="tsd-anchor"></a>
|
|
370
369
|
<h3 class="tsd-anchor-link"><span>DFS</span><a href="#DFS" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
371
370
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -374,12 +373,12 @@ performed starting from the root node</p>
|
|
|
374
373
|
<div class="tsd-comment tsd-typography"><p>The DFS function performs a depth-first search traversal on a binary tree and returns the results based on the
|
|
375
374
|
specified pattern and node or property name.</p>
|
|
376
375
|
</div>
|
|
377
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>
|
|
376
|
+
<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>AbstractResultsByProperty<N></code>.</p>
|
|
378
377
|
|
|
379
378
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
380
379
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#DFS">DFS</a></p>
|
|
381
380
|
<ul>
|
|
382
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
381
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L973">src/data-structures/binary-tree/abstract-binary-tree.ts:973</a></li></ul></aside></li>
|
|
383
382
|
<li class="tsd-signature tsd-anchor-link" id="DFS.DFS-2"><span class="tsd-kind-call-signature">DFS</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><a href="#DFS.DFS-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
384
383
|
<li class="tsd-description">
|
|
385
384
|
<div class="tsd-comment tsd-typography"><p>The DFS function performs a depth-first search traversal on a binary tree and returns the results based on the
|
|
@@ -403,13 +402,13 @@ either the name of a property in the <code>BinaryTreeNode</code> object or the v
|
|
|
403
402
|
no value</p>
|
|
404
403
|
</div>
|
|
405
404
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
406
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>
|
|
405
|
+
<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>AbstractResultsByProperty<N></code>.</p>
|
|
407
406
|
|
|
408
407
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
409
408
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#DFS">DFS</a></p>
|
|
410
409
|
<ul>
|
|
411
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
412
|
-
<li class="tsd-signature tsd-anchor-link" id="DFS.DFS-3"><span class="tsd-kind-call-signature">DFS</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
410
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L975">src/data-structures/binary-tree/abstract-binary-tree.ts:975</a></li></ul></aside></li>
|
|
411
|
+
<li class="tsd-signature tsd-anchor-link" id="DFS.DFS-3"><span class="tsd-kind-call-signature">DFS</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span><a href="#DFS.DFS-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
413
412
|
<li class="tsd-description">
|
|
414
413
|
<div class="tsd-comment tsd-typography"><p>The DFS function performs a depth-first search traversal on a binary tree and returns the results based on the
|
|
415
414
|
specified pattern and node or property name.</p>
|
|
@@ -432,13 +431,13 @@ either the name of a property in the <code>BinaryTreeNode</code> object or the v
|
|
|
432
431
|
no value</p>
|
|
433
432
|
</div>
|
|
434
433
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
435
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">
|
|
434
|
+
<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>AbstractResultsByProperty<N></code>.</p>
|
|
436
435
|
|
|
437
436
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
438
437
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#DFS">DFS</a></p>
|
|
439
438
|
<ul>
|
|
440
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
441
|
-
<li class="tsd-signature tsd-anchor-link" id="DFS.DFS-4"><span class="tsd-kind-call-signature">DFS</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><
|
|
439
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L977">src/data-structures/binary-tree/abstract-binary-tree.ts:977</a></li></ul></aside></li>
|
|
440
|
+
<li class="tsd-signature tsd-anchor-link" id="DFS.DFS-4"><span class="tsd-kind-call-signature">DFS</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span><a href="#DFS.DFS-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
442
441
|
<li class="tsd-description">
|
|
443
442
|
<div class="tsd-comment tsd-typography"><p>The DFS function performs a depth-first search traversal on a binary tree and returns the results based on the
|
|
444
443
|
specified pattern and node or property name.</p>
|
|
@@ -461,12 +460,12 @@ either the name of a property in the <code>BinaryTreeNode</code> object or the v
|
|
|
461
460
|
no value</p>
|
|
462
461
|
</div>
|
|
463
462
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
464
|
-
<h4 class="tsd-returns-title">Returns <
|
|
463
|
+
<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>AbstractResultsByProperty<N></code>.</p>
|
|
465
464
|
|
|
466
465
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
467
466
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#DFS">DFS</a></p>
|
|
468
467
|
<ul>
|
|
469
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
468
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L979">src/data-structures/binary-tree/abstract-binary-tree.ts:979</a></li></ul></aside></li>
|
|
470
469
|
<li class="tsd-signature tsd-anchor-link" id="DFS.DFS-5"><span class="tsd-kind-call-signature">DFS</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><a href="#DFS.DFS-5" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
471
470
|
<li class="tsd-description">
|
|
472
471
|
<div class="tsd-comment tsd-typography"><p>The DFS function performs a depth-first search traversal on a binary tree and returns the results based on the
|
|
@@ -490,12 +489,12 @@ either the name of a property in the <code>BinaryTreeNode</code> object or the v
|
|
|
490
489
|
no value</p>
|
|
491
490
|
</div>
|
|
492
491
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
493
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>
|
|
492
|
+
<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>AbstractResultsByProperty<N></code>.</p>
|
|
494
493
|
|
|
495
494
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
496
495
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#DFS">DFS</a></p>
|
|
497
496
|
<ul>
|
|
498
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
497
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L981">src/data-structures/binary-tree/abstract-binary-tree.ts:981</a></li></ul></aside></li></ul></section>
|
|
499
498
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="DFSIterative" class="tsd-anchor"></a>
|
|
500
499
|
<h3 class="tsd-anchor-link"><span>DFSIterative</span><a href="#DFSIterative" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
501
500
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -508,7 +507,7 @@ Space complexity of Iterative DFS equals to recursive DFS which is O(n) because
|
|
|
508
507
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
509
508
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#DFSIterative">DFSIterative</a></p>
|
|
510
509
|
<ul>
|
|
511
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
510
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1023">src/data-structures/binary-tree/abstract-binary-tree.ts:1023</a></li></ul></aside></li>
|
|
512
511
|
<li class="tsd-signature tsd-anchor-link" id="DFSIterative.DFSIterative-2"><span class="tsd-kind-call-signature">DFSIterative</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><a href="#DFSIterative.DFSIterative-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
513
512
|
<li class="tsd-description">
|
|
514
513
|
<div class="tsd-comment tsd-typography"><p>Time complexity is O(n)
|
|
@@ -527,8 +526,8 @@ Space complexity of Iterative DFS equals to recursive DFS which is O(n) because
|
|
|
527
526
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
528
527
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#DFSIterative">DFSIterative</a></p>
|
|
529
528
|
<ul>
|
|
530
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
531
|
-
<li class="tsd-signature tsd-anchor-link" id="DFSIterative.DFSIterative-3"><span class="tsd-kind-call-signature">DFSIterative</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
529
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1025">src/data-structures/binary-tree/abstract-binary-tree.ts:1025</a></li></ul></aside></li>
|
|
530
|
+
<li class="tsd-signature tsd-anchor-link" id="DFSIterative.DFSIterative-3"><span class="tsd-kind-call-signature">DFSIterative</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span><a href="#DFSIterative.DFSIterative-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
532
531
|
<li class="tsd-description">
|
|
533
532
|
<div class="tsd-comment tsd-typography"><p>Time complexity is O(n)
|
|
534
533
|
Space complexity of Iterative DFS equals to recursive DFS which is O(n) because of the stack</p>
|
|
@@ -542,12 +541,12 @@ Space complexity of Iterative DFS equals to recursive DFS which is O(n) because
|
|
|
542
541
|
<li>
|
|
543
542
|
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">nodeOrPropertyName</span>: <span class="tsd-signature-type">"val"</span></h5>
|
|
544
543
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
545
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">
|
|
544
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4>
|
|
546
545
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
547
546
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#DFSIterative">DFSIterative</a></p>
|
|
548
547
|
<ul>
|
|
549
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
550
|
-
<li class="tsd-signature tsd-anchor-link" id="DFSIterative.DFSIterative-4"><span class="tsd-kind-call-signature">DFSIterative</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><
|
|
548
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1027">src/data-structures/binary-tree/abstract-binary-tree.ts:1027</a></li></ul></aside></li>
|
|
549
|
+
<li class="tsd-signature tsd-anchor-link" id="DFSIterative.DFSIterative-4"><span class="tsd-kind-call-signature">DFSIterative</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span><a href="#DFSIterative.DFSIterative-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
551
550
|
<li class="tsd-description">
|
|
552
551
|
<div class="tsd-comment tsd-typography"><p>Time complexity is O(n)
|
|
553
552
|
Space complexity of Iterative DFS equals to recursive DFS which is O(n) because of the stack</p>
|
|
@@ -561,11 +560,11 @@ Space complexity of Iterative DFS equals to recursive DFS which is O(n) because
|
|
|
561
560
|
<li>
|
|
562
561
|
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">nodeOrPropertyName</span>: <span class="tsd-signature-type">"node"</span></h5>
|
|
563
562
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
564
|
-
<h4 class="tsd-returns-title">Returns <
|
|
563
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4>
|
|
565
564
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
566
565
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#DFSIterative">DFSIterative</a></p>
|
|
567
566
|
<ul>
|
|
568
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
567
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1029">src/data-structures/binary-tree/abstract-binary-tree.ts:1029</a></li></ul></aside></li>
|
|
569
568
|
<li class="tsd-signature tsd-anchor-link" id="DFSIterative.DFSIterative-5"><span class="tsd-kind-call-signature">DFSIterative</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><a href="#DFSIterative.DFSIterative-5" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
570
569
|
<li class="tsd-description">
|
|
571
570
|
<div class="tsd-comment tsd-typography"><p>Time complexity is O(n)
|
|
@@ -584,7 +583,7 @@ Space complexity of Iterative DFS equals to recursive DFS which is O(n) because
|
|
|
584
583
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
585
584
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#DFSIterative">DFSIterative</a></p>
|
|
586
585
|
<ul>
|
|
587
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
586
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1031">src/data-structures/binary-tree/abstract-binary-tree.ts:1031</a></li></ul></aside></li></ul></section>
|
|
588
587
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_accumulatedByPropertyName" class="tsd-anchor"></a>
|
|
589
588
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_accumulated<wbr/>By<wbr/>Property<wbr/>Name</span><a href="#_accumulatedByPropertyName" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
590
589
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -597,8 +596,8 @@ provided property name or a default property name.</p>
|
|
|
597
596
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
598
597
|
<ul class="tsd-parameter-list">
|
|
599
598
|
<li>
|
|
600
|
-
<h5><span class="tsd-kind-parameter">node</span>: <
|
|
601
|
-
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is of type <code>
|
|
599
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
600
|
+
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is of type <code>N</code>, which represents a node in a binary tree.</p>
|
|
602
601
|
</div>
|
|
603
602
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
604
603
|
<li>
|
|
@@ -612,7 +611,7 @@ the property name of the node that should be accumulated. If it is a node object
|
|
|
612
611
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
613
612
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#_accumulatedByPropertyName">_accumulatedByPropertyName</a></p>
|
|
614
613
|
<ul>
|
|
615
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
614
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1443">src/data-structures/binary-tree/abstract-binary-tree.ts:1443</a></li></ul></aside></li></ul></section>
|
|
616
615
|
<section class="tsd-panel tsd-member tsd-is-protected"><a id="_compare" class="tsd-anchor"></a>
|
|
617
616
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_compare</span><a href="#_compare" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
618
617
|
<ul class="tsd-signatures tsd-is-protected">
|
|
@@ -639,11 +638,47 @@ than), or CP.eq (equal).</p>
|
|
|
639
638
|
|
|
640
639
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
641
640
|
<ul>
|
|
642
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
641
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/bst.ts#L485">src/data-structures/binary-tree/bst.ts:485</a></li></ul></aside></li></ul></section>
|
|
642
|
+
<section class="tsd-panel tsd-member"><a id="_createNode" class="tsd-anchor"></a>
|
|
643
|
+
<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>
|
|
644
|
+
<ul class="tsd-signatures">
|
|
645
|
+
<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>
|
|
646
|
+
<li class="tsd-description">
|
|
647
|
+
<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
|
|
648
|
+
it returns null.</p>
|
|
649
|
+
</div>
|
|
650
|
+
<div class="tsd-parameters">
|
|
651
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
652
|
+
<ul class="tsd-parameter-list">
|
|
653
|
+
<li>
|
|
654
|
+
<h5><span class="tsd-kind-parameter">id</span>: <span class="tsd-signature-type">number</span></h5>
|
|
655
|
+
<div class="tsd-comment tsd-typography"><p>The <code>id</code> parameter is the identifier for the binary tree node. It is of type
|
|
656
|
+
<code>BinaryTreeNodeId</code>.</p>
|
|
657
|
+
</div>
|
|
658
|
+
<div class="tsd-comment tsd-typography"></div></li>
|
|
659
|
+
<li>
|
|
660
|
+
<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>
|
|
661
|
+
<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)
|
|
662
|
+
or <code>null</code>.</p>
|
|
663
|
+
</div>
|
|
664
|
+
<div class="tsd-comment tsd-typography"></div></li>
|
|
665
|
+
<li>
|
|
666
|
+
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">count</span>: <span class="tsd-signature-type">number</span></h5>
|
|
667
|
+
<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
|
|
668
|
+
of occurrences of the value in the binary tree node. If not provided, the default value is <code>undefined</code>.</p>
|
|
669
|
+
</div>
|
|
670
|
+
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
671
|
+
<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>
|
|
672
|
+
|
|
673
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
674
|
+
<p>Implementation of <a href="../interfaces/IBinaryTree.html">IBinaryTree</a>.<a href="../interfaces/IBinaryTree.html#_createNode">_createNode</a></p>
|
|
675
|
+
<p>Overrides <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#_createNode">_createNode</a></p>
|
|
676
|
+
<ul>
|
|
677
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/bst.ts#L32">src/data-structures/binary-tree/bst.ts:32</a></li></ul></aside></li></ul></section>
|
|
643
678
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_getResultByPropertyName" class="tsd-anchor"></a>
|
|
644
679
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_get<wbr/>Result<wbr/>By<wbr/>Property<wbr/>Name</span><a href="#_getResultByPropertyName" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
645
680
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
646
|
-
<li class="tsd-signature tsd-anchor-link" id="_getResultByPropertyName._getResultByPropertyName-1"><span class="tsd-kind-call-signature">_get<wbr/>Result<wbr/>By<wbr/>Property<wbr/>Name</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../types/
|
|
681
|
+
<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/AbstractResultsByProperty.html" class="tsd-signature-type tsd-kind-type-alias">AbstractResultsByProperty</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">></span><a href="#_getResultByPropertyName._getResultByPropertyName-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
647
682
|
<li class="tsd-description">
|
|
648
683
|
<div class="tsd-comment tsd-typography"><p>The function <code>_getResultByPropertyName</code> returns different results based on the provided property name or defaulting
|
|
649
684
|
to 'id'.</p>
|
|
@@ -657,12 +692,12 @@ to 'id'.</p>
|
|
|
657
692
|
can accept a value of type <code>NodeOrPropertyName</code>.</p>
|
|
658
693
|
</div>
|
|
659
694
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
660
|
-
<h4 class="tsd-returns-title">Returns <a href="../types/
|
|
695
|
+
<h4 class="tsd-returns-title">Returns <a href="../types/AbstractResultsByProperty.html" class="tsd-signature-type tsd-kind-type-alias">AbstractResultsByProperty</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>AbstractResultsByProperty<T></code>.</p>
|
|
661
696
|
|
|
662
697
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
663
698
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#_getResultByPropertyName">_getResultByPropertyName</a></p>
|
|
664
699
|
<ul>
|
|
665
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
700
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1472">src/data-structures/binary-tree/abstract-binary-tree.ts:1472</a></li></ul></aside></li></ul></section>
|
|
666
701
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_pushByPropertyNameStopOrNot" class="tsd-anchor"></a>
|
|
667
702
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_push<wbr/>By<wbr/>Property<wbr/>Name<wbr/>Stop<wbr/>Or<wbr/>Not</span><a href="#_pushByPropertyNameStopOrNot" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
668
703
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -675,18 +710,18 @@ a result array.</p>
|
|
|
675
710
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
676
711
|
<ul class="tsd-parameter-list">
|
|
677
712
|
<li>
|
|
678
|
-
<h5><span class="tsd-kind-parameter">cur</span>: <
|
|
713
|
+
<h5><span class="tsd-kind-parameter">cur</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
679
714
|
<div class="tsd-comment tsd-typography"><p>The current binary tree node that is being checked.</p>
|
|
680
715
|
</div>
|
|
681
716
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
682
717
|
<li>
|
|
683
|
-
<h5><span class="tsd-kind-parameter">result</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
718
|
+
<h5><span class="tsd-kind-parameter">result</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span></h5>
|
|
684
719
|
<div class="tsd-comment tsd-typography"><p>An array that stores the matching nodes found during the
|
|
685
720
|
traversal.</p>
|
|
686
721
|
</div>
|
|
687
722
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
688
723
|
<li>
|
|
689
|
-
<h5><span class="tsd-kind-parameter">nodeProperty</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
724
|
+
<h5><span class="tsd-kind-parameter">nodeProperty</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
690
725
|
<div class="tsd-comment tsd-typography"><p>The <code>nodeProperty</code> parameter is the value that we are searching for in
|
|
691
726
|
the binary tree nodes. It can be either the <code>id</code>, <code>count</code>, or <code>val</code> property of the node.</p>
|
|
692
727
|
</div>
|
|
@@ -710,7 +745,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
710
745
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
711
746
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#_pushByPropertyNameStopOrNot">_pushByPropertyNameStopOrNot</a></p>
|
|
712
747
|
<ul>
|
|
713
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
748
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1406">src/data-structures/binary-tree/abstract-binary-tree.ts:1406</a></li></ul></aside></li></ul></section>
|
|
714
749
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_resetResults" class="tsd-anchor"></a>
|
|
715
750
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_reset<wbr/>Results</span><a href="#_resetResults" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
716
751
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -722,7 +757,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
722
757
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
723
758
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#_resetResults">_resetResults</a></p>
|
|
724
759
|
<ul>
|
|
725
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
760
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1382">src/data-structures/binary-tree/abstract-binary-tree.ts:1382</a></li></ul></aside></li></ul></section>
|
|
726
761
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setAutoIncrementId" class="tsd-anchor"></a>
|
|
727
762
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_set<wbr/>Auto<wbr/>Increment<wbr/>Id</span><a href="#_setAutoIncrementId" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
728
763
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -736,7 +771,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
736
771
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
737
772
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#_setAutoIncrementId">_setAutoIncrementId</a></p>
|
|
738
773
|
<ul>
|
|
739
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
774
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1351">src/data-structures/binary-tree/abstract-binary-tree.ts:1351</a></li></ul></aside></li></ul></section>
|
|
740
775
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setCount" class="tsd-anchor"></a>
|
|
741
776
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_set<wbr/>Count</span><a href="#_setCount" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
742
777
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -750,7 +785,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
750
785
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
751
786
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#_setCount">_setCount</a></p>
|
|
752
787
|
<ul>
|
|
753
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
788
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1375">src/data-structures/binary-tree/abstract-binary-tree.ts:1375</a></li></ul></aside></li></ul></section>
|
|
754
789
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setIsDuplicatedVal" class="tsd-anchor"></a>
|
|
755
790
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_set<wbr/>Is<wbr/>Duplicated<wbr/>Val</span><a href="#_setIsDuplicatedVal" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
756
791
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -764,7 +799,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
764
799
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
765
800
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#_setIsDuplicatedVal">_setIsDuplicatedVal</a></p>
|
|
766
801
|
<ul>
|
|
767
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
802
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1359">src/data-structures/binary-tree/abstract-binary-tree.ts:1359</a></li></ul></aside></li></ul></section>
|
|
768
803
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setLoopType" class="tsd-anchor"></a>
|
|
769
804
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_set<wbr/>Loop<wbr/>Type</span><a href="#_setLoopType" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
770
805
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -778,7 +813,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
778
813
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
779
814
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#_setLoopType">_setLoopType</a></p>
|
|
780
815
|
<ul>
|
|
781
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
816
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1327">src/data-structures/binary-tree/abstract-binary-tree.ts:1327</a></li></ul></aside></li></ul></section>
|
|
782
817
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setMaxId" class="tsd-anchor"></a>
|
|
783
818
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_set<wbr/>Max<wbr/>Id</span><a href="#_setMaxId" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
784
819
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -792,7 +827,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
792
827
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
793
828
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#_setMaxId">_setMaxId</a></p>
|
|
794
829
|
<ul>
|
|
795
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
830
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1355">src/data-structures/binary-tree/abstract-binary-tree.ts:1355</a></li></ul></aside></li></ul></section>
|
|
796
831
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setRoot" class="tsd-anchor"></a>
|
|
797
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>
|
|
798
833
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -802,11 +837,11 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
802
837
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
803
838
|
<ul class="tsd-parameter-list">
|
|
804
839
|
<li>
|
|
805
|
-
<h5><span class="tsd-kind-parameter">v</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
840
|
+
<h5><span class="tsd-kind-parameter">v</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5></li></ul></div>
|
|
806
841
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
807
842
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#_setRoot">_setRoot</a></p>
|
|
808
843
|
<ul>
|
|
809
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
844
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1363">src/data-structures/binary-tree/abstract-binary-tree.ts:1363</a></li></ul></aside></li></ul></section>
|
|
810
845
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setSize" class="tsd-anchor"></a>
|
|
811
846
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_set<wbr/>Size</span><a href="#_setSize" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
812
847
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -820,7 +855,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
820
855
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
821
856
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#_setSize">_setSize</a></p>
|
|
822
857
|
<ul>
|
|
823
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
858
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1371">src/data-structures/binary-tree/abstract-binary-tree.ts:1371</a></li></ul></aside></li></ul></section>
|
|
824
859
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setVisitedId" class="tsd-anchor"></a>
|
|
825
860
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_set<wbr/>Visited<wbr/>Id</span><a href="#_setVisitedId" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
826
861
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -834,7 +869,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
834
869
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
835
870
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#_setVisitedId">_setVisitedId</a></p>
|
|
836
871
|
<ul>
|
|
837
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
872
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1331">src/data-structures/binary-tree/abstract-binary-tree.ts:1331</a></li></ul></aside></li></ul></section>
|
|
838
873
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setVisitedLeftSum" class="tsd-anchor"></a>
|
|
839
874
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_set<wbr/>Visited<wbr/>Left<wbr/>Sum</span><a href="#_setVisitedLeftSum" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
840
875
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -848,7 +883,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
848
883
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
849
884
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#_setVisitedLeftSum">_setVisitedLeftSum</a></p>
|
|
850
885
|
<ul>
|
|
851
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
886
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1347">src/data-structures/binary-tree/abstract-binary-tree.ts:1347</a></li></ul></aside></li></ul></section>
|
|
852
887
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setVisitedNode" class="tsd-anchor"></a>
|
|
853
888
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_set<wbr/>Visited<wbr/>Node</span><a href="#_setVisitedNode" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
854
889
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -858,11 +893,11 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
858
893
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
859
894
|
<ul class="tsd-parameter-list">
|
|
860
895
|
<li>
|
|
861
|
-
<h5><span class="tsd-kind-parameter">value</span>: <
|
|
896
|
+
<h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h5></li></ul></div>
|
|
862
897
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
863
898
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#_setVisitedNode">_setVisitedNode</a></p>
|
|
864
899
|
<ul>
|
|
865
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
900
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1339">src/data-structures/binary-tree/abstract-binary-tree.ts:1339</a></li></ul></aside></li></ul></section>
|
|
866
901
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setVisitedVal" class="tsd-anchor"></a>
|
|
867
902
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_set<wbr/>Visited<wbr/>Val</span><a href="#_setVisitedVal" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
868
903
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -872,15 +907,15 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
872
907
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
873
908
|
<ul class="tsd-parameter-list">
|
|
874
909
|
<li>
|
|
875
|
-
<h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type tsd-kind-type-parameter">
|
|
910
|
+
<h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h5></li></ul></div>
|
|
876
911
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
877
912
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#_setVisitedVal">_setVisitedVal</a></p>
|
|
878
913
|
<ul>
|
|
879
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
914
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1335">src/data-structures/binary-tree/abstract-binary-tree.ts:1335</a></li></ul></aside></li></ul></section>
|
|
880
915
|
<section class="tsd-panel tsd-member"><a id="add" class="tsd-anchor"></a>
|
|
881
916
|
<h3 class="tsd-anchor-link"><span>add</span><a href="#add" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
882
917
|
<ul class="tsd-signatures">
|
|
883
|
-
<li class="tsd-signature tsd-anchor-link" id="add.add-1"><span class="tsd-kind-call-signature">add</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">id</span>, <span class="tsd-kind-parameter">val</span>, <span class="tsd-kind-parameter">count</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
918
|
+
<li class="tsd-signature tsd-anchor-link" id="add.add-1"><span class="tsd-kind-call-signature">add</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">id</span>, <span class="tsd-kind-parameter">val</span>, <span class="tsd-kind-parameter">count</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><a href="#add.add-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
884
919
|
<li class="tsd-description">
|
|
885
920
|
<div class="tsd-comment tsd-typography"><p>The <code>add</code> function inserts a new node into a binary search tree, updating the count and value of an existing node if
|
|
886
921
|
the ID matches, and returns the inserted node.</p>
|
|
@@ -895,9 +930,9 @@ determine the position of the node in the binary search tree.</p>
|
|
|
895
930
|
</div>
|
|
896
931
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
897
932
|
<li>
|
|
898
|
-
<h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
933
|
+
<h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span></h5>
|
|
899
934
|
<div class="tsd-comment tsd-typography"><p>The <code>val</code> parameter represents the value to be stored in the binary search tree node. It can
|
|
900
|
-
be of type <code>
|
|
935
|
+
be of type <code>N</code> (the generic type) or <code>null</code>.</p>
|
|
901
936
|
</div>
|
|
902
937
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
903
938
|
<li>
|
|
@@ -907,16 +942,16 @@ the binary search tree. By default, it is set to 1, meaning that if no count is
|
|
|
907
942
|
inserted once.</p>
|
|
908
943
|
</div>
|
|
909
944
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
910
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
945
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h4><p>The method <code>add</code> returns a <code>N</code> object or <code>null</code>.</p>
|
|
911
946
|
|
|
912
947
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
913
948
|
<p>Overrides <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#add">add</a></p>
|
|
914
949
|
<ul>
|
|
915
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
950
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/bst.ts#L49">src/data-structures/binary-tree/bst.ts:49</a></li></ul></aside></li></ul></section>
|
|
916
951
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="addMany" class="tsd-anchor"></a>
|
|
917
952
|
<h3 class="tsd-anchor-link"><span>add<wbr/>Many</span><a href="#addMany" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
918
953
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
919
|
-
<li class="tsd-signature tsd-anchor-link" id="addMany.addMany-1"><span class="tsd-kind-call-signature">add<wbr/>Many</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
954
|
+
<li class="tsd-signature tsd-anchor-link" id="addMany.addMany-1"><span class="tsd-kind-call-signature">add<wbr/>Many</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span><a href="#addMany.addMany-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
920
955
|
<li class="tsd-description">
|
|
921
956
|
<div class="tsd-comment tsd-typography"><p>The <code>addMany</code> function inserts multiple items into a binary tree and returns an array of the inserted nodes or
|
|
922
957
|
null/undefined values.</p>
|
|
@@ -925,21 +960,21 @@ null/undefined values.</p>
|
|
|
925
960
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
926
961
|
<ul class="tsd-parameter-list">
|
|
927
962
|
<li>
|
|
928
|
-
<h5><span class="tsd-kind-parameter">data</span>: <
|
|
929
|
-
<div class="tsd-comment tsd-typography"><p>The <code>data</code> parameter can be either an array of elements of type <code>
|
|
930
|
-
array of <code>
|
|
963
|
+
<h5><span class="tsd-kind-parameter">data</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[]</span></h5>
|
|
964
|
+
<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
|
|
965
|
+
array of <code>N</code> objects.</p>
|
|
931
966
|
</div>
|
|
932
967
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
933
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">(</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
968
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">(</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>addMany</code> returns an array of <code>N</code>, <code>null</code>, or <code>undefined</code> values.</p>
|
|
934
969
|
|
|
935
970
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
936
971
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#addMany">addMany</a></p>
|
|
937
972
|
<ul>
|
|
938
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
973
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L362">src/data-structures/binary-tree/abstract-binary-tree.ts:362</a></li></ul></aside></li></ul></section>
|
|
939
974
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="addTo" class="tsd-anchor"></a>
|
|
940
975
|
<h3 class="tsd-anchor-link"><span>add<wbr/>To</span><a href="#addTo" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
941
976
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
942
|
-
<li class="tsd-signature tsd-anchor-link" id="addTo.addTo-1"><span class="tsd-kind-call-signature">add<wbr/>To</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">newNode</span>, <span class="tsd-kind-parameter">parent</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
977
|
+
<li class="tsd-signature tsd-anchor-link" id="addTo.addTo-1"><span class="tsd-kind-call-signature">add<wbr/>To</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">newNode</span>, <span class="tsd-kind-parameter">parent</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><a href="#addTo.addTo-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
943
978
|
<li class="tsd-description">
|
|
944
979
|
<div class="tsd-comment tsd-typography"><p>The function inserts a new node into a binary tree as the left or right child of a given parent node.</p>
|
|
945
980
|
</div>
|
|
@@ -947,23 +982,23 @@ array of <code>BinaryTreeNode<T></code> objects.</p>
|
|
|
947
982
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
948
983
|
<ul class="tsd-parameter-list">
|
|
949
984
|
<li>
|
|
950
|
-
<h5><span class="tsd-kind-parameter">newNode</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
985
|
+
<h5><span class="tsd-kind-parameter">newNode</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
951
986
|
<div class="tsd-comment tsd-typography"><p>The <code>newNode</code> parameter is an instance of the <code>BinaryTreeNode</code> class or
|
|
952
987
|
<code>null</code>. It represents the node that needs to be inserted into the binary tree.</p>
|
|
953
988
|
</div>
|
|
954
989
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
955
990
|
<li>
|
|
956
|
-
<h5><span class="tsd-kind-parameter">parent</span>: <
|
|
991
|
+
<h5><span class="tsd-kind-parameter">parent</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
957
992
|
<div class="tsd-comment tsd-typography"><p>The <code>parent</code> parameter is a BinaryTreeNode object representing the parent node to which the new node
|
|
958
993
|
will be inserted as a child.</p>
|
|
959
994
|
</div>
|
|
960
995
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
961
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
996
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h4><p>The method returns the newly inserted node, either as the left child or the right child of the parent node.</p>
|
|
962
997
|
|
|
963
998
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
964
999
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#addTo">addTo</a></p>
|
|
965
1000
|
<ul>
|
|
966
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1001
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L322">src/data-structures/binary-tree/abstract-binary-tree.ts:322</a></li></ul></aside></li></ul></section>
|
|
967
1002
|
<section class="tsd-panel tsd-member"><a id="allGreaterNodesAdd" class="tsd-anchor"></a>
|
|
968
1003
|
<h3 class="tsd-anchor-link"><span>all<wbr/>Greater<wbr/>Nodes<wbr/>Add</span><a href="#allGreaterNodesAdd" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
969
1004
|
<ul class="tsd-signatures">
|
|
@@ -976,8 +1011,8 @@ that have a greater value than a given node.</p>
|
|
|
976
1011
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
977
1012
|
<ul class="tsd-parameter-list">
|
|
978
1013
|
<li>
|
|
979
|
-
<h5><span class="tsd-kind-parameter">node</span>: <
|
|
980
|
-
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is of type <code>
|
|
1014
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1015
|
+
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is of type <code>N</code>, which represents a node in a binary search tree. It
|
|
981
1016
|
contains properties such as <code>id</code> and <code>count</code>.</p>
|
|
982
1017
|
</div>
|
|
983
1018
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
@@ -998,7 +1033,7 @@ defaults to 'id'.</p>
|
|
|
998
1033
|
|
|
999
1034
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1000
1035
|
<ul>
|
|
1001
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1036
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/bst.ts#L341">src/data-structures/binary-tree/bst.ts:341</a></li></ul></aside></li></ul></section>
|
|
1002
1037
|
<section class="tsd-panel tsd-member"><a id="balance" class="tsd-anchor"></a>
|
|
1003
1038
|
<h3 class="tsd-anchor-link"><span>balance</span><a href="#balance" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1004
1039
|
<ul class="tsd-signatures">
|
|
@@ -1011,7 +1046,7 @@ recursive or iterative approach.</p>
|
|
|
1011
1046
|
|
|
1012
1047
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1013
1048
|
<ul>
|
|
1014
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1049
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/bst.ts#L392">src/data-structures/binary-tree/bst.ts:392</a></li></ul></aside></li></ul></section>
|
|
1015
1050
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="clear" class="tsd-anchor"></a>
|
|
1016
1051
|
<h3 class="tsd-anchor-link"><span>clear</span><a href="#clear" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1017
1052
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1023,43 +1058,7 @@ recursive or iterative approach.</p>
|
|
|
1023
1058
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1024
1059
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#clear">clear</a></p>
|
|
1025
1060
|
<ul>
|
|
1026
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1027
|
-
<section class="tsd-panel tsd-member"><a id="createNode" class="tsd-anchor"></a>
|
|
1028
|
-
<h3 class="tsd-anchor-link"><span>create<wbr/>Node</span><a href="#createNode" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1029
|
-
<ul class="tsd-signatures">
|
|
1030
|
-
<li class="tsd-signature tsd-anchor-link" id="createNode.createNode-1"><span class="tsd-kind-call-signature">create<wbr/>Node</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">id</span>, <span class="tsd-kind-parameter">val</span>, <span class="tsd-kind-parameter">count</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="BSTNode.html" class="tsd-signature-type tsd-kind-class">BSTNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">></span><a href="#createNode.createNode-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1031
|
-
<li class="tsd-description">
|
|
1032
|
-
<div class="tsd-comment tsd-typography"><p>The function creates a new binary tree node with the given id, value, and count, or returns null if the value is
|
|
1033
|
-
null.</p>
|
|
1034
|
-
</div>
|
|
1035
|
-
<div class="tsd-parameters">
|
|
1036
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1037
|
-
<ul class="tsd-parameter-list">
|
|
1038
|
-
<li>
|
|
1039
|
-
<h5><span class="tsd-kind-parameter">id</span>: <span class="tsd-signature-type">number</span></h5>
|
|
1040
|
-
<div class="tsd-comment tsd-typography"><p>The <code>id</code> parameter is the identifier for the binary tree node. It is of type
|
|
1041
|
-
<code>BinaryTreeNodeId</code>, which could be a string or a number, depending on how you want to identify your nodes.</p>
|
|
1042
|
-
</div>
|
|
1043
|
-
<div class="tsd-comment tsd-typography"></div></li>
|
|
1044
|
-
<li>
|
|
1045
|
-
<h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
|
|
1046
|
-
<div class="tsd-comment tsd-typography"><p>The <code>val</code> parameter represents the value to be stored in the binary tree node. It can be of
|
|
1047
|
-
any type <code>T</code> or <code>null</code>.</p>
|
|
1048
|
-
</div>
|
|
1049
|
-
<div class="tsd-comment tsd-typography"></div></li>
|
|
1050
|
-
<li>
|
|
1051
|
-
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">count</span>: <span class="tsd-signature-type">number</span></h5>
|
|
1052
|
-
<div class="tsd-comment tsd-typography"><p>The count parameter is an optional parameter that represents the number of occurrences of
|
|
1053
|
-
the value in the binary tree node. It is of type number.</p>
|
|
1054
|
-
</div>
|
|
1055
|
-
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1056
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="BSTNode.html" class="tsd-signature-type tsd-kind-class">BSTNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">></span></h4><p>The function <code>createNode</code> returns a <code>BinaryTreeNode<T></code> object if the <code>val</code> parameter is not null.
|
|
1057
|
-
Otherwise, it returns null.</p>
|
|
1058
|
-
|
|
1059
|
-
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1060
|
-
<p>Overrides <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#createNode">createNode</a></p>
|
|
1061
|
-
<ul>
|
|
1062
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c1b5969/src/data-structures/binary-tree/bst.ts#L37">src/data-structures/binary-tree/bst.ts:37</a></li></ul></aside></li></ul></section>
|
|
1061
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L246">src/data-structures/binary-tree/abstract-binary-tree.ts:246</a></li></ul></aside></li></ul></section>
|
|
1063
1062
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="fill" class="tsd-anchor"></a>
|
|
1064
1063
|
<h3 class="tsd-anchor-link"><span>fill</span><a href="#fill" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1065
1064
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1072,9 +1071,9 @@ was successful.</p>
|
|
|
1072
1071
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1073
1072
|
<ul class="tsd-parameter-list">
|
|
1074
1073
|
<li>
|
|
1075
|
-
<h5><span class="tsd-kind-parameter">data</span>: <
|
|
1076
|
-
<div class="tsd-comment tsd-typography"><p>The <code>data</code> parameter can be either an array of elements of type <code>
|
|
1077
|
-
array of <code>
|
|
1074
|
+
<h5><span class="tsd-kind-parameter">data</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[]</span></h5>
|
|
1075
|
+
<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
|
|
1076
|
+
array of <code>N</code> objects.</p>
|
|
1078
1077
|
</div>
|
|
1079
1078
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1080
1079
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>The method is returning a boolean value.</p>
|
|
@@ -1082,11 +1081,11 @@ array of <code>BinaryTreeNode<T></code> objects.</p>
|
|
|
1082
1081
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1083
1082
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#fill">fill</a></p>
|
|
1084
1083
|
<ul>
|
|
1085
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1084
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L423">src/data-structures/binary-tree/abstract-binary-tree.ts:423</a></li></ul></aside></li></ul></section>
|
|
1086
1085
|
<section class="tsd-panel tsd-member"><a id="get" class="tsd-anchor"></a>
|
|
1087
1086
|
<h3 class="tsd-anchor-link"><span>get</span><a href="#get" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1088
1087
|
<ul class="tsd-signatures">
|
|
1089
|
-
<li class="tsd-signature tsd-anchor-link" id="get.get-1"><span class="tsd-kind-call-signature">get</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">nodeProperty</span>, <span class="tsd-kind-parameter">propertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1088
|
+
<li class="tsd-signature tsd-anchor-link" id="get.get-1"><span class="tsd-kind-call-signature">get</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">nodeProperty</span>, <span class="tsd-kind-parameter">propertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><a href="#get.get-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1090
1089
|
<li class="tsd-description">
|
|
1091
1090
|
<div class="tsd-comment tsd-typography"><p>The <code>get</code> function returns the first node in a binary search tree that matches the given property value or name.</p>
|
|
1092
1091
|
</div>
|
|
@@ -1094,9 +1093,9 @@ array of <code>BinaryTreeNode<T></code> objects.</p>
|
|
|
1094
1093
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1095
1094
|
<ul class="tsd-parameter-list">
|
|
1096
1095
|
<li>
|
|
1097
|
-
<h5><span class="tsd-kind-parameter">nodeProperty</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
1096
|
+
<h5><span class="tsd-kind-parameter">nodeProperty</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1098
1097
|
<div class="tsd-comment tsd-typography"><p>The <code>nodeProperty</code> parameter can be either a <code>BinaryTreeNodeId</code> or a
|
|
1099
|
-
generic type <code>
|
|
1098
|
+
generic type <code>N</code>. It represents the value of the property that you want to search for in the binary search tree.</p>
|
|
1100
1099
|
</div>
|
|
1101
1100
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
1102
1101
|
<li>
|
|
@@ -1106,12 +1105,12 @@ specifies the property name to use for searching the binary search tree nodes. I
|
|
|
1106
1105
|
<code>'id'</code>.</p>
|
|
1107
1106
|
</div>
|
|
1108
1107
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1109
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1108
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h4><p>The method is returning a N object or null.</p>
|
|
1110
1109
|
|
|
1111
1110
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1112
1111
|
<p>Overrides <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#get">get</a></p>
|
|
1113
1112
|
<ul>
|
|
1114
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1113
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/bst.ts#L123">src/data-structures/binary-tree/bst.ts:123</a></li></ul></aside></li></ul></section>
|
|
1115
1114
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getDepth" class="tsd-anchor"></a>
|
|
1116
1115
|
<h3 class="tsd-anchor-link"><span>get<wbr/>Depth</span><a href="#getDepth" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1117
1116
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1123,8 +1122,8 @@ specifies the property name to use for searching the binary search tree nodes. I
|
|
|
1123
1122
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1124
1123
|
<ul class="tsd-parameter-list">
|
|
1125
1124
|
<li>
|
|
1126
|
-
<h5><span class="tsd-kind-parameter">node</span>: <
|
|
1127
|
-
<div class="tsd-comment tsd-typography"><p>
|
|
1125
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1126
|
+
<div class="tsd-comment tsd-typography"><p>N - This is the node for which we want to calculate the depth. It is a generic type,
|
|
1128
1127
|
meaning it can represent any type of data that we want to store in the node.</p>
|
|
1129
1128
|
</div>
|
|
1130
1129
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
@@ -1133,7 +1132,7 @@ meaning it can represent any type of data that we want to store in the node.</p>
|
|
|
1133
1132
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1134
1133
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#getDepth">getDepth</a></p>
|
|
1135
1134
|
<ul>
|
|
1136
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1135
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L481">src/data-structures/binary-tree/abstract-binary-tree.ts:481</a></li></ul></aside></li></ul></section>
|
|
1137
1136
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getHeight" class="tsd-anchor"></a>
|
|
1138
1137
|
<h3 class="tsd-anchor-link"><span>get<wbr/>Height</span><a href="#getHeight" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1139
1138
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1146,9 +1145,9 @@ approach.</p>
|
|
|
1146
1145
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1147
1146
|
<ul class="tsd-parameter-list">
|
|
1148
1147
|
<li>
|
|
1149
|
-
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">beginRoot</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1148
|
+
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">beginRoot</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1150
1149
|
<div class="tsd-comment tsd-typography"><p>The <code>beginRoot</code> parameter is an optional parameter of type
|
|
1151
|
-
<code>
|
|
1150
|
+
<code>N | null</code>. It represents the starting node from which to calculate the height of the binary tree.
|
|
1152
1151
|
If no value is provided for <code>beginRoot</code>, the function will use the <code>root</code> property of the class instance as</p>
|
|
1153
1152
|
</div>
|
|
1154
1153
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
@@ -1157,22 +1156,22 @@ If no value is provided for <code>beginRoot</code>, the function will use the <c
|
|
|
1157
1156
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1158
1157
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#getHeight">getHeight</a></p>
|
|
1159
1158
|
<ul>
|
|
1160
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1159
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L498">src/data-structures/binary-tree/abstract-binary-tree.ts:498</a></li></ul></aside></li></ul></section>
|
|
1161
1160
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getLeftMost" class="tsd-anchor"></a>
|
|
1162
1161
|
<h3 class="tsd-anchor-link"><span>get<wbr/>Left<wbr/>Most</span><a href="#getLeftMost" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1163
1162
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
1164
|
-
<li class="tsd-signature tsd-anchor-link" id="getLeftMost.getLeftMost-1"><span class="tsd-kind-call-signature">get<wbr/>Left<wbr/>Most</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1163
|
+
<li class="tsd-signature tsd-anchor-link" id="getLeftMost.getLeftMost-1"><span class="tsd-kind-call-signature">get<wbr/>Left<wbr/>Most</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><a href="#getLeftMost.getLeftMost-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1165
1164
|
<li class="tsd-description">
|
|
1166
1165
|
<div class="tsd-comment tsd-typography"><p>The <code>getLeftMost</code> function returns the leftmost node in a binary tree, either recursively or iteratively using tail
|
|
1167
1166
|
recursion optimization.</p>
|
|
1168
1167
|
</div>
|
|
1169
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1168
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h4><p>The <code>getLeftMost</code> function returns the leftmost node in a binary tree.</p>
|
|
1170
1169
|
|
|
1171
1170
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1172
1171
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#getLeftMost">getLeftMost</a></p>
|
|
1173
1172
|
<ul>
|
|
1174
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1175
|
-
<li class="tsd-signature tsd-anchor-link" id="getLeftMost.getLeftMost-2"><span class="tsd-kind-call-signature">get<wbr/>Left<wbr/>Most</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><
|
|
1173
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L685">src/data-structures/binary-tree/abstract-binary-tree.ts:685</a></li></ul></aside></li>
|
|
1174
|
+
<li class="tsd-signature tsd-anchor-link" id="getLeftMost.getLeftMost-2"><span class="tsd-kind-call-signature">get<wbr/>Left<wbr/>Most</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><a href="#getLeftMost.getLeftMost-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1176
1175
|
<li class="tsd-description">
|
|
1177
1176
|
<div class="tsd-comment tsd-typography"><p>The <code>getLeftMost</code> function returns the leftmost node in a binary tree, either recursively or iteratively using tail
|
|
1178
1177
|
recursion optimization.</p>
|
|
@@ -1181,17 +1180,17 @@ recursion optimization.</p>
|
|
|
1181
1180
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1182
1181
|
<ul class="tsd-parameter-list">
|
|
1183
1182
|
<li>
|
|
1184
|
-
<h5><span class="tsd-kind-parameter">node</span>: <
|
|
1185
|
-
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is an optional parameter of type <code>
|
|
1183
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1184
|
+
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is an optional parameter of type <code>N | null</code>. It represents the starting node from which to find the leftmost node in a binary tree. If no node is
|
|
1186
1185
|
provided, the function will use the root node of the binary tree.</p>
|
|
1187
1186
|
</div>
|
|
1188
1187
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1189
|
-
<h4 class="tsd-returns-title">Returns <
|
|
1188
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h4><p>The <code>getLeftMost</code> function returns the leftmost node in a binary tree.</p>
|
|
1190
1189
|
|
|
1191
1190
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1192
1191
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#getLeftMost">getLeftMost</a></p>
|
|
1193
1192
|
<ul>
|
|
1194
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1193
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L687">src/data-structures/binary-tree/abstract-binary-tree.ts:687</a></li></ul></aside></li></ul></section>
|
|
1195
1194
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getMinHeight" class="tsd-anchor"></a>
|
|
1196
1195
|
<h3 class="tsd-anchor-link"><span>get<wbr/>Min<wbr/>Height</span><a href="#getMinHeight" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1197
1196
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1204,9 +1203,9 @@ approach.</p>
|
|
|
1204
1203
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1205
1204
|
<ul class="tsd-parameter-list">
|
|
1206
1205
|
<li>
|
|
1207
|
-
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">beginRoot</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1206
|
+
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">beginRoot</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1208
1207
|
<div class="tsd-comment tsd-typography"><p>The <code>beginRoot</code> parameter is an optional parameter of type
|
|
1209
|
-
<code>
|
|
1208
|
+
<code>N | null</code>. It represents the starting node from which to calculate the minimum height of the binary
|
|
1210
1209
|
tree. If no value is provided for <code>beginRoot</code>, the function will use the root node of the binary tree.</p>
|
|
1211
1210
|
</div>
|
|
1212
1211
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
@@ -1215,11 +1214,11 @@ tree. If no value is provided for <code>beginRoot</code>, the function will use
|
|
|
1215
1214
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1216
1215
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#getMinHeight">getMinHeight</a></p>
|
|
1217
1216
|
<ul>
|
|
1218
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1217
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L547">src/data-structures/binary-tree/abstract-binary-tree.ts:547</a></li></ul></aside></li></ul></section>
|
|
1219
1218
|
<section class="tsd-panel tsd-member"><a id="getNodes" class="tsd-anchor"></a>
|
|
1220
1219
|
<h3 class="tsd-anchor-link"><span>get<wbr/>Nodes</span><a href="#getNodes" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1221
1220
|
<ul class="tsd-signatures">
|
|
1222
|
-
<li class="tsd-signature tsd-anchor-link" id="getNodes.getNodes-1"><span class="tsd-kind-call-signature">get<wbr/>Nodes</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">nodeProperty</span>, <span class="tsd-kind-parameter">propertyName</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">onlyOne</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><
|
|
1221
|
+
<li class="tsd-signature tsd-anchor-link" id="getNodes.getNodes-1"><span class="tsd-kind-call-signature">get<wbr/>Nodes</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">nodeProperty</span>, <span class="tsd-kind-parameter">propertyName</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">onlyOne</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span><a href="#getNodes.getNodes-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1223
1222
|
<li class="tsd-description">
|
|
1224
1223
|
<div class="tsd-comment tsd-typography"><p>The function <code>getNodes</code> returns an array of binary search tree nodes that match a given property value, with the
|
|
1225
1224
|
option to specify the property name and whether to return only one node.</p>
|
|
@@ -1228,9 +1227,9 @@ option to specify the property name and whether to return only one node.</p>
|
|
|
1228
1227
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1229
1228
|
<ul class="tsd-parameter-list">
|
|
1230
1229
|
<li>
|
|
1231
|
-
<h5><span class="tsd-kind-parameter">nodeProperty</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
1230
|
+
<h5><span class="tsd-kind-parameter">nodeProperty</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1232
1231
|
<div class="tsd-comment tsd-typography"><p>The <code>nodeProperty</code> parameter can be either a <code>BinaryTreeNodeId</code> or a
|
|
1233
|
-
generic type <code>
|
|
1232
|
+
generic type <code>N</code>. It represents the property value that you want to search for in the binary search tree.</p>
|
|
1234
1233
|
</div>
|
|
1235
1234
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
1236
1235
|
<li>
|
|
@@ -1247,16 +1246,16 @@ nodeProperty. If set to true, the function will stop traversing the tree and ret
|
|
|
1247
1246
|
to false or not provided, the function will return all nodes that match the given nodeProperty.</p>
|
|
1248
1247
|
</div>
|
|
1249
1248
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1250
|
-
<h4 class="tsd-returns-title">Returns <
|
|
1249
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4><p>an array of N objects.</p>
|
|
1251
1250
|
|
|
1252
1251
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1253
1252
|
<p>Overrides <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#getNodes">getNodes</a></p>
|
|
1254
1253
|
<ul>
|
|
1255
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1254
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/bst.ts#L213">src/data-structures/binary-tree/bst.ts:213</a></li></ul></aside></li></ul></section>
|
|
1256
1255
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getPathToRoot" class="tsd-anchor"></a>
|
|
1257
1256
|
<h3 class="tsd-anchor-link"><span>get<wbr/>Path<wbr/>To<wbr/>Root</span><a href="#getPathToRoot" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1258
1257
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
1259
|
-
<li class="tsd-signature tsd-anchor-link" id="getPathToRoot.getPathToRoot-1"><span class="tsd-kind-call-signature">get<wbr/>Path<wbr/>To<wbr/>Root</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><
|
|
1258
|
+
<li class="tsd-signature tsd-anchor-link" id="getPathToRoot.getPathToRoot-1"><span class="tsd-kind-call-signature">get<wbr/>Path<wbr/>To<wbr/>Root</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span><a href="#getPathToRoot.getPathToRoot-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1260
1259
|
<li class="tsd-description">
|
|
1261
1260
|
<div class="tsd-comment tsd-typography"><p>The function getPathToRoot returns an array of BinaryTreeNode objects representing the path from a given node to the
|
|
1262
1261
|
root of a binary tree.</p>
|
|
@@ -1265,21 +1264,21 @@ root of a binary tree.</p>
|
|
|
1265
1264
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1266
1265
|
<ul class="tsd-parameter-list">
|
|
1267
1266
|
<li>
|
|
1268
|
-
<h5><span class="tsd-kind-parameter">node</span>: <
|
|
1267
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1269
1268
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object.</p>
|
|
1270
1269
|
</div>
|
|
1271
1270
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1272
|
-
<h4 class="tsd-returns-title">Returns <
|
|
1271
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>getPathToRoot</code> returns an array of <code>N</code> objects, representing the path from
|
|
1273
1272
|
the given <code>node</code> to the root of the binary tree.</p>
|
|
1274
1273
|
|
|
1275
1274
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1276
1275
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#getPathToRoot">getPathToRoot</a></p>
|
|
1277
1276
|
<ul>
|
|
1278
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1277
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L675">src/data-structures/binary-tree/abstract-binary-tree.ts:675</a></li></ul></aside></li></ul></section>
|
|
1279
1278
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getPredecessor" class="tsd-anchor"></a>
|
|
1280
1279
|
<h3 class="tsd-anchor-link"><span>get<wbr/>Predecessor</span><a href="#getPredecessor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1281
1280
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
1282
|
-
<li class="tsd-signature tsd-anchor-link" id="getPredecessor.getPredecessor-1"><span class="tsd-kind-call-signature">get<wbr/>Predecessor</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><
|
|
1281
|
+
<li class="tsd-signature tsd-anchor-link" id="getPredecessor.getPredecessor-1"><span class="tsd-kind-call-signature">get<wbr/>Predecessor</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><a href="#getPredecessor.getPredecessor-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1283
1282
|
<li class="tsd-description">
|
|
1284
1283
|
<div class="tsd-comment tsd-typography"><p>The function returns the predecessor of a given node in a binary tree.</p>
|
|
1285
1284
|
</div>
|
|
@@ -1287,31 +1286,31 @@ the given <code>node</code> to the root of the binary tree.</p>
|
|
|
1287
1286
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1288
1287
|
<ul class="tsd-parameter-list">
|
|
1289
1288
|
<li>
|
|
1290
|
-
<h5><span class="tsd-kind-parameter">node</span>: <
|
|
1289
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1291
1290
|
<div class="tsd-comment tsd-typography"><p>The parameter <code>node</code> is a BinaryTreeNode object, representing a node in a binary tree.</p>
|
|
1292
1291
|
</div>
|
|
1293
1292
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1294
|
-
<h4 class="tsd-returns-title">Returns <
|
|
1293
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h4><p>the predecessor of the given node in a binary tree.</p>
|
|
1295
1294
|
|
|
1296
1295
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1297
1296
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#getPredecessor">getPredecessor</a></p>
|
|
1298
1297
|
<ul>
|
|
1299
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1298
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1205">src/data-structures/binary-tree/abstract-binary-tree.ts:1205</a></li></ul></aside></li></ul></section>
|
|
1300
1299
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getRightMost" class="tsd-anchor"></a>
|
|
1301
1300
|
<h3 class="tsd-anchor-link"><span>get<wbr/>Right<wbr/>Most</span><a href="#getRightMost" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1302
1301
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
1303
|
-
<li class="tsd-signature tsd-anchor-link" id="getRightMost.getRightMost-1"><span class="tsd-kind-call-signature">get<wbr/>Right<wbr/>Most</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1302
|
+
<li class="tsd-signature tsd-anchor-link" id="getRightMost.getRightMost-1"><span class="tsd-kind-call-signature">get<wbr/>Right<wbr/>Most</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><a href="#getRightMost.getRightMost-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1304
1303
|
<li class="tsd-description">
|
|
1305
1304
|
<div class="tsd-comment tsd-typography"><p>The <code>getRightMost</code> function returns the rightmost node in a binary tree, either recursively or iteratively using
|
|
1306
1305
|
tail recursion optimization.</p>
|
|
1307
1306
|
</div>
|
|
1308
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1307
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h4><p>The <code>getRightMost</code> function returns the rightmost node in a binary tree.</p>
|
|
1309
1308
|
|
|
1310
1309
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1311
1310
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#getRightMost">getRightMost</a></p>
|
|
1312
1311
|
<ul>
|
|
1313
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1314
|
-
<li class="tsd-signature tsd-anchor-link" id="getRightMost.getRightMost-2"><span class="tsd-kind-call-signature">get<wbr/>Right<wbr/>Most</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><
|
|
1312
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L720">src/data-structures/binary-tree/abstract-binary-tree.ts:720</a></li></ul></aside></li>
|
|
1313
|
+
<li class="tsd-signature tsd-anchor-link" id="getRightMost.getRightMost-2"><span class="tsd-kind-call-signature">get<wbr/>Right<wbr/>Most</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><a href="#getRightMost.getRightMost-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1315
1314
|
<li class="tsd-description">
|
|
1316
1315
|
<div class="tsd-comment tsd-typography"><p>The <code>getRightMost</code> function returns the rightmost node in a binary tree, either recursively or iteratively using
|
|
1317
1316
|
tail recursion optimization.</p>
|
|
@@ -1320,17 +1319,17 @@ tail recursion optimization.</p>
|
|
|
1320
1319
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1321
1320
|
<ul class="tsd-parameter-list">
|
|
1322
1321
|
<li>
|
|
1323
|
-
<h5><span class="tsd-kind-parameter">node</span>: <
|
|
1324
|
-
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is an optional parameter of type <code>
|
|
1322
|
+
<h5><span class="tsd-kind-parameter">node</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 starting node from which to find the rightmost node in a binary tree. If no node is
|
|
1325
1324
|
provided, the function will use the root node of the binary tree.</p>
|
|
1326
1325
|
</div>
|
|
1327
1326
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1328
|
-
<h4 class="tsd-returns-title">Returns <
|
|
1327
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h4><p>The <code>getRightMost</code> function returns the rightmost node in a binary tree.</p>
|
|
1329
1328
|
|
|
1330
1329
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1331
1330
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#getRightMost">getRightMost</a></p>
|
|
1332
1331
|
<ul>
|
|
1333
|
-
<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/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L722">src/data-structures/binary-tree/abstract-binary-tree.ts:722</a></li></ul></aside></li></ul></section>
|
|
1334
1333
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getSubTreeSizeAndCount" class="tsd-anchor"></a>
|
|
1335
1334
|
<h3 class="tsd-anchor-link"><span>get<wbr/>Sub<wbr/>Tree<wbr/>Size<wbr/>And<wbr/>Count</span><a href="#getSubTreeSizeAndCount" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1336
1335
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1343,7 +1342,7 @@ traversal.</p>
|
|
|
1343
1342
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1344
1343
|
<ul class="tsd-parameter-list">
|
|
1345
1344
|
<li>
|
|
1346
|
-
<h5><span class="tsd-kind-parameter">subTreeRoot</span>: <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1345
|
+
<h5><span class="tsd-kind-parameter">subTreeRoot</span>: <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1347
1346
|
<div class="tsd-comment tsd-typography"><p>The <code>subTreeRoot</code> parameter is the root node of a binary
|
|
1348
1347
|
tree.</p>
|
|
1349
1348
|
</div>
|
|
@@ -1354,7 +1353,7 @@ represents the size of the subtree, and the second element represents the count
|
|
|
1354
1353
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1355
1354
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#getSubTreeSizeAndCount">getSubTreeSizeAndCount</a></p>
|
|
1356
1355
|
<ul>
|
|
1357
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1356
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L799">src/data-structures/binary-tree/abstract-binary-tree.ts:799</a></li></ul></aside></li></ul></section>
|
|
1358
1357
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="has" class="tsd-anchor"></a>
|
|
1359
1358
|
<h3 class="tsd-anchor-link"><span>has</span><a href="#has" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1360
1359
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1367,9 +1366,9 @@ property.</p>
|
|
|
1367
1366
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1368
1367
|
<ul class="tsd-parameter-list">
|
|
1369
1368
|
<li>
|
|
1370
|
-
<h5><span class="tsd-kind-parameter">nodeProperty</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
1369
|
+
<h5><span class="tsd-kind-parameter">nodeProperty</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1371
1370
|
<div class="tsd-comment tsd-typography"><p>The <code>nodeProperty</code> parameter can be either a <code>BinaryTreeNodeId</code> or a
|
|
1372
|
-
generic type <code>
|
|
1371
|
+
generic type <code>N</code>. It represents the property of a binary tree node that you want to check.</p>
|
|
1373
1372
|
</div>
|
|
1374
1373
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
1375
1374
|
<li>
|
|
@@ -1383,7 +1382,7 @@ specifies the name of the property to check for in the nodes.</p>
|
|
|
1383
1382
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1384
1383
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#has">has</a></p>
|
|
1385
1384
|
<ul>
|
|
1386
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1385
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L650">src/data-structures/binary-tree/abstract-binary-tree.ts:650</a></li></ul></aside></li></ul></section>
|
|
1387
1386
|
<section class="tsd-panel tsd-member"><a id="isAVLBalanced" class="tsd-anchor"></a>
|
|
1388
1387
|
<h3 class="tsd-anchor-link"><span>isAVLBalanced</span><a href="#isAVLBalanced" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1389
1388
|
<ul class="tsd-signatures">
|
|
@@ -1396,7 +1395,7 @@ is balanced according to the AVL tree property, and <code>false</code> otherwise
|
|
|
1396
1395
|
|
|
1397
1396
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1398
1397
|
<ul>
|
|
1399
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1398
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/bst.ts#L433">src/data-structures/binary-tree/bst.ts:433</a></li></ul></aside></li></ul></section>
|
|
1400
1399
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="isBST" class="tsd-anchor"></a>
|
|
1401
1400
|
<h3 class="tsd-anchor-link"><span>isBST</span><a href="#isBST" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1402
1401
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1408,8 +1407,8 @@ is balanced according to the AVL tree property, and <code>false</code> otherwise
|
|
|
1408
1407
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1409
1408
|
<ul class="tsd-parameter-list">
|
|
1410
1409
|
<li>
|
|
1411
|
-
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1412
|
-
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is an optional parameter of type <code>
|
|
1410
|
+
<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>
|
|
1411
|
+
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is an optional parameter of type <code>N | null</code>. It represents the root node of the binary search tree (BST) that we want to check for validity. If no node
|
|
1413
1412
|
is provided, the function will default to using the root node of the BST instance that</p>
|
|
1414
1413
|
</div>
|
|
1415
1414
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
@@ -1419,7 +1418,7 @@ tree, and <code>false</code> otherwise.</p>
|
|
|
1419
1418
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1420
1419
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#isBST">isBST</a></p>
|
|
1421
1420
|
<ul>
|
|
1422
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1421
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L762">src/data-structures/binary-tree/abstract-binary-tree.ts:762</a></li></ul></aside></li></ul></section>
|
|
1423
1422
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="isBalanced" class="tsd-anchor"></a>
|
|
1424
1423
|
<h3 class="tsd-anchor-link"><span>is<wbr/>Balanced</span><a href="#isBalanced" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1425
1424
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1431,9 +1430,9 @@ tree, and <code>false</code> otherwise.</p>
|
|
|
1431
1430
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1432
1431
|
<ul class="tsd-parameter-list">
|
|
1433
1432
|
<li>
|
|
1434
|
-
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">beginRoot</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1433
|
+
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">beginRoot</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1435
1434
|
<div class="tsd-comment tsd-typography"><p>The <code>beginRoot</code> parameter is the root node of a binary tree. It is
|
|
1436
|
-
of type <code>
|
|
1435
|
+
of type <code>N | null</code>, which means it can either be a <code>BinaryTreeNode</code> object or <code>null</code>.</p>
|
|
1437
1436
|
</div>
|
|
1438
1437
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1439
1438
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>The method is returning a boolean value.</p>
|
|
@@ -1441,7 +1440,7 @@ of type <code>BinaryTreeNode<T> | null</code>, which means it can either b
|
|
|
1441
1440
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1442
1441
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#isBalanced">isBalanced</a></p>
|
|
1443
1442
|
<ul>
|
|
1444
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1443
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L595">src/data-structures/binary-tree/abstract-binary-tree.ts:595</a></li></ul></aside></li></ul></section>
|
|
1445
1444
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="isEmpty" class="tsd-anchor"></a>
|
|
1446
1445
|
<h3 class="tsd-anchor-link"><span>is<wbr/>Empty</span><a href="#isEmpty" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1447
1446
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1454,7 +1453,7 @@ of type <code>BinaryTreeNode<T> | null</code>, which means it can either b
|
|
|
1454
1453
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1455
1454
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#isEmpty">isEmpty</a></p>
|
|
1456
1455
|
<ul>
|
|
1457
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1456
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L257">src/data-structures/binary-tree/abstract-binary-tree.ts:257</a></li></ul></aside></li></ul></section>
|
|
1458
1457
|
<section class="tsd-panel tsd-member"><a id="lastKey" class="tsd-anchor"></a>
|
|
1459
1458
|
<h3 class="tsd-anchor-link"><span>last<wbr/>Key</span><a href="#lastKey" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1460
1459
|
<ul class="tsd-signatures">
|
|
@@ -1470,7 +1469,7 @@ there are no nodes in</p>
|
|
|
1470
1469
|
|
|
1471
1470
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1472
1471
|
<ul>
|
|
1473
|
-
<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/860d18d/src/data-structures/binary-tree/bst.ts#L136">src/data-structures/binary-tree/bst.ts:136</a></li></ul></aside></li></ul></section>
|
|
1474
1473
|
<section class="tsd-panel tsd-member"><a id="lesserSum" class="tsd-anchor"></a>
|
|
1475
1474
|
<h3 class="tsd-anchor-link"><span>lesser<wbr/>Sum</span><a href="#lesserSum" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1476
1475
|
<ul class="tsd-signatures">
|
|
@@ -1499,7 +1498,7 @@ binary search tree that have a property value lesser than the given <code>id</co
|
|
|
1499
1498
|
|
|
1500
1499
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1501
1500
|
<ul>
|
|
1502
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1501
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/bst.ts#L264">src/data-structures/binary-tree/bst.ts:264</a></li></ul></aside></li></ul></section>
|
|
1503
1502
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="levelIterative" class="tsd-anchor"></a>
|
|
1504
1503
|
<h3 class="tsd-anchor-link"><span>level<wbr/>Iterative</span><a href="#levelIterative" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1505
1504
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1512,18 +1511,18 @@ in an array, based on a specified property name.</p>
|
|
|
1512
1511
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1513
1512
|
<ul class="tsd-parameter-list">
|
|
1514
1513
|
<li>
|
|
1515
|
-
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1514
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1516
1515
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object representing the starting
|
|
1517
1516
|
node for the level order traversal. It can be null if no specific node is provided, in which case the root node of
|
|
1518
1517
|
the tree is used as the starting node.</p>
|
|
1519
1518
|
</div>
|
|
1520
1519
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1521
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>levelIterative</code> returns an object of type <code>
|
|
1520
|
+
<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>AbstractResultsByProperty<N></code>.</p>
|
|
1522
1521
|
|
|
1523
1522
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1524
1523
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#levelIterative">levelIterative</a></p>
|
|
1525
1524
|
<ul>
|
|
1526
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1525
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1082">src/data-structures/binary-tree/abstract-binary-tree.ts:1082</a></li></ul></aside></li>
|
|
1527
1526
|
<li class="tsd-signature tsd-anchor-link" id="levelIterative.levelIterative-2"><span class="tsd-kind-call-signature">level<wbr/>Iterative</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><a href="#levelIterative.levelIterative-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1528
1527
|
<li class="tsd-description">
|
|
1529
1528
|
<div class="tsd-comment tsd-typography"><p>The <code>levelIterative</code> function performs a level-order traversal on a binary tree and returns the values of the nodes
|
|
@@ -1533,7 +1532,7 @@ in an array, based on a specified property name.</p>
|
|
|
1533
1532
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1534
1533
|
<ul class="tsd-parameter-list">
|
|
1535
1534
|
<li>
|
|
1536
|
-
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1535
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1537
1536
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object representing the starting
|
|
1538
1537
|
node for the level order traversal. It can be null if no specific node is provided, in which case the root node of
|
|
1539
1538
|
the tree is used as the starting node.</p>
|
|
@@ -1547,13 +1546,13 @@ will accumulate results based on that property. If no property name is provided,
|
|
|
1547
1546
|
accumulating results</p>
|
|
1548
1547
|
</div>
|
|
1549
1548
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1550
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>levelIterative</code> returns an object of type <code>
|
|
1549
|
+
<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>AbstractResultsByProperty<N></code>.</p>
|
|
1551
1550
|
|
|
1552
1551
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1553
1552
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#levelIterative">levelIterative</a></p>
|
|
1554
1553
|
<ul>
|
|
1555
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1556
|
-
<li class="tsd-signature tsd-anchor-link" id="levelIterative.levelIterative-3"><span class="tsd-kind-call-signature">level<wbr/>Iterative</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
1554
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1084">src/data-structures/binary-tree/abstract-binary-tree.ts:1084</a></li></ul></aside></li>
|
|
1555
|
+
<li class="tsd-signature tsd-anchor-link" id="levelIterative.levelIterative-3"><span class="tsd-kind-call-signature">level<wbr/>Iterative</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[]</span><a href="#levelIterative.levelIterative-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1557
1556
|
<li class="tsd-description">
|
|
1558
1557
|
<div class="tsd-comment tsd-typography"><p>The <code>levelIterative</code> function performs a level-order traversal on a binary tree and returns the values of the nodes
|
|
1559
1558
|
in an array, based on a specified property name.</p>
|
|
@@ -1562,7 +1561,7 @@ in an array, based on a specified property name.</p>
|
|
|
1562
1561
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1563
1562
|
<ul class="tsd-parameter-list">
|
|
1564
1563
|
<li>
|
|
1565
|
-
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1564
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1566
1565
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object representing the starting
|
|
1567
1566
|
node for the level order traversal. It can be null if no specific node is provided, in which case the root node of
|
|
1568
1567
|
the tree is used as the starting node.</p>
|
|
@@ -1576,13 +1575,13 @@ will accumulate results based on that property. If no property name is provided,
|
|
|
1576
1575
|
accumulating results</p>
|
|
1577
1576
|
</div>
|
|
1578
1577
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1579
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">
|
|
1578
|
+
<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>AbstractResultsByProperty<N></code>.</p>
|
|
1580
1579
|
|
|
1581
1580
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1582
1581
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#levelIterative">levelIterative</a></p>
|
|
1583
1582
|
<ul>
|
|
1584
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1585
|
-
<li class="tsd-signature tsd-anchor-link" id="levelIterative.levelIterative-4"><span class="tsd-kind-call-signature">level<wbr/>Iterative</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><
|
|
1583
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1086">src/data-structures/binary-tree/abstract-binary-tree.ts:1086</a></li></ul></aside></li>
|
|
1584
|
+
<li class="tsd-signature tsd-anchor-link" id="levelIterative.levelIterative-4"><span class="tsd-kind-call-signature">level<wbr/>Iterative</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span><a href="#levelIterative.levelIterative-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1586
1585
|
<li class="tsd-description">
|
|
1587
1586
|
<div class="tsd-comment tsd-typography"><p>The <code>levelIterative</code> function performs a level-order traversal on a binary tree and returns the values of the nodes
|
|
1588
1587
|
in an array, based on a specified property name.</p>
|
|
@@ -1591,7 +1590,7 @@ in an array, based on a specified property name.</p>
|
|
|
1591
1590
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1592
1591
|
<ul class="tsd-parameter-list">
|
|
1593
1592
|
<li>
|
|
1594
|
-
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1593
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1595
1594
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object representing the starting
|
|
1596
1595
|
node for the level order traversal. It can be null if no specific node is provided, in which case the root node of
|
|
1597
1596
|
the tree is used as the starting node.</p>
|
|
@@ -1605,12 +1604,12 @@ will accumulate results based on that property. If no property name is provided,
|
|
|
1605
1604
|
accumulating results</p>
|
|
1606
1605
|
</div>
|
|
1607
1606
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1608
|
-
<h4 class="tsd-returns-title">Returns <
|
|
1607
|
+
<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>AbstractResultsByProperty<N></code>.</p>
|
|
1609
1608
|
|
|
1610
1609
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1611
1610
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#levelIterative">levelIterative</a></p>
|
|
1612
1611
|
<ul>
|
|
1613
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1612
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1088">src/data-structures/binary-tree/abstract-binary-tree.ts:1088</a></li></ul></aside></li>
|
|
1614
1613
|
<li class="tsd-signature tsd-anchor-link" id="levelIterative.levelIterative-5"><span class="tsd-kind-call-signature">level<wbr/>Iterative</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><a href="#levelIterative.levelIterative-5" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1615
1614
|
<li class="tsd-description">
|
|
1616
1615
|
<div class="tsd-comment tsd-typography"><p>The <code>levelIterative</code> function performs a level-order traversal on a binary tree and returns the values of the nodes
|
|
@@ -1620,7 +1619,7 @@ in an array, based on a specified property name.</p>
|
|
|
1620
1619
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1621
1620
|
<ul class="tsd-parameter-list">
|
|
1622
1621
|
<li>
|
|
1623
|
-
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1622
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1624
1623
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object representing the starting
|
|
1625
1624
|
node for the level order traversal. It can be null if no specific node is provided, in which case the root node of
|
|
1626
1625
|
the tree is used as the starting node.</p>
|
|
@@ -1634,12 +1633,12 @@ will accumulate results based on that property. If no property name is provided,
|
|
|
1634
1633
|
accumulating results</p>
|
|
1635
1634
|
</div>
|
|
1636
1635
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1637
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>levelIterative</code> returns an object of type <code>
|
|
1636
|
+
<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>AbstractResultsByProperty<N></code>.</p>
|
|
1638
1637
|
|
|
1639
1638
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1640
1639
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#levelIterative">levelIterative</a></p>
|
|
1641
1640
|
<ul>
|
|
1642
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1641
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1090">src/data-structures/binary-tree/abstract-binary-tree.ts:1090</a></li></ul></aside></li></ul></section>
|
|
1643
1642
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="listLevels" class="tsd-anchor"></a>
|
|
1644
1643
|
<h3 class="tsd-anchor-link"><span>list<wbr/>Levels</span><a href="#listLevels" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1645
1644
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1651,17 +1650,17 @@ accumulating results</p>
|
|
|
1651
1650
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1652
1651
|
<ul class="tsd-parameter-list">
|
|
1653
1652
|
<li>
|
|
1654
|
-
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1653
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1655
1654
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object or null. It represents the
|
|
1656
1655
|
root node of a binary tree. If it is null, the function will use the root node of the current binary tree instance.</p>
|
|
1657
1656
|
</div>
|
|
1658
1657
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1659
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>listLevels</code> returns a 2D array of <code>
|
|
1658
|
+
<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>AbstractResultByProperty<N></code> objects.</p>
|
|
1660
1659
|
|
|
1661
1660
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1662
1661
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#listLevels">listLevels</a></p>
|
|
1663
1662
|
<ul>
|
|
1664
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1663
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1128">src/data-structures/binary-tree/abstract-binary-tree.ts:1128</a></li></ul></aside></li>
|
|
1665
1664
|
<li class="tsd-signature tsd-anchor-link" id="listLevels.listLevels-2"><span class="tsd-kind-call-signature">list<wbr/>Levels</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span><a href="#listLevels.listLevels-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1666
1665
|
<li class="tsd-description">
|
|
1667
1666
|
<div class="tsd-comment tsd-typography"><p>The <code>listLevels</code> function collects nodes from a binary tree by a specified property and organizes them into levels.</p>
|
|
@@ -1670,7 +1669,7 @@ root node of a binary tree. If it is null, the function will use the root node o
|
|
|
1670
1669
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1671
1670
|
<ul class="tsd-parameter-list">
|
|
1672
1671
|
<li>
|
|
1673
|
-
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1672
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1674
1673
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object or null. It represents the
|
|
1675
1674
|
root node of a binary tree. If it is null, the function will use the root node of the current binary tree instance.</p>
|
|
1676
1675
|
</div>
|
|
@@ -1682,13 +1681,13 @@ specifies the property of the <code>BinaryTreeNode</code> object to collect at e
|
|
|
1682
1681
|
values:</p>
|
|
1683
1682
|
</div>
|
|
1684
1683
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1685
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>listLevels</code> returns a 2D array of <code>
|
|
1684
|
+
<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>AbstractResultByProperty<N></code> objects.</p>
|
|
1686
1685
|
|
|
1687
1686
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1688
1687
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#listLevels">listLevels</a></p>
|
|
1689
1688
|
<ul>
|
|
1690
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1691
|
-
<li class="tsd-signature tsd-anchor-link" id="listLevels.listLevels-3"><span class="tsd-kind-call-signature">list<wbr/>Levels</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
1689
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1130">src/data-structures/binary-tree/abstract-binary-tree.ts:1130</a></li></ul></aside></li>
|
|
1690
|
+
<li class="tsd-signature tsd-anchor-link" id="listLevels.listLevels-3"><span class="tsd-kind-call-signature">list<wbr/>Levels</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span><a href="#listLevels.listLevels-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1692
1691
|
<li class="tsd-description">
|
|
1693
1692
|
<div class="tsd-comment tsd-typography"><p>The <code>listLevels</code> function collects nodes from a binary tree by a specified property and organizes them into levels.</p>
|
|
1694
1693
|
</div>
|
|
@@ -1696,7 +1695,7 @@ values:</p>
|
|
|
1696
1695
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1697
1696
|
<ul class="tsd-parameter-list">
|
|
1698
1697
|
<li>
|
|
1699
|
-
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1698
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1700
1699
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object or null. It represents the
|
|
1701
1700
|
root node of a binary tree. If it is null, the function will use the root node of the current binary tree instance.</p>
|
|
1702
1701
|
</div>
|
|
@@ -1708,13 +1707,13 @@ specifies the property of the <code>BinaryTreeNode</code> object to collect at e
|
|
|
1708
1707
|
values:</p>
|
|
1709
1708
|
</div>
|
|
1710
1709
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1711
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">
|
|
1710
|
+
<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>AbstractResultByProperty<N></code> objects.</p>
|
|
1712
1711
|
|
|
1713
1712
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1714
1713
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#listLevels">listLevels</a></p>
|
|
1715
1714
|
<ul>
|
|
1716
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1717
|
-
<li class="tsd-signature tsd-anchor-link" id="listLevels.listLevels-4"><span class="tsd-kind-call-signature">list<wbr/>Levels</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><
|
|
1715
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1132">src/data-structures/binary-tree/abstract-binary-tree.ts:1132</a></li></ul></aside></li>
|
|
1716
|
+
<li class="tsd-signature tsd-anchor-link" id="listLevels.listLevels-4"><span class="tsd-kind-call-signature">list<wbr/>Levels</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span><a href="#listLevels.listLevels-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1718
1717
|
<li class="tsd-description">
|
|
1719
1718
|
<div class="tsd-comment tsd-typography"><p>The <code>listLevels</code> function collects nodes from a binary tree by a specified property and organizes them into levels.</p>
|
|
1720
1719
|
</div>
|
|
@@ -1722,7 +1721,7 @@ values:</p>
|
|
|
1722
1721
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1723
1722
|
<ul class="tsd-parameter-list">
|
|
1724
1723
|
<li>
|
|
1725
|
-
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1724
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1726
1725
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object or null. It represents the
|
|
1727
1726
|
root node of a binary tree. If it is null, the function will use the root node of the current binary tree instance.</p>
|
|
1728
1727
|
</div>
|
|
@@ -1734,12 +1733,12 @@ specifies the property of the <code>BinaryTreeNode</code> object to collect at e
|
|
|
1734
1733
|
values:</p>
|
|
1735
1734
|
</div>
|
|
1736
1735
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1737
|
-
<h4 class="tsd-returns-title">Returns <
|
|
1736
|
+
<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>AbstractResultByProperty<N></code> objects.</p>
|
|
1738
1737
|
|
|
1739
1738
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1740
1739
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#listLevels">listLevels</a></p>
|
|
1741
1740
|
<ul>
|
|
1742
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1741
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1134">src/data-structures/binary-tree/abstract-binary-tree.ts:1134</a></li></ul></aside></li>
|
|
1743
1742
|
<li class="tsd-signature tsd-anchor-link" id="listLevels.listLevels-5"><span class="tsd-kind-call-signature">list<wbr/>Levels</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span><a href="#listLevels.listLevels-5" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1744
1743
|
<li class="tsd-description">
|
|
1745
1744
|
<div class="tsd-comment tsd-typography"><p>The <code>listLevels</code> function collects nodes from a binary tree by a specified property and organizes them into levels.</p>
|
|
@@ -1748,7 +1747,7 @@ values:</p>
|
|
|
1748
1747
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1749
1748
|
<ul class="tsd-parameter-list">
|
|
1750
1749
|
<li>
|
|
1751
|
-
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1750
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1752
1751
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object or null. It represents the
|
|
1753
1752
|
root node of a binary tree. If it is null, the function will use the root node of the current binary tree instance.</p>
|
|
1754
1753
|
</div>
|
|
@@ -1760,12 +1759,12 @@ specifies the property of the <code>BinaryTreeNode</code> object to collect at e
|
|
|
1760
1759
|
values:</p>
|
|
1761
1760
|
</div>
|
|
1762
1761
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1763
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>listLevels</code> returns a 2D array of <code>
|
|
1762
|
+
<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>AbstractResultByProperty<N></code> objects.</p>
|
|
1764
1763
|
|
|
1765
1764
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1766
1765
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#listLevels">listLevels</a></p>
|
|
1767
1766
|
<ul>
|
|
1768
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1767
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1136">src/data-structures/binary-tree/abstract-binary-tree.ts:1136</a></li></ul></aside></li></ul></section>
|
|
1769
1768
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="morris" class="tsd-anchor"></a>
|
|
1770
1769
|
<h3 class="tsd-anchor-link"><span>morris</span><a href="#morris" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1771
1770
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1776,12 +1775,12 @@ traversal algorithm and returns the results based on the specified property name
|
|
|
1776
1775
|
The time complexity of Morris traversal is O(n), it's may slower than others
|
|
1777
1776
|
The space complexity Morris traversal is O(1) because no using stack</p>
|
|
1778
1777
|
</div>
|
|
1779
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>morris</code> returns an object of type <code>
|
|
1778
|
+
<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>AbstractResultsByProperty<N></code>.</p>
|
|
1780
1779
|
|
|
1781
1780
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1782
1781
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#morris">morris</a></p>
|
|
1783
1782
|
<ul>
|
|
1784
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1783
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1219">src/data-structures/binary-tree/abstract-binary-tree.ts:1219</a></li></ul></aside></li>
|
|
1785
1784
|
<li class="tsd-signature tsd-anchor-link" id="morris.morris-2"><span class="tsd-kind-call-signature">morris</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><a href="#morris.morris-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1786
1785
|
<li class="tsd-description">
|
|
1787
1786
|
<div class="tsd-comment tsd-typography"><p>The <code>morris</code> function performs an in-order, pre-order, or post-order traversal on a binary tree using the Morris
|
|
@@ -1805,13 +1804,13 @@ property of the nodes that you want to retrieve in the results. It can be either
|
|
|
1805
1804
|
property. If not provided, it defaults to <code>'id'</code>.</p>
|
|
1806
1805
|
</div>
|
|
1807
1806
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1808
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>morris</code> returns an object of type <code>
|
|
1807
|
+
<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>AbstractResultsByProperty<N></code>.</p>
|
|
1809
1808
|
|
|
1810
1809
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1811
1810
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#morris">morris</a></p>
|
|
1812
1811
|
<ul>
|
|
1813
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1814
|
-
<li class="tsd-signature tsd-anchor-link" id="morris.morris-3"><span class="tsd-kind-call-signature">morris</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
1812
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1221">src/data-structures/binary-tree/abstract-binary-tree.ts:1221</a></li></ul></aside></li>
|
|
1813
|
+
<li class="tsd-signature tsd-anchor-link" id="morris.morris-3"><span class="tsd-kind-call-signature">morris</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span><a href="#morris.morris-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1815
1814
|
<li class="tsd-description">
|
|
1816
1815
|
<div class="tsd-comment tsd-typography"><p>The <code>morris</code> function performs an in-order, pre-order, or post-order traversal on a binary tree using the Morris
|
|
1817
1816
|
traversal algorithm and returns the results based on the specified property name.
|
|
@@ -1834,13 +1833,13 @@ property of the nodes that you want to retrieve in the results. It can be either
|
|
|
1834
1833
|
property. If not provided, it defaults to <code>'id'</code>.</p>
|
|
1835
1834
|
</div>
|
|
1836
1835
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1837
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">
|
|
1836
|
+
<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>AbstractResultsByProperty<N></code>.</p>
|
|
1838
1837
|
|
|
1839
1838
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1840
1839
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#morris">morris</a></p>
|
|
1841
1840
|
<ul>
|
|
1842
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1843
|
-
<li class="tsd-signature tsd-anchor-link" id="morris.morris-4"><span class="tsd-kind-call-signature">morris</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><
|
|
1841
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1223">src/data-structures/binary-tree/abstract-binary-tree.ts:1223</a></li></ul></aside></li>
|
|
1842
|
+
<li class="tsd-signature tsd-anchor-link" id="morris.morris-4"><span class="tsd-kind-call-signature">morris</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span><a href="#morris.morris-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1844
1843
|
<li class="tsd-description">
|
|
1845
1844
|
<div class="tsd-comment tsd-typography"><p>The <code>morris</code> function performs an in-order, pre-order, or post-order traversal on a binary tree using the Morris
|
|
1846
1845
|
traversal algorithm and returns the results based on the specified property name.
|
|
@@ -1863,12 +1862,12 @@ property of the nodes that you want to retrieve in the results. It can be either
|
|
|
1863
1862
|
property. If not provided, it defaults to <code>'id'</code>.</p>
|
|
1864
1863
|
</div>
|
|
1865
1864
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1866
|
-
<h4 class="tsd-returns-title">Returns <
|
|
1865
|
+
<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>AbstractResultsByProperty<N></code>.</p>
|
|
1867
1866
|
|
|
1868
1867
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1869
1868
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#morris">morris</a></p>
|
|
1870
1869
|
<ul>
|
|
1871
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1870
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1225">src/data-structures/binary-tree/abstract-binary-tree.ts:1225</a></li></ul></aside></li>
|
|
1872
1871
|
<li class="tsd-signature tsd-anchor-link" id="morris.morris-5"><span class="tsd-kind-call-signature">morris</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><a href="#morris.morris-5" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1873
1872
|
<li class="tsd-description">
|
|
1874
1873
|
<div class="tsd-comment tsd-typography"><p>The <code>morris</code> function performs an in-order, pre-order, or post-order traversal on a binary tree using the Morris
|
|
@@ -1892,16 +1891,16 @@ property of the nodes that you want to retrieve in the results. It can be either
|
|
|
1892
1891
|
property. If not provided, it defaults to <code>'id'</code>.</p>
|
|
1893
1892
|
</div>
|
|
1894
1893
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1895
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>morris</code> returns an object of type <code>
|
|
1894
|
+
<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>AbstractResultsByProperty<N></code>.</p>
|
|
1896
1895
|
|
|
1897
1896
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1898
1897
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#morris">morris</a></p>
|
|
1899
1898
|
<ul>
|
|
1900
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1899
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1227">src/data-structures/binary-tree/abstract-binary-tree.ts:1227</a></li></ul></aside></li></ul></section>
|
|
1901
1900
|
<section class="tsd-panel tsd-member"><a id="remove" class="tsd-anchor"></a>
|
|
1902
1901
|
<h3 class="tsd-anchor-link"><span>remove</span><a href="#remove" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1903
1902
|
<ul class="tsd-signatures">
|
|
1904
|
-
<li class="tsd-signature tsd-anchor-link" id="remove.remove-1"><span class="tsd-kind-call-signature">remove</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">id</span>, <span class="tsd-kind-parameter">ignoreCount</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../types/
|
|
1903
|
+
<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/BinaryTreeDeletedResult.html" class="tsd-signature-type tsd-kind-type-alias">BinaryTreeDeletedResult</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">[]</span><a href="#remove.remove-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1905
1904
|
<li class="tsd-description">
|
|
1906
1905
|
<div class="tsd-comment tsd-typography"><p>The <code>remove</code> function in this TypeScript code removes a node from a binary search tree and returns information about
|
|
1907
1906
|
the deleted node and any nodes that need to be balanced.</p>
|
|
@@ -1922,12 +1921,12 @@ set to true, the count of the node will not be considered and the node will be r
|
|
|
1922
1921
|
set to false or not provided, the count of the node will be taken into account and the</p>
|
|
1923
1922
|
</div>
|
|
1924
1923
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1925
|
-
<h4 class="tsd-returns-title">Returns <a href="../types/
|
|
1924
|
+
<h4 class="tsd-returns-title">Returns <a href="../types/BinaryTreeDeletedResult.html" class="tsd-signature-type tsd-kind-type-alias">BinaryTreeDeletedResult</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">[]</span></h4><p>an array of <code>BSTDeletedResult<N></code> objects.</p>
|
|
1926
1925
|
|
|
1927
1926
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1928
1927
|
<p>Overrides <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#remove">remove</a></p>
|
|
1929
1928
|
<ul>
|
|
1930
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1929
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/bst.ts#L152">src/data-structures/binary-tree/bst.ts:152</a></li></ul></aside></li></ul></section>
|
|
1931
1930
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="setVisitedCount" class="tsd-anchor"></a>
|
|
1932
1931
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>set<wbr/>Visited<wbr/>Count</span><a href="#setVisitedCount" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1933
1932
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -1941,7 +1940,7 @@ set to false or not provided, the count of the node will be taken into account a
|
|
|
1941
1940
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
1942
1941
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#setVisitedCount">setVisitedCount</a></p>
|
|
1943
1942
|
<ul>
|
|
1944
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1943
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1343">src/data-structures/binary-tree/abstract-binary-tree.ts:1343</a></li></ul></aside></li></ul></section>
|
|
1945
1944
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="subTreeAdd" class="tsd-anchor"></a>
|
|
1946
1945
|
<h3 class="tsd-anchor-link"><span>sub<wbr/>Tree<wbr/>Add</span><a href="#subTreeAdd" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1947
1946
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1953,7 +1952,7 @@ set to false or not provided, the count of the node will be taken into account a
|
|
|
1953
1952
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1954
1953
|
<ul class="tsd-parameter-list">
|
|
1955
1954
|
<li>
|
|
1956
|
-
<h5><span class="tsd-kind-parameter">subTreeRoot</span>: <
|
|
1955
|
+
<h5><span class="tsd-kind-parameter">subTreeRoot</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1957
1956
|
<div class="tsd-comment tsd-typography"><p>The <code>subTreeRoot</code> parameter is the root node of the subtree where the values will be modified.</p>
|
|
1958
1957
|
</div>
|
|
1959
1958
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
@@ -1974,7 +1973,7 @@ specifies the property of the <code>BinaryTreeNode</code> that should be modifie
|
|
|
1974
1973
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1975
1974
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#subTreeAdd">subTreeAdd</a></p>
|
|
1976
1975
|
<ul>
|
|
1977
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1976
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L896">src/data-structures/binary-tree/abstract-binary-tree.ts:896</a></li></ul></aside></li></ul></section>
|
|
1978
1977
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="subTreeSum" class="tsd-anchor"></a>
|
|
1979
1978
|
<h3 class="tsd-anchor-link"><span>sub<wbr/>Tree<wbr/>Sum</span><a href="#subTreeSum" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1980
1979
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1987,7 +1986,7 @@ iteratively.</p>
|
|
|
1987
1986
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1988
1987
|
<ul class="tsd-parameter-list">
|
|
1989
1988
|
<li>
|
|
1990
|
-
<h5><span class="tsd-kind-parameter">subTreeRoot</span>: <
|
|
1989
|
+
<h5><span class="tsd-kind-parameter">subTreeRoot</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1991
1990
|
<div class="tsd-comment tsd-typography"><p>The subTreeRoot parameter is the root node of the subtree for which you want to calculate the
|
|
1992
1991
|
sum.</p>
|
|
1993
1992
|
</div>
|
|
@@ -2004,7 +2003,7 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
2004
2003
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
2005
2004
|
<p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#subTreeSum">subTreeSum</a></p>
|
|
2006
2005
|
<ul>
|
|
2007
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
2006
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/860d18d/src/data-structures/binary-tree/abstract-binary-tree.ts#L840">src/data-structures/binary-tree/abstract-binary-tree.ts:840</a></li></ul></aside></li></ul></section></section></div>
|
|
2008
2007
|
<div class="col-sidebar">
|
|
2009
2008
|
<div class="page-menu">
|
|
2010
2009
|
<div class="tsd-navigation settings">
|
|
@@ -2043,6 +2042,7 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
2043
2042
|
<li><a href="#DFSIterative" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>DFSIterative</span></a></li>
|
|
2044
2043
|
<li><a href="#_accumulatedByPropertyName" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_accumulated<wbr/>By<wbr/>Property<wbr/>Name</span></a></li>
|
|
2045
2044
|
<li><a href="#_compare" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_compare</span></a></li>
|
|
2045
|
+
<li><a href="#_createNode" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_create<wbr/>Node</span></a></li>
|
|
2046
2046
|
<li><a href="#_getResultByPropertyName" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_get<wbr/>Result<wbr/>By<wbr/>Property<wbr/>Name</span></a></li>
|
|
2047
2047
|
<li><a href="#_pushByPropertyNameStopOrNot" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_push<wbr/>By<wbr/>Property<wbr/>Name<wbr/>Stop<wbr/>Or<wbr/>Not</span></a></li>
|
|
2048
2048
|
<li><a href="#_resetResults" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_reset<wbr/>Results</span></a></li>
|
|
@@ -2063,7 +2063,6 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
2063
2063
|
<li><a href="#allGreaterNodesAdd" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>all<wbr/>Greater<wbr/>Nodes<wbr/>Add</span></a></li>
|
|
2064
2064
|
<li><a href="#balance" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>balance</span></a></li>
|
|
2065
2065
|
<li><a href="#clear" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>clear</span></a></li>
|
|
2066
|
-
<li><a href="#createNode" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>create<wbr/>Node</span></a></li>
|
|
2067
2066
|
<li><a href="#fill" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>fill</span></a></li>
|
|
2068
2067
|
<li><a href="#get" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get</span></a></li>
|
|
2069
2068
|
<li><a href="#getDepth" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Depth</span></a></li>
|
|
@@ -2095,9 +2094,13 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
2095
2094
|
<li><a href="../enums/CP.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-8"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-enum)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.45 16V7.24H14.49V8.224H10.518V10.936H14.07V11.908H10.518V15.016H14.49V16H9.45Z" fill="var(--color-text)"></path></g></svg><span>CP</span></a></li>
|
|
2096
2095
|
<li><a href="../enums/FamilyPosition.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-8"></use></svg><span>Family<wbr/>Position</span></a></li>
|
|
2097
2096
|
<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>
|
|
2097
|
+
<li><a href="../enums/RBColor.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-8"></use></svg><span>RBColor</span></a></li>
|
|
2098
|
+
<li><a href="../enums/TopologicalProperty.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-8"></use></svg><span>Topological<wbr/>Property</span></a></li>
|
|
2098
2099
|
<li><a href="AVLTree.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-128"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)"></path></g></svg><span>AVLTree</span></a></li>
|
|
2099
2100
|
<li><a href="AVLTreeNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>AVLTree<wbr/>Node</span></a></li>
|
|
2100
2101
|
<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>
|
|
2102
|
+
<li><a href="AbstractBinaryTree.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Abstract<wbr/>Binary<wbr/>Tree</span></a></li>
|
|
2103
|
+
<li><a href="AbstractBinaryTreeNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Abstract<wbr/>Binary<wbr/>Tree<wbr/>Node</span></a></li>
|
|
2101
2104
|
<li><a href="AbstractEdge.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Abstract<wbr/>Edge</span></a></li>
|
|
2102
2105
|
<li><a href="AbstractGraph.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Abstract<wbr/>Graph</span></a></li>
|
|
2103
2106
|
<li><a href="AbstractVertex.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Abstract<wbr/>Vertex</span></a></li>
|
|
@@ -2131,7 +2134,6 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
2131
2134
|
<li><a href="Pair.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Pair</span></a></li>
|
|
2132
2135
|
<li><a href="PriorityQueue.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Priority<wbr/>Queue</span></a></li>
|
|
2133
2136
|
<li><a href="Queue.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Queue</span></a></li>
|
|
2134
|
-
<li><a href="RBTree.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>RBTree</span></a></li>
|
|
2135
2137
|
<li><a href="SegmentTree.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Segment<wbr/>Tree</span></a></li>
|
|
2136
2138
|
<li><a href="SegmentTreeNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Segment<wbr/>Tree<wbr/>Node</span></a></li>
|
|
2137
2139
|
<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>
|
|
@@ -2141,6 +2143,7 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
2141
2143
|
<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>
|
|
2142
2144
|
<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>
|
|
2143
2145
|
<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>
|
|
2146
|
+
<li><a href="TreeMultiSetNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Tree<wbr/>Multi<wbr/>Set<wbr/>Node</span></a></li>
|
|
2144
2147
|
<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>
|
|
2145
2148
|
<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>
|
|
2146
2149
|
<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>
|
|
@@ -2150,33 +2153,42 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
2150
2153
|
<li><a href="UndirectedGraph.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Undirected<wbr/>Graph</span></a></li>
|
|
2151
2154
|
<li><a href="UndirectedVertex.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Undirected<wbr/>Vertex</span></a></li>
|
|
2152
2155
|
<li><a href="Vector2D.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Vector2D</span></a></li>
|
|
2153
|
-
<li><a href="../interfaces/
|
|
2154
|
-
<li><a href="../interfaces/
|
|
2156
|
+
<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>
|
|
2157
|
+
<li><a href="../interfaces/IBinaryTreeNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>IBinary<wbr/>Tree<wbr/>Node</span></a></li>
|
|
2155
2158
|
<li><a href="../interfaces/IDirectedGraph.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>IDirected<wbr/>Graph</span></a></li>
|
|
2156
2159
|
<li><a href="../interfaces/IGraph.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>IGraph</span></a></li>
|
|
2157
|
-
<li><a href="../interfaces/
|
|
2158
|
-
<li><a href="../
|
|
2159
|
-
<li><a href="../types/
|
|
2160
|
-
<li><a href="../types/
|
|
2161
|
-
<li><a href="../types/
|
|
2160
|
+
<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>
|
|
2161
|
+
<li><a href="../types/AVLTreeOptions.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-4194304"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)"></path></g></svg><span>AVLTree<wbr/>Options</span></a></li>
|
|
2162
|
+
<li><a href="../types/AbstractBinaryTreeOptions.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Abstract<wbr/>Binary<wbr/>Tree<wbr/>Options</span></a></li>
|
|
2163
|
+
<li><a href="../types/AbstractRecursiveBinaryTreeNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Abstract<wbr/>Recursive<wbr/>Binary<wbr/>Tree<wbr/>Node</span></a></li>
|
|
2164
|
+
<li><a href="../types/AbstractResultByProperty.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Abstract<wbr/>Result<wbr/>By<wbr/>Property</span></a></li>
|
|
2165
|
+
<li><a href="../types/AbstractResultsByProperty.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Abstract<wbr/>Results<wbr/>By<wbr/>Property</span></a></li>
|
|
2166
|
+
<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>
|
|
2167
|
+
<li><a href="../types/BSTOptions.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>BSTOptions</span></a></li>
|
|
2168
|
+
<li><a href="../types/BinaryTreeDeletedResult.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Binary<wbr/>Tree<wbr/>Deleted<wbr/>Result</span></a></li>
|
|
2162
2169
|
<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>
|
|
2163
2170
|
<li><a href="../types/BinaryTreeNodePropertyName.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Binary<wbr/>Tree<wbr/>Node<wbr/>Property<wbr/>Name</span></a></li>
|
|
2171
|
+
<li><a href="../types/BinaryTreeOptions.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Binary<wbr/>Tree<wbr/>Options</span></a></li>
|
|
2164
2172
|
<li><a href="../types/DFSOrderPattern.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>DFSOrder<wbr/>Pattern</span></a></li>
|
|
2165
2173
|
<li><a href="../types/DijkstraResult.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Dijkstra<wbr/>Result</span></a></li>
|
|
2166
2174
|
<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>
|
|
2175
|
+
<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>
|
|
2176
|
+
<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>
|
|
2177
|
+
<li><a href="../types/IdObject.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Id<wbr/>Object</span></a></li>
|
|
2178
|
+
<li><a href="../types/KeyValObject.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Key<wbr/>Val<wbr/>Object</span></a></li>
|
|
2179
|
+
<li><a href="../types/NavigatorParams.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Navigator<wbr/>Params</span></a></li>
|
|
2167
2180
|
<li><a href="../types/NodeOrPropertyName.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Node<wbr/>Or<wbr/>Property<wbr/>Name</span></a></li>
|
|
2168
2181
|
<li><a href="../types/PriorityQueueComparator.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Priority<wbr/>Queue<wbr/>Comparator</span></a></li>
|
|
2169
2182
|
<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>
|
|
2170
|
-
<li><a href="../types/
|
|
2171
|
-
<li><a href="../types/
|
|
2183
|
+
<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>
|
|
2184
|
+
<li><a href="../types/RBTreeOptions.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>RBTree<wbr/>Options</span></a></li>
|
|
2185
|
+
<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>
|
|
2186
|
+
<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>
|
|
2187
|
+
<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>
|
|
2188
|
+
<li><a href="../types/RecursiveTreeMultiSetNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Recursive<wbr/>Tree<wbr/>Multi<wbr/>Set<wbr/>Node</span></a></li>
|
|
2172
2189
|
<li><a href="../types/SegmentTreeNodeVal.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Segment<wbr/>Tree<wbr/>Node<wbr/>Val</span></a></li>
|
|
2173
|
-
<li><a href="../types/SpecifyOptional.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Specify<wbr/>Optional</span></a></li>
|
|
2174
|
-
<li><a href="../types/Thunk.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Thunk</span></a></li>
|
|
2175
|
-
<li><a href="../types/ToThunkFn.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>To<wbr/>Thunk<wbr/>Fn</span></a></li>
|
|
2176
2190
|
<li><a href="../types/TopologicalStatus.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Topological<wbr/>Status</span></a></li>
|
|
2177
|
-
<li><a href="../types/
|
|
2178
|
-
<li><a href="../types/TrlAsyncFn.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Trl<wbr/>Async<wbr/>Fn</span></a></li>
|
|
2179
|
-
<li><a href="../types/TrlFn.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Trl<wbr/>Fn</span></a></li>
|
|
2191
|
+
<li><a href="../types/TreeMultiSetOptions.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Tree<wbr/>Multi<wbr/>Set<wbr/>Options</span></a></li>
|
|
2180
2192
|
<li><a href="../types/Turning.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Turning</span></a></li>
|
|
2181
2193
|
<li><a href="../types/VertexId.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Vertex<wbr/>Id</span></a></li></ul></nav></div></div></div>
|
|
2182
2194
|
<div class="tsd-generator">
|