data-structure-typed 1.18.5 → 1.18.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/data-structures/binary-tree/abstract-binary-tree.d.ts +357 -0
- package/dist/data-structures/binary-tree/abstract-binary-tree.js +1480 -0
- package/dist/data-structures/binary-tree/avl-tree.d.ts +8 -6
- package/dist/data-structures/binary-tree/avl-tree.js +7 -5
- package/dist/data-structures/binary-tree/binary-tree.d.ts +19 -337
- package/dist/data-structures/binary-tree/binary-tree.js +40 -1441
- package/dist/data-structures/binary-tree/bst.d.ts +31 -17
- package/dist/data-structures/binary-tree/bst.js +57 -40
- 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 +30 -1
- package/dist/data-structures/binary-tree/rb-tree.js +29 -20
- package/dist/data-structures/binary-tree/tree-multiset.d.ts +21 -25
- package/dist/data-structures/binary-tree/tree-multiset.js +40 -31
- package/dist/data-structures/graph/abstract-graph.d.ts +20 -21
- package/dist/data-structures/graph/abstract-graph.js +24 -19
- package/dist/data-structures/graph/directed-graph.d.ts +12 -13
- package/dist/data-structures/graph/directed-graph.js +21 -25
- package/dist/data-structures/graph/undirected-graph.d.ts +15 -19
- package/dist/data-structures/graph/undirected-graph.js +16 -29
- package/dist/data-structures/interfaces/abstract-binary-tree.d.ts +101 -0
- package/dist/data-structures/interfaces/abstract-binary-tree.js +2 -0
- package/dist/data-structures/interfaces/abstract-graph.d.ts +1 -4
- package/dist/data-structures/interfaces/avl-tree.d.ts +16 -1
- package/dist/data-structures/interfaces/binary-tree.d.ts +4 -25
- package/dist/data-structures/interfaces/bst.d.ts +18 -1
- package/dist/data-structures/interfaces/directed-graph.d.ts +4 -1
- package/dist/data-structures/interfaces/index.d.ts +1 -1
- package/dist/data-structures/interfaces/index.js +1 -1
- package/dist/data-structures/interfaces/rb-tree.d.ts +9 -0
- package/dist/data-structures/interfaces/rb-tree.js +2 -0
- package/dist/data-structures/interfaces/undirected-graph.d.ts +4 -1
- package/dist/data-structures/types/abstract-binary-tree.d.ts +32 -0
- package/dist/data-structures/types/abstract-binary-tree.js +21 -0
- package/dist/data-structures/types/avl-tree.d.ts +2 -4
- package/dist/data-structures/types/binary-tree.d.ts +2 -10
- package/dist/data-structures/types/bst.d.ts +10 -5
- package/dist/data-structures/types/bst.js +7 -0
- 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 -0
- package/dist/data-structures/types/index.js +3 -0
- 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 -3
- package/dist/utils/utils.js +62 -0
- package/docs/assets/search.js +1 -1
- package/docs/classes/AVLTree.html +316 -204
- package/docs/classes/AVLTreeNode.html +141 -81
- package/docs/classes/AaTree.html +27 -10
- package/docs/classes/AbstractBinaryTree.html +2118 -0
- package/docs/classes/AbstractBinaryTreeNode.html +524 -0
- package/docs/classes/AbstractEdge.html +37 -20
- package/docs/classes/AbstractGraph.html +152 -144
- package/docs/classes/AbstractVertex.html +34 -17
- package/docs/classes/ArrayDeque.html +40 -23
- package/docs/classes/BST.html +294 -187
- package/docs/classes/BSTNode.html +144 -82
- package/docs/classes/BTree.html +27 -10
- package/docs/classes/BinaryIndexedTree.html +35 -18
- package/docs/classes/BinaryTree.html +597 -500
- package/docs/classes/BinaryTreeNode.html +189 -168
- package/docs/classes/Character.html +30 -13
- package/docs/classes/CoordinateMap.html +35 -18
- package/docs/classes/CoordinateSet.html +34 -17
- package/docs/classes/Deque.html +60 -43
- package/docs/classes/DirectedEdge.html +41 -24
- package/docs/classes/DirectedGraph.html +208 -247
- package/docs/classes/DirectedVertex.html +32 -15
- package/docs/classes/DoublyLinkedList.html +63 -46
- package/docs/classes/DoublyLinkedListNode.html +37 -20
- package/docs/classes/HashTable.html +27 -10
- package/docs/classes/Heap.html +41 -24
- package/docs/classes/HeapItem.html +34 -17
- package/docs/classes/Matrix2D.html +42 -25
- package/docs/classes/MatrixNTI2D.html +30 -13
- package/docs/classes/MaxHeap.html +41 -24
- package/docs/classes/MaxPriorityQueue.html +60 -43
- package/docs/classes/MinHeap.html +41 -24
- package/docs/classes/MinPriorityQueue.html +60 -43
- package/docs/classes/Navigator.html +36 -19
- package/docs/classes/ObjectDeque.html +51 -34
- package/docs/classes/Pair.html +27 -10
- package/docs/classes/PriorityQueue.html +58 -41
- package/docs/classes/Queue.html +40 -23
- package/docs/classes/RBTree.html +2388 -0
- package/docs/classes/RBTreeNode.html +516 -0
- package/docs/classes/SegmentTree.html +43 -26
- package/docs/classes/SegmentTreeNode.html +46 -29
- package/docs/classes/SinglyLinkedList.html +60 -43
- package/docs/classes/SinglyLinkedListNode.html +34 -17
- package/docs/classes/SkipLinkedList.html +27 -10
- package/docs/classes/SplayTree.html +27 -10
- package/docs/classes/Stack.html +38 -21
- package/docs/classes/TreeMap.html +27 -10
- package/docs/classes/TreeMultiSet.html +332 -224
- package/docs/classes/TreeMultiSetNode.html +499 -0
- package/docs/classes/TreeNode.html +42 -25
- package/docs/classes/TreeSet.html +27 -10
- package/docs/classes/Trie.html +39 -22
- package/docs/classes/TrieNode.html +37 -20
- package/docs/classes/TwoThreeTree.html +27 -10
- package/docs/classes/UndirectedEdge.html +38 -21
- package/docs/classes/UndirectedGraph.html +179 -227
- package/docs/classes/UndirectedVertex.html +32 -15
- package/docs/classes/Vector2D.html +54 -37
- package/docs/enums/CP.html +33 -16
- package/docs/enums/FamilyPosition.html +45 -28
- package/docs/enums/LoopType.html +39 -22
- package/docs/{interfaces/IBinaryTree.html → enums/RBColor.html} +51 -54
- package/docs/enums/TopologicalProperty.html +30 -13
- package/docs/index.html +26 -9
- package/docs/interfaces/IAVLTree.html +1378 -0
- package/docs/interfaces/IAVLTreeNode.html +405 -0
- package/docs/interfaces/IAbstractBinaryTree.html +1124 -0
- package/docs/interfaces/{IBinaryTreeNode.html → IAbstractBinaryTreeNode.html} +76 -75
- package/docs/interfaces/{IGraph.html → IAbstractGraph.html} +67 -94
- package/docs/interfaces/IBST.html +1271 -0
- package/docs/interfaces/IBSTNode.html +408 -0
- package/docs/interfaces/IDirectedGraph.html +344 -20
- package/docs/interfaces/IUNDirectedGraph.html +337 -12
- package/docs/modules.html +52 -18
- package/docs/types/{AVLTreeDeleted.html → AVLTreeOptions.html} +32 -24
- package/docs/types/{ResultsByProperty.html → AbstractBinaryTreeNodeProperties.html} +32 -15
- package/docs/types/AbstractBinaryTreeNodeProperty.html +152 -0
- package/docs/types/AbstractBinaryTreeOptions.html +156 -0
- package/docs/types/AbstractRecursiveBinaryTreeNode.html +152 -0
- package/docs/types/BSTComparator.html +27 -10
- package/docs/types/{TreeMultiSetDeletedResult.html → BSTOptions.html} +32 -22
- package/docs/types/BinaryTreeDeletedResult.html +159 -0
- package/docs/types/BinaryTreeNodeId.html +27 -10
- package/docs/types/BinaryTreeNodePropertyName.html +27 -10
- package/docs/types/{BinaryTreeDeleted.html → BinaryTreeOptions.html} +32 -24
- package/docs/types/DFSOrderPattern.html +27 -10
- package/docs/types/DijkstraResult.html +27 -10
- package/docs/types/Direction.html +27 -10
- package/docs/types/EdgeId.html +27 -10
- package/docs/types/HeapOptions.html +27 -10
- package/docs/types/IdObject.html +157 -0
- package/docs/types/{ResultByProperty.html → KeyValObject.html} +36 -19
- package/docs/types/NavigatorParams.html +27 -10
- package/docs/types/NodeOrPropertyName.html +27 -10
- package/docs/types/PriorityQueueComparator.html +27 -10
- package/docs/types/PriorityQueueDFSOrderPattern.html +27 -10
- package/docs/types/PriorityQueueOptions.html +27 -10
- package/docs/types/{BSTDeletedResult.html → RBTreeOptions.html} +32 -24
- package/docs/types/RecursiveAVLTreeNode.html +27 -10
- package/docs/types/RecursiveBSTNode.html +27 -10
- package/docs/types/RecursiveBinaryTreeNode.html +27 -10
- package/docs/types/RecursiveTreeMultiSetNode.html +152 -0
- package/docs/types/SegmentTreeNodeVal.html +27 -10
- package/docs/types/TopologicalStatus.html +27 -10
- package/docs/types/TreeMultiSetOptions.html +152 -0
- package/docs/types/Turning.html +27 -10
- package/docs/types/VertexId.html +27 -10
- package/package.json +2 -2
|
@@ -14,7 +14,11 @@
|
|
|
14
14
|
<ul class="tsd-breadcrumb">
|
|
15
15
|
<li><a href="../modules.html">data-structure-typed</a></li>
|
|
16
16
|
<li><a href="TreeMultiSet.html">TreeMultiSet</a></li></ul>
|
|
17
|
-
<h1>Class TreeMultiSet<N></h1></div>
|
|
17
|
+
<h1>Class TreeMultiSet<N></h1></div>
|
|
18
|
+
<section class="tsd-panel tsd-comment">
|
|
19
|
+
<div class="tsd-comment tsd-typography"><p>The only distinction between a TreeMultiSet and a BST lies in the ability of the former to store duplicate nodes through the utilization of counters.</p>
|
|
20
|
+
</div>
|
|
21
|
+
<div class="tsd-comment tsd-typography"></div></section>
|
|
18
22
|
<section class="tsd-panel">
|
|
19
23
|
<h4>Type Parameters</h4>
|
|
20
24
|
<ul class="tsd-type-parameter-list">
|
|
@@ -29,9 +33,9 @@
|
|
|
29
33
|
<section class="tsd-panel">
|
|
30
34
|
<h4>Implements</h4>
|
|
31
35
|
<ul class="tsd-hierarchy">
|
|
32
|
-
<li><a href="../interfaces/
|
|
36
|
+
<li><a href="../interfaces/IBST.html" class="tsd-signature-type tsd-kind-interface">IBST</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">
|
|
33
37
|
<ul>
|
|
34
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
38
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/tree-multiset.ts#L31">src/data-structures/binary-tree/tree-multiset.ts:31</a></li></ul></aside>
|
|
35
39
|
<section class="tsd-panel-group tsd-index-group">
|
|
36
40
|
<section class="tsd-panel tsd-index-panel">
|
|
37
41
|
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
|
|
@@ -39,7 +43,7 @@
|
|
|
39
43
|
<div class="tsd-accordion-details">
|
|
40
44
|
<section class="tsd-index-section">
|
|
41
45
|
<h3 class="tsd-index-heading">Constructors</h3>
|
|
42
|
-
<div class="tsd-index-list"><a href="TreeMultiSet.html#constructor" class="tsd-index-link
|
|
46
|
+
<div class="tsd-index-list"><a href="TreeMultiSet.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-512"><rect fill="var(--color-icon-background)" stroke="#4D7FFF" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></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>constructor</span></a>
|
|
43
47
|
</div></section>
|
|
44
48
|
<section class="tsd-index-section">
|
|
45
49
|
<h3 class="tsd-index-heading">Properties</h3>
|
|
@@ -67,7 +71,6 @@
|
|
|
67
71
|
<a href="TreeMultiSet.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>
|
|
68
72
|
<a href="TreeMultiSet.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>
|
|
69
73
|
<a href="TreeMultiSet.html#_compare" 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>_compare</span></a>
|
|
70
|
-
<a href="TreeMultiSet.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>
|
|
71
74
|
<a href="TreeMultiSet.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>
|
|
72
75
|
<a href="TreeMultiSet.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>
|
|
73
76
|
<a href="TreeMultiSet.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>
|
|
@@ -82,12 +85,13 @@
|
|
|
82
85
|
<a href="TreeMultiSet.html#_setVisitedLeftSum" 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>_set<wbr/>Visited<wbr/>Left<wbr/>Sum</span></a>
|
|
83
86
|
<a href="TreeMultiSet.html#_setVisitedNode" 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>_set<wbr/>Visited<wbr/>Node</span></a>
|
|
84
87
|
<a href="TreeMultiSet.html#_setVisitedVal" 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>_set<wbr/>Visited<wbr/>Val</span></a>
|
|
85
|
-
<a href="TreeMultiSet.html#add" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>add</span></a>
|
|
88
|
+
<a href="TreeMultiSet.html#add" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>add</span></a>
|
|
86
89
|
<a href="TreeMultiSet.html#addMany" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>add<wbr/>Many</span></a>
|
|
87
90
|
<a href="TreeMultiSet.html#addTo" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>add<wbr/>To</span></a>
|
|
88
91
|
<a href="TreeMultiSet.html#allGreaterNodesAdd" class="tsd-index-link tsd-is-inherited"><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>
|
|
89
92
|
<a href="TreeMultiSet.html#balance" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>balance</span></a>
|
|
90
93
|
<a href="TreeMultiSet.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>
|
|
94
|
+
<a href="TreeMultiSet.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>
|
|
91
95
|
<a href="TreeMultiSet.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>
|
|
92
96
|
<a href="TreeMultiSet.html#get" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get</span></a>
|
|
93
97
|
<a href="TreeMultiSet.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>
|
|
@@ -102,6 +106,7 @@
|
|
|
102
106
|
<a href="TreeMultiSet.html#has" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>has</span></a>
|
|
103
107
|
<a href="TreeMultiSet.html#isAVLBalanced" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>isAVLBalanced</span></a>
|
|
104
108
|
<a href="TreeMultiSet.html#isBST" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>isBST</span></a>
|
|
109
|
+
<a href="TreeMultiSet.html#isBSTByRooted" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>isBSTBy<wbr/>Rooted</span></a>
|
|
105
110
|
<a href="TreeMultiSet.html#isBalanced" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>is<wbr/>Balanced</span></a>
|
|
106
111
|
<a href="TreeMultiSet.html#isEmpty" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>is<wbr/>Empty</span></a>
|
|
107
112
|
<a href="TreeMultiSet.html#lastKey" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>last<wbr/>Key</span></a>
|
|
@@ -109,43 +114,32 @@
|
|
|
109
114
|
<a href="TreeMultiSet.html#levelIterative" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>level<wbr/>Iterative</span></a>
|
|
110
115
|
<a href="TreeMultiSet.html#listLevels" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>list<wbr/>Levels</span></a>
|
|
111
116
|
<a href="TreeMultiSet.html#morris" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>morris</span></a>
|
|
112
|
-
<a href="TreeMultiSet.html#remove" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>remove</span></a>
|
|
117
|
+
<a href="TreeMultiSet.html#remove" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>remove</span></a>
|
|
113
118
|
<a href="TreeMultiSet.html#setVisitedCount" 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>set<wbr/>Visited<wbr/>Count</span></a>
|
|
114
119
|
<a href="TreeMultiSet.html#subTreeAdd" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>sub<wbr/>Tree<wbr/>Add</span></a>
|
|
115
120
|
<a href="TreeMultiSet.html#subTreeSum" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>sub<wbr/>Tree<wbr/>Sum</span></a>
|
|
116
121
|
</div></section></div></details></section></section>
|
|
117
122
|
<section class="tsd-panel-group tsd-member-group">
|
|
118
123
|
<h2>Constructors</h2>
|
|
119
|
-
<section class="tsd-panel tsd-member
|
|
124
|
+
<section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a>
|
|
120
125
|
<h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><g stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" id="icon-anchor"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></g></svg></a></h3>
|
|
121
|
-
<ul class="tsd-signatures
|
|
126
|
+
<ul class="tsd-signatures">
|
|
122
127
|
<li class="tsd-signature tsd-anchor-link" id="constructor.new_TreeMultiSet"><span class="tsd-kind-constructor-signature">new <wbr/>Tree<wbr/>Multi<wbr/>Set</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="TreeMultiSet.html" class="tsd-signature-type tsd-kind-class">TreeMultiSet</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_TreeMultiSet" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
123
128
|
<li class="tsd-description">
|
|
124
|
-
<div class="tsd-comment tsd-typography"><p>The constructor function accepts an optional options object and sets the comparator property if provided.</p>
|
|
125
|
-
</div>
|
|
126
129
|
<section class="tsd-panel">
|
|
127
130
|
<h4>Type Parameters</h4>
|
|
128
131
|
<ul class="tsd-type-parameter-list">
|
|
129
132
|
<li>
|
|
130
|
-
<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>
|
|
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><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>
|
|
131
134
|
<div class="tsd-parameters">
|
|
132
135
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
133
136
|
<ul class="tsd-parameter-list">
|
|
134
137
|
<li>
|
|
135
|
-
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <
|
|
136
|
-
<
|
|
137
|
-
</
|
|
138
|
-
<div class="tsd-comment tsd-typography"></div>
|
|
139
|
-
<ul class="tsd-parameters">
|
|
140
|
-
<li class="tsd-parameter">
|
|
141
|
-
<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>
|
|
142
|
-
<li class="tsd-parameter">
|
|
143
|
-
<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>
|
|
144
|
-
<h4 class="tsd-returns-title">Returns <a href="TreeMultiSet.html" class="tsd-signature-type tsd-kind-class">TreeMultiSet</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>
|
|
145
|
-
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
146
|
-
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#constructor">constructor</a></p>
|
|
138
|
+
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <a href="../types/TreeMultiSetOptions.html" class="tsd-signature-type tsd-kind-type-alias">TreeMultiSetOptions</a></h5></li></ul></div>
|
|
139
|
+
<h4 class="tsd-returns-title">Returns <a href="TreeMultiSet.html" class="tsd-signature-type tsd-kind-class">TreeMultiSet</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><aside class="tsd-sources">
|
|
140
|
+
<p>Overrides <a href="BST.html">BST</a>.<a href="BST.html#constructor">constructor</a></p>
|
|
147
141
|
<ul>
|
|
148
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
142
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/tree-multiset.ts#L32">src/data-structures/binary-tree/tree-multiset.ts:32</a></li></ul></aside></li></ul></section></section>
|
|
149
143
|
<section class="tsd-panel-group tsd-member-group">
|
|
150
144
|
<h2>Properties</h2>
|
|
151
145
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_comparator" class="tsd-anchor"></a>
|
|
@@ -153,7 +147,7 @@
|
|
|
153
147
|
<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">
|
|
154
148
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_comparator">_comparator</a></p>
|
|
155
149
|
<ul>
|
|
156
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
150
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/bst.ts#L496">src/data-structures/binary-tree/bst.ts:496</a></li></ul></aside></section></section>
|
|
157
151
|
<section class="tsd-panel-group tsd-member-group">
|
|
158
152
|
<h2>Accessors</h2>
|
|
159
153
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="autoIncrementId" class="tsd-anchor"></a>
|
|
@@ -162,108 +156,120 @@
|
|
|
162
156
|
<li class="tsd-signature" id="autoIncrementId.autoIncrementId-1"><span class="tsd-signature-symbol">get</span> autoIncrementId<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
|
|
163
157
|
<li class="tsd-description">
|
|
164
158
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources">
|
|
159
|
+
<p>Implementation of IBST.autoIncrementId</p>
|
|
165
160
|
<p>Inherited from BST.autoIncrementId</p>
|
|
166
161
|
<ul>
|
|
167
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
162
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L224">src/data-structures/binary-tree/abstract-binary-tree.ts:224</a></li></ul></aside></li></ul></section>
|
|
168
163
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="count" class="tsd-anchor"></a>
|
|
169
164
|
<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>
|
|
170
165
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
171
166
|
<li class="tsd-signature" id="count.count-1"><span class="tsd-signature-symbol">get</span> count<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li>
|
|
172
167
|
<li class="tsd-description">
|
|
173
168
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
|
|
169
|
+
<p>Implementation of IBST.count</p>
|
|
174
170
|
<p>Inherited from BST.count</p>
|
|
175
171
|
<ul>
|
|
176
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
172
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L254">src/data-structures/binary-tree/abstract-binary-tree.ts:254</a></li></ul></aside></li></ul></section>
|
|
177
173
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="isDuplicatedVal" class="tsd-anchor"></a>
|
|
178
174
|
<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>
|
|
179
175
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
180
176
|
<li class="tsd-signature" id="isDuplicatedVal.isDuplicatedVal-1"><span class="tsd-signature-symbol">get</span> isDuplicatedVal<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
|
|
181
177
|
<li class="tsd-description">
|
|
182
178
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources">
|
|
179
|
+
<p>Implementation of IBST.isDuplicatedVal</p>
|
|
183
180
|
<p>Inherited from BST.isDuplicatedVal</p>
|
|
184
181
|
<ul>
|
|
185
|
-
<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/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L236">src/data-structures/binary-tree/abstract-binary-tree.ts:236</a></li></ul></aside></li></ul></section>
|
|
186
183
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="loopType" class="tsd-anchor"></a>
|
|
187
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>
|
|
188
185
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
189
186
|
<li class="tsd-signature" id="loopType.loopType-1"><span class="tsd-signature-symbol">get</span> loopType<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../enums/LoopType.html" class="tsd-signature-type tsd-kind-enum">LoopType</a></li>
|
|
190
187
|
<li class="tsd-description">
|
|
191
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">
|
|
189
|
+
<p>Implementation of IBST.loopType</p>
|
|
192
190
|
<p>Inherited from BST.loopType</p>
|
|
193
191
|
<ul>
|
|
194
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
192
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L189">src/data-structures/binary-tree/abstract-binary-tree.ts:189</a></li></ul></aside></li></ul></section>
|
|
195
193
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="maxId" class="tsd-anchor"></a>
|
|
196
194
|
<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>
|
|
197
195
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
198
196
|
<li class="tsd-signature" id="maxId.maxId-1"><span class="tsd-signature-symbol">get</span> maxId<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li>
|
|
199
197
|
<li class="tsd-description">
|
|
200
198
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
|
|
199
|
+
<p>Implementation of IBST.maxId</p>
|
|
201
200
|
<p>Inherited from BST.maxId</p>
|
|
202
201
|
<ul>
|
|
203
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
202
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L230">src/data-structures/binary-tree/abstract-binary-tree.ts:230</a></li></ul></aside></li></ul></section>
|
|
204
203
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="root" class="tsd-anchor"></a>
|
|
205
204
|
<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>
|
|
206
205
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
207
206
|
<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>
|
|
208
207
|
<li class="tsd-description">
|
|
209
208
|
<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">
|
|
209
|
+
<p>Implementation of IBST.root</p>
|
|
210
210
|
<p>Inherited from BST.root</p>
|
|
211
211
|
<ul>
|
|
212
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
212
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L242">src/data-structures/binary-tree/abstract-binary-tree.ts:242</a></li></ul></aside></li></ul></section>
|
|
213
213
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="size" class="tsd-anchor"></a>
|
|
214
214
|
<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>
|
|
215
215
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
216
216
|
<li class="tsd-signature" id="size.size-1"><span class="tsd-signature-symbol">get</span> size<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li>
|
|
217
217
|
<li class="tsd-description">
|
|
218
218
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
|
|
219
|
+
<p>Implementation of IBST.size</p>
|
|
219
220
|
<p>Inherited from BST.size</p>
|
|
220
221
|
<ul>
|
|
221
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
222
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L248">src/data-structures/binary-tree/abstract-binary-tree.ts:248</a></li></ul></aside></li></ul></section>
|
|
222
223
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="visitedCount" class="tsd-anchor"></a>
|
|
223
224
|
<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>
|
|
224
225
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
225
226
|
<li class="tsd-signature" id="visitedCount.visitedCount-1"><span class="tsd-signature-symbol">get</span> visitedCount<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></li>
|
|
226
227
|
<li class="tsd-description">
|
|
227
228
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources">
|
|
229
|
+
<p>Implementation of IBST.visitedCount</p>
|
|
228
230
|
<p>Inherited from BST.visitedCount</p>
|
|
229
231
|
<ul>
|
|
230
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
232
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L212">src/data-structures/binary-tree/abstract-binary-tree.ts:212</a></li></ul></aside></li></ul></section>
|
|
231
233
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="visitedId" class="tsd-anchor"></a>
|
|
232
234
|
<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>
|
|
233
235
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
234
236
|
<li class="tsd-signature" id="visitedId.visitedId-1"><span class="tsd-signature-symbol">get</span> visitedId<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></li>
|
|
235
237
|
<li class="tsd-description">
|
|
236
238
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources">
|
|
239
|
+
<p>Implementation of IBST.visitedId</p>
|
|
237
240
|
<p>Inherited from BST.visitedId</p>
|
|
238
241
|
<ul>
|
|
239
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
242
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L194">src/data-structures/binary-tree/abstract-binary-tree.ts:194</a></li></ul></aside></li></ul></section>
|
|
240
243
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="visitedLeftSum" class="tsd-anchor"></a>
|
|
241
244
|
<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>
|
|
242
245
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
243
246
|
<li class="tsd-signature" id="visitedLeftSum.visitedLeftSum-1"><span class="tsd-signature-symbol">get</span> visitedLeftSum<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></li>
|
|
244
247
|
<li class="tsd-description">
|
|
245
248
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources">
|
|
249
|
+
<p>Implementation of IBST.visitedLeftSum</p>
|
|
246
250
|
<p>Inherited from BST.visitedLeftSum</p>
|
|
247
251
|
<ul>
|
|
248
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
252
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L218">src/data-structures/binary-tree/abstract-binary-tree.ts:218</a></li></ul></aside></li></ul></section>
|
|
249
253
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="visitedNode" class="tsd-anchor"></a>
|
|
250
254
|
<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>
|
|
251
255
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
252
256
|
<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>
|
|
253
257
|
<li class="tsd-description">
|
|
254
258
|
<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">
|
|
259
|
+
<p>Implementation of IBST.visitedNode</p>
|
|
255
260
|
<p>Inherited from BST.visitedNode</p>
|
|
256
261
|
<ul>
|
|
257
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
262
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L206">src/data-structures/binary-tree/abstract-binary-tree.ts:206</a></li></ul></aside></li></ul></section>
|
|
258
263
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="visitedVal" class="tsd-anchor"></a>
|
|
259
264
|
<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>
|
|
260
265
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
261
266
|
<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>
|
|
262
267
|
<li class="tsd-description">
|
|
263
268
|
<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">
|
|
269
|
+
<p>Implementation of IBST.visitedVal</p>
|
|
264
270
|
<p>Inherited from BST.visitedVal</p>
|
|
265
271
|
<ul>
|
|
266
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
272
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L200">src/data-structures/binary-tree/abstract-binary-tree.ts:200</a></li></ul></aside></li></ul></section></section>
|
|
267
273
|
<section class="tsd-panel-group tsd-member-group">
|
|
268
274
|
<h2>Methods</h2>
|
|
269
275
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="BFS" class="tsd-anchor"></a>
|
|
@@ -274,12 +280,13 @@
|
|
|
274
280
|
<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
|
|
275
281
|
or property name.</p>
|
|
276
282
|
</div>
|
|
277
|
-
<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>
|
|
283
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>AbstractBinaryTreeNodeProperties<N></code>.</p>
|
|
278
284
|
|
|
279
285
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
286
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#BFS">BFS</a></p>
|
|
280
287
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#BFS">BFS</a></p>
|
|
281
288
|
<ul>
|
|
282
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
289
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L963">src/data-structures/binary-tree/abstract-binary-tree.ts:963</a></li></ul></aside></li>
|
|
283
290
|
<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>
|
|
284
291
|
<li class="tsd-description">
|
|
285
292
|
<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
|
|
@@ -296,12 +303,13 @@ performed starting from that node. If a property name is provided, the breadth-f
|
|
|
296
303
|
performed starting from the root node</p>
|
|
297
304
|
</div>
|
|
298
305
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
299
|
-
<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>
|
|
306
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>AbstractBinaryTreeNodeProperties<N></code>.</p>
|
|
300
307
|
|
|
301
308
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
309
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#BFS">BFS</a></p>
|
|
302
310
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#BFS">BFS</a></p>
|
|
303
311
|
<ul>
|
|
304
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
312
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L965">src/data-structures/binary-tree/abstract-binary-tree.ts:965</a></li></ul></aside></li>
|
|
305
313
|
<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>
|
|
306
314
|
<li class="tsd-description">
|
|
307
315
|
<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
|
|
@@ -318,12 +326,13 @@ performed starting from that node. If a property name is provided, the breadth-f
|
|
|
318
326
|
performed starting from the root node</p>
|
|
319
327
|
</div>
|
|
320
328
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
321
|
-
<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>
|
|
329
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>AbstractBinaryTreeNodeProperties<N></code>.</p>
|
|
322
330
|
|
|
323
331
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
332
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#BFS">BFS</a></p>
|
|
324
333
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#BFS">BFS</a></p>
|
|
325
334
|
<ul>
|
|
326
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
335
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L967">src/data-structures/binary-tree/abstract-binary-tree.ts:967</a></li></ul></aside></li>
|
|
327
336
|
<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>
|
|
328
337
|
<li class="tsd-description">
|
|
329
338
|
<div class="tsd-comment tsd-typography"><p>The BFS function performs a breadth-first search on a binary tree and returns the results based on a specified node
|
|
@@ -340,12 +349,13 @@ performed starting from that node. If a property name is provided, the breadth-f
|
|
|
340
349
|
performed starting from the root node</p>
|
|
341
350
|
</div>
|
|
342
351
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
343
|
-
<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>
|
|
352
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>AbstractBinaryTreeNodeProperties<N></code>.</p>
|
|
344
353
|
|
|
345
354
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
355
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#BFS">BFS</a></p>
|
|
346
356
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#BFS">BFS</a></p>
|
|
347
357
|
<ul>
|
|
348
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
358
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L969">src/data-structures/binary-tree/abstract-binary-tree.ts:969</a></li></ul></aside></li>
|
|
349
359
|
<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>
|
|
350
360
|
<li class="tsd-description">
|
|
351
361
|
<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
|
|
@@ -362,12 +372,13 @@ performed starting from that node. If a property name is provided, the breadth-f
|
|
|
362
372
|
performed starting from the root node</p>
|
|
363
373
|
</div>
|
|
364
374
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
365
|
-
<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>
|
|
375
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>AbstractBinaryTreeNodeProperties<N></code>.</p>
|
|
366
376
|
|
|
367
377
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
378
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#BFS">BFS</a></p>
|
|
368
379
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#BFS">BFS</a></p>
|
|
369
380
|
<ul>
|
|
370
|
-
<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/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L971">src/data-structures/binary-tree/abstract-binary-tree.ts:971</a></li></ul></aside></li></ul></section>
|
|
371
382
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="DFS" class="tsd-anchor"></a>
|
|
372
383
|
<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>
|
|
373
384
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -376,12 +387,13 @@ performed starting from the root node</p>
|
|
|
376
387
|
<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
|
|
377
388
|
specified pattern and node or property name.</p>
|
|
378
389
|
</div>
|
|
379
|
-
<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>
|
|
390
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>AbstractBinaryTreeNodeProperties<N></code>.</p>
|
|
380
391
|
|
|
381
392
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
393
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#DFS">DFS</a></p>
|
|
382
394
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#DFS">DFS</a></p>
|
|
383
395
|
<ul>
|
|
384
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
396
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L999">src/data-structures/binary-tree/abstract-binary-tree.ts:999</a></li></ul></aside></li>
|
|
385
397
|
<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>
|
|
386
398
|
<li class="tsd-description">
|
|
387
399
|
<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
|
|
@@ -405,12 +417,13 @@ either the name of a property in the <code>BinaryTreeNode</code> object or the v
|
|
|
405
417
|
no value</p>
|
|
406
418
|
</div>
|
|
407
419
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
408
|
-
<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>
|
|
420
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>AbstractBinaryTreeNodeProperties<N></code>.</p>
|
|
409
421
|
|
|
410
422
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
423
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#DFS">DFS</a></p>
|
|
411
424
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#DFS">DFS</a></p>
|
|
412
425
|
<ul>
|
|
413
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
426
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1001">src/data-structures/binary-tree/abstract-binary-tree.ts:1001</a></li></ul></aside></li>
|
|
414
427
|
<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>
|
|
415
428
|
<li class="tsd-description">
|
|
416
429
|
<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
|
|
@@ -434,12 +447,13 @@ either the name of a property in the <code>BinaryTreeNode</code> object or the v
|
|
|
434
447
|
no value</p>
|
|
435
448
|
</div>
|
|
436
449
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
437
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>
|
|
450
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>AbstractBinaryTreeNodeProperties<N></code>.</p>
|
|
438
451
|
|
|
439
452
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
453
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#DFS">DFS</a></p>
|
|
440
454
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#DFS">DFS</a></p>
|
|
441
455
|
<ul>
|
|
442
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
456
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1003">src/data-structures/binary-tree/abstract-binary-tree.ts:1003</a></li></ul></aside></li>
|
|
443
457
|
<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>
|
|
444
458
|
<li class="tsd-description">
|
|
445
459
|
<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
|
|
@@ -463,12 +477,13 @@ either the name of a property in the <code>BinaryTreeNode</code> object or the v
|
|
|
463
477
|
no value</p>
|
|
464
478
|
</div>
|
|
465
479
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
466
|
-
<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>
|
|
480
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>AbstractBinaryTreeNodeProperties<N></code>.</p>
|
|
467
481
|
|
|
468
482
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
483
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#DFS">DFS</a></p>
|
|
469
484
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#DFS">DFS</a></p>
|
|
470
485
|
<ul>
|
|
471
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
486
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1005">src/data-structures/binary-tree/abstract-binary-tree.ts:1005</a></li></ul></aside></li>
|
|
472
487
|
<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>
|
|
473
488
|
<li class="tsd-description">
|
|
474
489
|
<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
|
|
@@ -492,12 +507,13 @@ either the name of a property in the <code>BinaryTreeNode</code> object or the v
|
|
|
492
507
|
no value</p>
|
|
493
508
|
</div>
|
|
494
509
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
495
|
-
<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>
|
|
510
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>AbstractBinaryTreeNodeProperties<N></code>.</p>
|
|
496
511
|
|
|
497
512
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
513
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#DFS">DFS</a></p>
|
|
498
514
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#DFS">DFS</a></p>
|
|
499
515
|
<ul>
|
|
500
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
516
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1007">src/data-structures/binary-tree/abstract-binary-tree.ts:1007</a></li></ul></aside></li></ul></section>
|
|
501
517
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="DFSIterative" class="tsd-anchor"></a>
|
|
502
518
|
<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>
|
|
503
519
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -508,9 +524,10 @@ Space complexity of Iterative DFS equals to recursive DFS which is O(n) because
|
|
|
508
524
|
</div>
|
|
509
525
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4>
|
|
510
526
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
527
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#DFSIterative">DFSIterative</a></p>
|
|
511
528
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#DFSIterative">DFSIterative</a></p>
|
|
512
529
|
<ul>
|
|
513
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
530
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1049">src/data-structures/binary-tree/abstract-binary-tree.ts:1049</a></li></ul></aside></li>
|
|
514
531
|
<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>
|
|
515
532
|
<li class="tsd-description">
|
|
516
533
|
<div class="tsd-comment tsd-typography"><p>Time complexity is O(n)
|
|
@@ -527,9 +544,10 @@ Space complexity of Iterative DFS equals to recursive DFS which is O(n) because
|
|
|
527
544
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
528
545
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4>
|
|
529
546
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
547
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#DFSIterative">DFSIterative</a></p>
|
|
530
548
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#DFSIterative">DFSIterative</a></p>
|
|
531
549
|
<ul>
|
|
532
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
550
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1051">src/data-structures/binary-tree/abstract-binary-tree.ts:1051</a></li></ul></aside></li>
|
|
533
551
|
<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>
|
|
534
552
|
<li class="tsd-description">
|
|
535
553
|
<div class="tsd-comment tsd-typography"><p>Time complexity is O(n)
|
|
@@ -546,9 +564,10 @@ Space complexity of Iterative DFS equals to recursive DFS which is O(n) because
|
|
|
546
564
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
547
565
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4>
|
|
548
566
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
567
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#DFSIterative">DFSIterative</a></p>
|
|
549
568
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#DFSIterative">DFSIterative</a></p>
|
|
550
569
|
<ul>
|
|
551
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
570
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1053">src/data-structures/binary-tree/abstract-binary-tree.ts:1053</a></li></ul></aside></li>
|
|
552
571
|
<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>
|
|
553
572
|
<li class="tsd-description">
|
|
554
573
|
<div class="tsd-comment tsd-typography"><p>Time complexity is O(n)
|
|
@@ -565,9 +584,10 @@ Space complexity of Iterative DFS equals to recursive DFS which is O(n) because
|
|
|
565
584
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
566
585
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4>
|
|
567
586
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
587
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#DFSIterative">DFSIterative</a></p>
|
|
568
588
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#DFSIterative">DFSIterative</a></p>
|
|
569
589
|
<ul>
|
|
570
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
590
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1055">src/data-structures/binary-tree/abstract-binary-tree.ts:1055</a></li></ul></aside></li>
|
|
571
591
|
<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>
|
|
572
592
|
<li class="tsd-description">
|
|
573
593
|
<div class="tsd-comment tsd-typography"><p>Time complexity is O(n)
|
|
@@ -584,9 +604,10 @@ Space complexity of Iterative DFS equals to recursive DFS which is O(n) because
|
|
|
584
604
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
585
605
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4>
|
|
586
606
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
607
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#DFSIterative">DFSIterative</a></p>
|
|
587
608
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#DFSIterative">DFSIterative</a></p>
|
|
588
609
|
<ul>
|
|
589
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
610
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1057">src/data-structures/binary-tree/abstract-binary-tree.ts:1057</a></li></ul></aside></li></ul></section>
|
|
590
611
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_accumulatedByPropertyName" class="tsd-anchor"></a>
|
|
591
612
|
<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>
|
|
592
613
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -614,7 +635,7 @@ the property name of the node that should be accumulated. If it is a node object
|
|
|
614
635
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
615
636
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_accumulatedByPropertyName">_accumulatedByPropertyName</a></p>
|
|
616
637
|
<ul>
|
|
617
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
638
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1469">src/data-structures/binary-tree/abstract-binary-tree.ts:1469</a></li></ul></aside></li></ul></section>
|
|
618
639
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_compare" class="tsd-anchor"></a>
|
|
619
640
|
<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>
|
|
620
641
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -642,45 +663,11 @@ than), or CP.eq (equal).</p>
|
|
|
642
663
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
643
664
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_compare">_compare</a></p>
|
|
644
665
|
<ul>
|
|
645
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
646
|
-
<section class="tsd-panel tsd-member"><a id="_createNode" class="tsd-anchor"></a>
|
|
647
|
-
<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>
|
|
648
|
-
<ul class="tsd-signatures">
|
|
649
|
-
<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 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>
|
|
650
|
-
<li class="tsd-description">
|
|
651
|
-
<div class="tsd-comment tsd-typography"><p>The function creates a new BSTNode with the given id, value, and count.</p>
|
|
652
|
-
</div>
|
|
653
|
-
<div class="tsd-parameters">
|
|
654
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
655
|
-
<ul class="tsd-parameter-list">
|
|
656
|
-
<li>
|
|
657
|
-
<h5><span class="tsd-kind-parameter">id</span>: <span class="tsd-signature-type">number</span></h5>
|
|
658
|
-
<div class="tsd-comment tsd-typography"><p>The id parameter is the unique identifier for the binary tree node. It is used to
|
|
659
|
-
distinguish one node from another in the tree.</p>
|
|
660
|
-
</div>
|
|
661
|
-
<div class="tsd-comment tsd-typography"></div></li>
|
|
662
|
-
<li>
|
|
663
|
-
<h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span></h5>
|
|
664
|
-
<div class="tsd-comment tsd-typography"><p>The <code>val</code> parameter represents the value that will be stored in the binary search tree node.</p>
|
|
665
|
-
</div>
|
|
666
|
-
<div class="tsd-comment tsd-typography"></div></li>
|
|
667
|
-
<li>
|
|
668
|
-
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">count</span>: <span class="tsd-signature-type">number</span></h5>
|
|
669
|
-
<div class="tsd-comment tsd-typography"><p>The "count" parameter is an optional parameter of type number. It represents the number of
|
|
670
|
-
occurrences of the value in the binary search tree node. If not provided, the count will default to 1.</p>
|
|
671
|
-
</div>
|
|
672
|
-
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
673
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h4><p>A new instance of the BSTNode class with the specified id, value, and count (if provided).</p>
|
|
674
|
-
|
|
675
|
-
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
676
|
-
<p>Implementation of <a href="../interfaces/IBinaryTree.html">IBinaryTree</a>.<a href="../interfaces/IBinaryTree.html#_createNode">_createNode</a></p>
|
|
677
|
-
<p>Overrides <a href="BST.html">BST</a>.<a href="BST.html#_createNode">_createNode</a></p>
|
|
678
|
-
<ul>
|
|
679
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/tree-multiset.ts#L22">src/data-structures/binary-tree/tree-multiset.ts:22</a></li></ul></aside></li></ul></section>
|
|
666
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/bst.ts#L506">src/data-structures/binary-tree/bst.ts:506</a></li></ul></aside></li></ul></section>
|
|
680
667
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_getResultByPropertyName" class="tsd-anchor"></a>
|
|
681
668
|
<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>
|
|
682
669
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
683
|
-
<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/
|
|
670
|
+
<li class="tsd-signature tsd-anchor-link" id="_getResultByPropertyName._getResultByPropertyName-1"><span class="tsd-kind-call-signature">_get<wbr/>Result<wbr/>By<wbr/>Property<wbr/>Name</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../types/AbstractBinaryTreeNodeProperties.html" class="tsd-signature-type tsd-kind-type-alias">AbstractBinaryTreeNodeProperties</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">></span><a href="#_getResultByPropertyName._getResultByPropertyName-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
684
671
|
<li class="tsd-description">
|
|
685
672
|
<div class="tsd-comment tsd-typography"><p>The function <code>_getResultByPropertyName</code> returns different results based on the provided property name or defaulting
|
|
686
673
|
to 'id'.</p>
|
|
@@ -694,12 +681,12 @@ to 'id'.</p>
|
|
|
694
681
|
can accept a value of type <code>NodeOrPropertyName</code>.</p>
|
|
695
682
|
</div>
|
|
696
683
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
697
|
-
<h4 class="tsd-returns-title">Returns <a href="../types/
|
|
684
|
+
<h4 class="tsd-returns-title">Returns <a href="../types/AbstractBinaryTreeNodeProperties.html" class="tsd-signature-type tsd-kind-type-alias">AbstractBinaryTreeNodeProperties</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">></span></h4><p>The method returns an object of type <code>AbstractBinaryTreeNodeProperties<T></code>.</p>
|
|
698
685
|
|
|
699
686
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
700
687
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_getResultByPropertyName">_getResultByPropertyName</a></p>
|
|
701
688
|
<ul>
|
|
702
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
689
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1498">src/data-structures/binary-tree/abstract-binary-tree.ts:1498</a></li></ul></aside></li></ul></section>
|
|
703
690
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_pushByPropertyNameStopOrNot" class="tsd-anchor"></a>
|
|
704
691
|
<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>
|
|
705
692
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -747,7 +734,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
747
734
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
748
735
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_pushByPropertyNameStopOrNot">_pushByPropertyNameStopOrNot</a></p>
|
|
749
736
|
<ul>
|
|
750
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
737
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1432">src/data-structures/binary-tree/abstract-binary-tree.ts:1432</a></li></ul></aside></li></ul></section>
|
|
751
738
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_resetResults" class="tsd-anchor"></a>
|
|
752
739
|
<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>
|
|
753
740
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -759,7 +746,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
759
746
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
760
747
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_resetResults">_resetResults</a></p>
|
|
761
748
|
<ul>
|
|
762
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
749
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1408">src/data-structures/binary-tree/abstract-binary-tree.ts:1408</a></li></ul></aside></li></ul></section>
|
|
763
750
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setAutoIncrementId" class="tsd-anchor"></a>
|
|
764
751
|
<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>
|
|
765
752
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -773,7 +760,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
773
760
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
774
761
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_setAutoIncrementId">_setAutoIncrementId</a></p>
|
|
775
762
|
<ul>
|
|
776
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
763
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1377">src/data-structures/binary-tree/abstract-binary-tree.ts:1377</a></li></ul></aside></li></ul></section>
|
|
777
764
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setCount" class="tsd-anchor"></a>
|
|
778
765
|
<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>
|
|
779
766
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -787,7 +774,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
787
774
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
788
775
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_setCount">_setCount</a></p>
|
|
789
776
|
<ul>
|
|
790
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
777
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1401">src/data-structures/binary-tree/abstract-binary-tree.ts:1401</a></li></ul></aside></li></ul></section>
|
|
791
778
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setIsDuplicatedVal" class="tsd-anchor"></a>
|
|
792
779
|
<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>
|
|
793
780
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -801,7 +788,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
801
788
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
802
789
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_setIsDuplicatedVal">_setIsDuplicatedVal</a></p>
|
|
803
790
|
<ul>
|
|
804
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
791
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1385">src/data-structures/binary-tree/abstract-binary-tree.ts:1385</a></li></ul></aside></li></ul></section>
|
|
805
792
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setLoopType" class="tsd-anchor"></a>
|
|
806
793
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_set<wbr/>Loop<wbr/>Type</span><a href="#_setLoopType" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
807
794
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -815,7 +802,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
815
802
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
816
803
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_setLoopType">_setLoopType</a></p>
|
|
817
804
|
<ul>
|
|
818
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
805
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1353">src/data-structures/binary-tree/abstract-binary-tree.ts:1353</a></li></ul></aside></li></ul></section>
|
|
819
806
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setMaxId" class="tsd-anchor"></a>
|
|
820
807
|
<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>
|
|
821
808
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -829,7 +816,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
829
816
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
830
817
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_setMaxId">_setMaxId</a></p>
|
|
831
818
|
<ul>
|
|
832
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
819
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1381">src/data-structures/binary-tree/abstract-binary-tree.ts:1381</a></li></ul></aside></li></ul></section>
|
|
833
820
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setRoot" class="tsd-anchor"></a>
|
|
834
821
|
<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>
|
|
835
822
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -843,7 +830,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
843
830
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
844
831
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_setRoot">_setRoot</a></p>
|
|
845
832
|
<ul>
|
|
846
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
833
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1389">src/data-structures/binary-tree/abstract-binary-tree.ts:1389</a></li></ul></aside></li></ul></section>
|
|
847
834
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setSize" class="tsd-anchor"></a>
|
|
848
835
|
<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>
|
|
849
836
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -857,7 +844,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
857
844
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
858
845
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_setSize">_setSize</a></p>
|
|
859
846
|
<ul>
|
|
860
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
847
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1397">src/data-structures/binary-tree/abstract-binary-tree.ts:1397</a></li></ul></aside></li></ul></section>
|
|
861
848
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setVisitedId" class="tsd-anchor"></a>
|
|
862
849
|
<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>
|
|
863
850
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -871,7 +858,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
871
858
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
872
859
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_setVisitedId">_setVisitedId</a></p>
|
|
873
860
|
<ul>
|
|
874
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
861
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1357">src/data-structures/binary-tree/abstract-binary-tree.ts:1357</a></li></ul></aside></li></ul></section>
|
|
875
862
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setVisitedLeftSum" class="tsd-anchor"></a>
|
|
876
863
|
<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>
|
|
877
864
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -885,7 +872,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
885
872
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
886
873
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_setVisitedLeftSum">_setVisitedLeftSum</a></p>
|
|
887
874
|
<ul>
|
|
888
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
875
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1373">src/data-structures/binary-tree/abstract-binary-tree.ts:1373</a></li></ul></aside></li></ul></section>
|
|
889
876
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setVisitedNode" class="tsd-anchor"></a>
|
|
890
877
|
<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>
|
|
891
878
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -899,7 +886,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
899
886
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
900
887
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_setVisitedNode">_setVisitedNode</a></p>
|
|
901
888
|
<ul>
|
|
902
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
889
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1365">src/data-structures/binary-tree/abstract-binary-tree.ts:1365</a></li></ul></aside></li></ul></section>
|
|
903
890
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setVisitedVal" class="tsd-anchor"></a>
|
|
904
891
|
<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>
|
|
905
892
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -913,40 +900,44 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
913
900
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
914
901
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_setVisitedVal">_setVisitedVal</a></p>
|
|
915
902
|
<ul>
|
|
916
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
917
|
-
<section class="tsd-panel tsd-member"><a id="add" class="tsd-anchor"></a>
|
|
903
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1361">src/data-structures/binary-tree/abstract-binary-tree.ts:1361</a></li></ul></aside></li></ul></section>
|
|
904
|
+
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="add" class="tsd-anchor"></a>
|
|
918
905
|
<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>
|
|
919
|
-
<ul class="tsd-signatures">
|
|
906
|
+
<ul class="tsd-signatures tsd-is-inherited">
|
|
920
907
|
<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>
|
|
921
908
|
<li class="tsd-description">
|
|
922
|
-
<div class="tsd-comment tsd-typography"><p>The function
|
|
909
|
+
<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
|
|
910
|
+
the ID matches, and returns the inserted node.</p>
|
|
923
911
|
</div>
|
|
924
912
|
<div class="tsd-parameters">
|
|
925
913
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
926
914
|
<ul class="tsd-parameter-list">
|
|
927
915
|
<li>
|
|
928
916
|
<h5><span class="tsd-kind-parameter">id</span>: <span class="tsd-signature-type">number</span></h5>
|
|
929
|
-
<div class="tsd-comment tsd-typography"><p>The <code>id</code> parameter
|
|
917
|
+
<div class="tsd-comment tsd-typography"><p>The <code>id</code> parameter represents the identifier of the binary tree node. It is used to
|
|
918
|
+
determine the position of the node in the binary search tree.</p>
|
|
930
919
|
</div>
|
|
931
920
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
932
921
|
<li>
|
|
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></h5>
|
|
934
|
-
<div class="tsd-comment tsd-typography"><p>The <code>val</code> parameter represents the value
|
|
935
|
-
|
|
922
|
+
<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>
|
|
923
|
+
<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
|
|
924
|
+
be of type <code>N</code> (the generic type) or <code>null</code>.</p>
|
|
936
925
|
</div>
|
|
937
926
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
938
927
|
<li>
|
|
939
|
-
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">count</span>: <span class="tsd-signature-type">number</span></h5>
|
|
940
|
-
<div class="tsd-comment tsd-typography"><p>The <code>count</code> parameter
|
|
941
|
-
|
|
928
|
+
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">count</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 1</span></h5>
|
|
929
|
+
<div class="tsd-comment tsd-typography"><p>The <code>count</code> parameter represents the number of times the value should be inserted into
|
|
930
|
+
the binary search tree. By default, it is set to 1, meaning that if no count is specified, the value will be
|
|
931
|
+
inserted once.</p>
|
|
942
932
|
</div>
|
|
943
933
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
944
|
-
<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>add</code>
|
|
934
|
+
<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>
|
|
945
935
|
|
|
946
936
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
947
|
-
<p>
|
|
937
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#add">add</a></p>
|
|
938
|
+
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#add">add</a></p>
|
|
948
939
|
<ul>
|
|
949
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
940
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/bst.ts#L70">src/data-structures/binary-tree/bst.ts:70</a></li></ul></aside></li></ul></section>
|
|
950
941
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="addMany" class="tsd-anchor"></a>
|
|
951
942
|
<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>
|
|
952
943
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -967,37 +958,40 @@ array of <code>N</code> objects.</p>
|
|
|
967
958
|
<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>
|
|
968
959
|
|
|
969
960
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
961
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#addMany">addMany</a></p>
|
|
970
962
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#addMany">addMany</a></p>
|
|
971
963
|
<ul>
|
|
972
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
964
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L380">src/data-structures/binary-tree/abstract-binary-tree.ts:380</a></li></ul></aside></li></ul></section>
|
|
973
965
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="addTo" class="tsd-anchor"></a>
|
|
974
966
|
<h3 class="tsd-anchor-link"><span>add<wbr/>To</span><a href="#addTo" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
975
967
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
976
968
|
<li class="tsd-signature tsd-anchor-link" id="addTo.addTo-1"><span class="tsd-kind-call-signature">add<wbr/>To</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">newNode</span>, <span class="tsd-kind-parameter">parent</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><a href="#addTo.addTo-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
977
969
|
<li class="tsd-description">
|
|
978
|
-
<div class="tsd-comment tsd-typography"><p>The function
|
|
970
|
+
<div class="tsd-comment tsd-typography"><p>The function adds a new node to a binary tree as the left or right child of a given parent node.</p>
|
|
979
971
|
</div>
|
|
980
972
|
<div class="tsd-parameters">
|
|
981
973
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
982
974
|
<ul class="tsd-parameter-list">
|
|
983
975
|
<li>
|
|
984
976
|
<h5><span class="tsd-kind-parameter">newNode</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
985
|
-
<div class="tsd-comment tsd-typography"><p>The <code>newNode</code> parameter
|
|
986
|
-
<code>
|
|
977
|
+
<div class="tsd-comment tsd-typography"><p>The <code>newNode</code> parameter represents the node that you want to add to the tree. It can be
|
|
978
|
+
either a node object (<code>N</code>) or <code>null</code>.</p>
|
|
987
979
|
</div>
|
|
988
980
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
989
981
|
<li>
|
|
990
982
|
<h5><span class="tsd-kind-parameter">parent</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
991
|
-
<div class="tsd-comment tsd-typography"><p>The <code>parent</code> parameter
|
|
992
|
-
|
|
983
|
+
<div class="tsd-comment tsd-typography"><p>The <code>parent</code> parameter represents the parent node to which the new node will be added as a
|
|
984
|
+
child.</p>
|
|
993
985
|
</div>
|
|
994
986
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
995
|
-
<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>
|
|
987
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h4><p>either the left or right child node that was added to the parent node. It can also return <code>null</code> or
|
|
988
|
+
<code>undefined</code> in certain cases.</p>
|
|
996
989
|
|
|
997
990
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
991
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#addTo">addTo</a></p>
|
|
998
992
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#addTo">addTo</a></p>
|
|
999
993
|
<ul>
|
|
1000
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
994
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L340">src/data-structures/binary-tree/abstract-binary-tree.ts:340</a></li></ul></aside></li></ul></section>
|
|
1001
995
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="allGreaterNodesAdd" class="tsd-anchor"></a>
|
|
1002
996
|
<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>
|
|
1003
997
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1031,9 +1025,10 @@ defaults to 'id'.</p>
|
|
|
1031
1025
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>a boolean value.</p>
|
|
1032
1026
|
|
|
1033
1027
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1028
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#allGreaterNodesAdd">allGreaterNodesAdd</a></p>
|
|
1034
1029
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#allGreaterNodesAdd">allGreaterNodesAdd</a></p>
|
|
1035
1030
|
<ul>
|
|
1036
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1031
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/bst.ts#L362">src/data-structures/binary-tree/bst.ts:362</a></li></ul></aside></li></ul></section>
|
|
1037
1032
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="balance" class="tsd-anchor"></a>
|
|
1038
1033
|
<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>
|
|
1039
1034
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1045,9 +1040,10 @@ recursive or iterative approach.</p>
|
|
|
1045
1040
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>The <code>balance()</code> function returns a boolean value.</p>
|
|
1046
1041
|
|
|
1047
1042
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1043
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#balance">balance</a></p>
|
|
1048
1044
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#balance">balance</a></p>
|
|
1049
1045
|
<ul>
|
|
1050
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1046
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/bst.ts#L413">src/data-structures/binary-tree/bst.ts:413</a></li></ul></aside></li></ul></section>
|
|
1051
1047
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="clear" class="tsd-anchor"></a>
|
|
1052
1048
|
<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>
|
|
1053
1049
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1057,9 +1053,44 @@ recursive or iterative approach.</p>
|
|
|
1057
1053
|
</div>
|
|
1058
1054
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
1059
1055
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1056
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#clear">clear</a></p>
|
|
1060
1057
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#clear">clear</a></p>
|
|
1061
1058
|
<ul>
|
|
1062
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1059
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L263">src/data-structures/binary-tree/abstract-binary-tree.ts:263</a></li></ul></aside></li></ul></section>
|
|
1060
|
+
<section class="tsd-panel tsd-member"><a id="createNode" class="tsd-anchor"></a>
|
|
1061
|
+
<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>
|
|
1062
|
+
<ul class="tsd-signatures">
|
|
1063
|
+
<li class="tsd-signature tsd-anchor-link" id="createNode.createNode-1"><span class="tsd-kind-call-signature">create<wbr/>Node</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">id</span>, <span class="tsd-kind-parameter">val</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">count</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><a href="#createNode.createNode-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1064
|
+
<li class="tsd-description">
|
|
1065
|
+
<div class="tsd-comment tsd-typography"><p>The function creates a new BSTNode with the given id, value, and count.</p>
|
|
1066
|
+
</div>
|
|
1067
|
+
<div class="tsd-parameters">
|
|
1068
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1069
|
+
<ul class="tsd-parameter-list">
|
|
1070
|
+
<li>
|
|
1071
|
+
<h5><span class="tsd-kind-parameter">id</span>: <span class="tsd-signature-type">number</span></h5>
|
|
1072
|
+
<div class="tsd-comment tsd-typography"><p>The id parameter is the unique identifier for the binary tree node. It is used to
|
|
1073
|
+
distinguish one node from another in the tree.</p>
|
|
1074
|
+
</div>
|
|
1075
|
+
<div class="tsd-comment tsd-typography"></div></li>
|
|
1076
|
+
<li>
|
|
1077
|
+
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span></h5>
|
|
1078
|
+
<div class="tsd-comment tsd-typography"><p>The <code>val</code> parameter represents the value that will be stored in the binary search tree node.</p>
|
|
1079
|
+
</div>
|
|
1080
|
+
<div class="tsd-comment tsd-typography"></div></li>
|
|
1081
|
+
<li>
|
|
1082
|
+
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">count</span>: <span class="tsd-signature-type">number</span></h5>
|
|
1083
|
+
<div class="tsd-comment tsd-typography"><p>The "count" parameter is an optional parameter of type number. It represents the number of
|
|
1084
|
+
occurrences of the value in the binary search tree node. If not provided, the count will default to 1.</p>
|
|
1085
|
+
</div>
|
|
1086
|
+
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1087
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h4><p>A new instance of the BSTNode class with the specified id, value, and count (if provided).</p>
|
|
1088
|
+
|
|
1089
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1090
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#createNode">createNode</a></p>
|
|
1091
|
+
<p>Overrides <a href="BST.html">BST</a>.<a href="BST.html#createNode">createNode</a></p>
|
|
1092
|
+
<ul>
|
|
1093
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/tree-multiset.ts#L45">src/data-structures/binary-tree/tree-multiset.ts:45</a></li></ul></aside></li></ul></section>
|
|
1063
1094
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="fill" class="tsd-anchor"></a>
|
|
1064
1095
|
<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
1096
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1080,9 +1111,10 @@ array of <code>N</code> objects.</p>
|
|
|
1080
1111
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>The method is returning a boolean value.</p>
|
|
1081
1112
|
|
|
1082
1113
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1114
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#fill">fill</a></p>
|
|
1083
1115
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#fill">fill</a></p>
|
|
1084
1116
|
<ul>
|
|
1085
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1117
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L441">src/data-structures/binary-tree/abstract-binary-tree.ts:441</a></li></ul></aside></li></ul></section>
|
|
1086
1118
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="get" class="tsd-anchor"></a>
|
|
1087
1119
|
<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
1120
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1109,9 +1141,10 @@ specifies the property name to use for searching the binary search tree nodes. I
|
|
|
1109
1141
|
<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
1142
|
|
|
1111
1143
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1144
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#get">get</a></p>
|
|
1112
1145
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#get">get</a></p>
|
|
1113
1146
|
<ul>
|
|
1114
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1147
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/bst.ts#L144">src/data-structures/binary-tree/bst.ts:144</a></li></ul></aside></li></ul></section>
|
|
1115
1148
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getDepth" class="tsd-anchor"></a>
|
|
1116
1149
|
<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
1150
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1131,9 +1164,10 @@ meaning it can represent any type of data that we want to store in the node.</p>
|
|
|
1131
1164
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>The depth of the given binary tree node.</p>
|
|
1132
1165
|
|
|
1133
1166
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1167
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#getDepth">getDepth</a></p>
|
|
1134
1168
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getDepth">getDepth</a></p>
|
|
1135
1169
|
<ul>
|
|
1136
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1170
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L499">src/data-structures/binary-tree/abstract-binary-tree.ts:499</a></li></ul></aside></li></ul></section>
|
|
1137
1171
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getHeight" class="tsd-anchor"></a>
|
|
1138
1172
|
<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
1173
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1155,9 +1189,10 @@ If no value is provided for <code>beginRoot</code>, the function will use the <c
|
|
|
1155
1189
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>the height of the binary tree.</p>
|
|
1156
1190
|
|
|
1157
1191
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1192
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#getHeight">getHeight</a></p>
|
|
1158
1193
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getHeight">getHeight</a></p>
|
|
1159
1194
|
<ul>
|
|
1160
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1195
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L516">src/data-structures/binary-tree/abstract-binary-tree.ts:516</a></li></ul></aside></li></ul></section>
|
|
1161
1196
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getLeftMost" class="tsd-anchor"></a>
|
|
1162
1197
|
<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
1198
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1169,9 +1204,10 @@ recursion optimization.</p>
|
|
|
1169
1204
|
<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
1205
|
|
|
1171
1206
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1207
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#getLeftMost">getLeftMost</a></p>
|
|
1172
1208
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getLeftMost">getLeftMost</a></p>
|
|
1173
1209
|
<ul>
|
|
1174
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1210
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L703">src/data-structures/binary-tree/abstract-binary-tree.ts:703</a></li></ul></aside></li>
|
|
1175
1211
|
<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
1212
|
<li class="tsd-description">
|
|
1177
1213
|
<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
|
|
@@ -1189,9 +1225,10 @@ provided, the function will use the root node of the binary tree.</p>
|
|
|
1189
1225
|
<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
1226
|
|
|
1191
1227
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1228
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#getLeftMost">getLeftMost</a></p>
|
|
1192
1229
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getLeftMost">getLeftMost</a></p>
|
|
1193
1230
|
<ul>
|
|
1194
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1231
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L705">src/data-structures/binary-tree/abstract-binary-tree.ts:705</a></li></ul></aside></li></ul></section>
|
|
1195
1232
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getMinHeight" class="tsd-anchor"></a>
|
|
1196
1233
|
<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
1234
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1213,9 +1250,10 @@ tree. If no value is provided for <code>beginRoot</code>, the function will use
|
|
|
1213
1250
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>The function <code>getMinHeight</code> returns the minimum height of the binary tree.</p>
|
|
1214
1251
|
|
|
1215
1252
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1253
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#getMinHeight">getMinHeight</a></p>
|
|
1216
1254
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getMinHeight">getMinHeight</a></p>
|
|
1217
1255
|
<ul>
|
|
1218
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1256
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L565">src/data-structures/binary-tree/abstract-binary-tree.ts:565</a></li></ul></aside></li></ul></section>
|
|
1219
1257
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getNodes" class="tsd-anchor"></a>
|
|
1220
1258
|
<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
1259
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1250,9 +1288,10 @@ to false or not provided, the function will return all nodes that match the give
|
|
|
1250
1288
|
<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
1289
|
|
|
1252
1290
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1291
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#getNodes">getNodes</a></p>
|
|
1253
1292
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getNodes">getNodes</a></p>
|
|
1254
1293
|
<ul>
|
|
1255
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1294
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/bst.ts#L234">src/data-structures/binary-tree/bst.ts:234</a></li></ul></aside></li></ul></section>
|
|
1256
1295
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getPathToRoot" class="tsd-anchor"></a>
|
|
1257
1296
|
<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
1297
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1273,9 +1312,10 @@ root of a binary tree.</p>
|
|
|
1273
1312
|
the given <code>node</code> to the root of the binary tree.</p>
|
|
1274
1313
|
|
|
1275
1314
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1315
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#getPathToRoot">getPathToRoot</a></p>
|
|
1276
1316
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getPathToRoot">getPathToRoot</a></p>
|
|
1277
1317
|
<ul>
|
|
1278
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1318
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L693">src/data-structures/binary-tree/abstract-binary-tree.ts:693</a></li></ul></aside></li></ul></section>
|
|
1279
1319
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getPredecessor" class="tsd-anchor"></a>
|
|
1280
1320
|
<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
1321
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1294,9 +1334,10 @@ the given <code>node</code> to the root of the binary tree.</p>
|
|
|
1294
1334
|
<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
1335
|
|
|
1296
1336
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1337
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#getPredecessor">getPredecessor</a></p>
|
|
1297
1338
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getPredecessor">getPredecessor</a></p>
|
|
1298
1339
|
<ul>
|
|
1299
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1340
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1231">src/data-structures/binary-tree/abstract-binary-tree.ts:1231</a></li></ul></aside></li></ul></section>
|
|
1300
1341
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getRightMost" class="tsd-anchor"></a>
|
|
1301
1342
|
<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
1343
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1308,9 +1349,10 @@ tail recursion optimization.</p>
|
|
|
1308
1349
|
<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
1350
|
|
|
1310
1351
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1352
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#getRightMost">getRightMost</a></p>
|
|
1311
1353
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getRightMost">getRightMost</a></p>
|
|
1312
1354
|
<ul>
|
|
1313
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1355
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L738">src/data-structures/binary-tree/abstract-binary-tree.ts:738</a></li></ul></aside></li>
|
|
1314
1356
|
<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
1357
|
<li class="tsd-description">
|
|
1316
1358
|
<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
|
|
@@ -1328,9 +1370,10 @@ provided, the function will use the root node of the binary tree.</p>
|
|
|
1328
1370
|
<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
1371
|
|
|
1330
1372
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1373
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#getRightMost">getRightMost</a></p>
|
|
1331
1374
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getRightMost">getRightMost</a></p>
|
|
1332
1375
|
<ul>
|
|
1333
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1376
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L740">src/data-structures/binary-tree/abstract-binary-tree.ts:740</a></li></ul></aside></li></ul></section>
|
|
1334
1377
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getSubTreeSizeAndCount" class="tsd-anchor"></a>
|
|
1335
1378
|
<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
1379
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1352,9 +1395,10 @@ tree.</p>
|
|
|
1352
1395
|
represents the size of the subtree, and the second element represents the count of the nodes in the subtree.</p>
|
|
1353
1396
|
|
|
1354
1397
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1398
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#getSubTreeSizeAndCount">getSubTreeSizeAndCount</a></p>
|
|
1355
1399
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getSubTreeSizeAndCount">getSubTreeSizeAndCount</a></p>
|
|
1356
1400
|
<ul>
|
|
1357
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1401
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L825">src/data-structures/binary-tree/abstract-binary-tree.ts:825</a></li></ul></aside></li></ul></section>
|
|
1358
1402
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="has" class="tsd-anchor"></a>
|
|
1359
1403
|
<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
1404
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1381,9 +1425,10 @@ specifies the name of the property to check for in the nodes.</p>
|
|
|
1381
1425
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>a boolean value.</p>
|
|
1382
1426
|
|
|
1383
1427
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1428
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#has">has</a></p>
|
|
1384
1429
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#has">has</a></p>
|
|
1385
1430
|
<ul>
|
|
1386
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1431
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L668">src/data-structures/binary-tree/abstract-binary-tree.ts:668</a></li></ul></aside></li></ul></section>
|
|
1387
1432
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="isAVLBalanced" class="tsd-anchor"></a>
|
|
1388
1433
|
<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
1434
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1395,32 +1440,55 @@ specifies the name of the property to check for in the nodes.</p>
|
|
|
1395
1440
|
is balanced according to the AVL tree property, and <code>false</code> otherwise.</p>
|
|
1396
1441
|
|
|
1397
1442
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1443
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#isAVLBalanced">isAVLBalanced</a></p>
|
|
1398
1444
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#isAVLBalanced">isAVLBalanced</a></p>
|
|
1399
1445
|
<ul>
|
|
1400
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1446
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/bst.ts#L454">src/data-structures/binary-tree/bst.ts:454</a></li></ul></aside></li></ul></section>
|
|
1401
1447
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="isBST" class="tsd-anchor"></a>
|
|
1402
1448
|
<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>
|
|
1403
1449
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
1404
1450
|
<li class="tsd-signature tsd-anchor-link" id="isBST.isBST-1"><span class="tsd-kind-call-signature">isBST</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#isBST.isBST-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1405
1451
|
<li class="tsd-description">
|
|
1406
|
-
<div class="tsd-comment tsd-typography"><p>The
|
|
1452
|
+
<div class="tsd-comment tsd-typography"><p>The function checks if a binary tree is a binary search tree.</p>
|
|
1407
1453
|
</div>
|
|
1408
1454
|
<div class="tsd-parameters">
|
|
1409
1455
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1410
1456
|
<ul class="tsd-parameter-list">
|
|
1411
1457
|
<li>
|
|
1412
1458
|
<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>
|
|
1413
|
-
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is
|
|
1414
|
-
|
|
1459
|
+
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is of type <code>N</code> or <code>null</code>. It represents the root node of a binary
|
|
1460
|
+
search tree (BST).</p>
|
|
1415
1461
|
</div>
|
|
1416
1462
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1417
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>
|
|
1418
|
-
tree, and <code>false</code> otherwise.</p>
|
|
1463
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>a boolean value.</p>
|
|
1419
1464
|
|
|
1420
1465
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1466
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#isBST">isBST</a></p>
|
|
1421
1467
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#isBST">isBST</a></p>
|
|
1422
1468
|
<ul>
|
|
1423
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1469
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L813">src/data-structures/binary-tree/abstract-binary-tree.ts:813</a></li></ul></aside></li></ul></section>
|
|
1470
|
+
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="isBSTByRooted" class="tsd-anchor"></a>
|
|
1471
|
+
<h3 class="tsd-anchor-link"><span>isBSTBy<wbr/>Rooted</span><a href="#isBSTByRooted" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1472
|
+
<ul class="tsd-signatures tsd-is-inherited">
|
|
1473
|
+
<li class="tsd-signature tsd-anchor-link" id="isBSTByRooted.isBSTByRooted-1"><span class="tsd-kind-call-signature">isBSTBy<wbr/>Rooted</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#isBSTByRooted.isBSTByRooted-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1474
|
+
<li class="tsd-description">
|
|
1475
|
+
<div class="tsd-comment tsd-typography"><p>The function <code>isBSTByRooted</code> checks if a binary tree is a binary search tree (BST) by rooted traversal.</p>
|
|
1476
|
+
</div>
|
|
1477
|
+
<div class="tsd-parameters">
|
|
1478
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1479
|
+
<ul class="tsd-parameter-list">
|
|
1480
|
+
<li>
|
|
1481
|
+
<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>
|
|
1482
|
+
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter represents the root node of a binary search tree (BST).</p>
|
|
1483
|
+
</div>
|
|
1484
|
+
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1485
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>a boolean value.</p>
|
|
1486
|
+
|
|
1487
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1488
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#isBSTByRooted">isBSTByRooted</a></p>
|
|
1489
|
+
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#isBSTByRooted">isBSTByRooted</a></p>
|
|
1490
|
+
<ul>
|
|
1491
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L778">src/data-structures/binary-tree/abstract-binary-tree.ts:778</a></li></ul></aside></li></ul></section>
|
|
1424
1492
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="isBalanced" class="tsd-anchor"></a>
|
|
1425
1493
|
<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>
|
|
1426
1494
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1440,9 +1508,10 @@ of type <code>N | null</code>, which means it can either be a <code>BinaryTreeNo
|
|
|
1440
1508
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>The method is returning a boolean value.</p>
|
|
1441
1509
|
|
|
1442
1510
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1511
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#isBalanced">isBalanced</a></p>
|
|
1443
1512
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#isBalanced">isBalanced</a></p>
|
|
1444
1513
|
<ul>
|
|
1445
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1514
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L613">src/data-structures/binary-tree/abstract-binary-tree.ts:613</a></li></ul></aside></li></ul></section>
|
|
1446
1515
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="isEmpty" class="tsd-anchor"></a>
|
|
1447
1516
|
<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>
|
|
1448
1517
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1453,9 +1522,10 @@ of type <code>N | null</code>, which means it can either be a <code>BinaryTreeNo
|
|
|
1453
1522
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>A boolean value indicating whether the size of the object is 0 or not.</p>
|
|
1454
1523
|
|
|
1455
1524
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1525
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#isEmpty">isEmpty</a></p>
|
|
1456
1526
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#isEmpty">isEmpty</a></p>
|
|
1457
1527
|
<ul>
|
|
1458
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1528
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L274">src/data-structures/binary-tree/abstract-binary-tree.ts:274</a></li></ul></aside></li></ul></section>
|
|
1459
1529
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="lastKey" class="tsd-anchor"></a>
|
|
1460
1530
|
<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>
|
|
1461
1531
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1470,9 +1540,10 @@ greater than, it returns the ID of the leftmost node. Otherwise, it also returns
|
|
|
1470
1540
|
there are no nodes in</p>
|
|
1471
1541
|
|
|
1472
1542
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1543
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#lastKey">lastKey</a></p>
|
|
1473
1544
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#lastKey">lastKey</a></p>
|
|
1474
1545
|
<ul>
|
|
1475
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1546
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/bst.ts#L157">src/data-structures/binary-tree/bst.ts:157</a></li></ul></aside></li></ul></section>
|
|
1476
1547
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="lesserSum" class="tsd-anchor"></a>
|
|
1477
1548
|
<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>
|
|
1478
1549
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1500,9 +1571,10 @@ specifies the property of the binary tree node to use for calculating the sum. I
|
|
|
1500
1571
|
binary search tree that have a property value lesser than the given <code>id</code>.</p>
|
|
1501
1572
|
|
|
1502
1573
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1574
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#lesserSum">lesserSum</a></p>
|
|
1503
1575
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#lesserSum">lesserSum</a></p>
|
|
1504
1576
|
<ul>
|
|
1505
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1577
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/bst.ts#L285">src/data-structures/binary-tree/bst.ts:285</a></li></ul></aside></li></ul></section>
|
|
1506
1578
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="levelIterative" class="tsd-anchor"></a>
|
|
1507
1579
|
<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>
|
|
1508
1580
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1521,12 +1593,13 @@ node for the level order traversal. It can be null if no specific node is provid
|
|
|
1521
1593
|
the tree is used as the starting node.</p>
|
|
1522
1594
|
</div>
|
|
1523
1595
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1524
|
-
<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>
|
|
1596
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>levelIterative</code> returns an object of type <code>AbstractBinaryTreeNodeProperties<N></code>.</p>
|
|
1525
1597
|
|
|
1526
1598
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1599
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#levelIterative">levelIterative</a></p>
|
|
1527
1600
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#levelIterative">levelIterative</a></p>
|
|
1528
1601
|
<ul>
|
|
1529
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1602
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1108">src/data-structures/binary-tree/abstract-binary-tree.ts:1108</a></li></ul></aside></li>
|
|
1530
1603
|
<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>
|
|
1531
1604
|
<li class="tsd-description">
|
|
1532
1605
|
<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
|
|
@@ -1550,12 +1623,13 @@ will accumulate results based on that property. If no property name is provided,
|
|
|
1550
1623
|
accumulating results</p>
|
|
1551
1624
|
</div>
|
|
1552
1625
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1553
|
-
<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>
|
|
1626
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>levelIterative</code> returns an object of type <code>AbstractBinaryTreeNodeProperties<N></code>.</p>
|
|
1554
1627
|
|
|
1555
1628
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1629
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#levelIterative">levelIterative</a></p>
|
|
1556
1630
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#levelIterative">levelIterative</a></p>
|
|
1557
1631
|
<ul>
|
|
1558
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1632
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1110">src/data-structures/binary-tree/abstract-binary-tree.ts:1110</a></li></ul></aside></li>
|
|
1559
1633
|
<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>
|
|
1560
1634
|
<li class="tsd-description">
|
|
1561
1635
|
<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
|
|
@@ -1579,12 +1653,13 @@ will accumulate results based on that property. If no property name is provided,
|
|
|
1579
1653
|
accumulating results</p>
|
|
1580
1654
|
</div>
|
|
1581
1655
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1582
|
-
<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>
|
|
1656
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>levelIterative</code> returns an object of type <code>AbstractBinaryTreeNodeProperties<N></code>.</p>
|
|
1583
1657
|
|
|
1584
1658
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1659
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#levelIterative">levelIterative</a></p>
|
|
1585
1660
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#levelIterative">levelIterative</a></p>
|
|
1586
1661
|
<ul>
|
|
1587
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1662
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1112">src/data-structures/binary-tree/abstract-binary-tree.ts:1112</a></li></ul></aside></li>
|
|
1588
1663
|
<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>
|
|
1589
1664
|
<li class="tsd-description">
|
|
1590
1665
|
<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
|
|
@@ -1608,12 +1683,13 @@ will accumulate results based on that property. If no property name is provided,
|
|
|
1608
1683
|
accumulating results</p>
|
|
1609
1684
|
</div>
|
|
1610
1685
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1611
|
-
<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>
|
|
1686
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>levelIterative</code> returns an object of type <code>AbstractBinaryTreeNodeProperties<N></code>.</p>
|
|
1612
1687
|
|
|
1613
1688
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1689
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#levelIterative">levelIterative</a></p>
|
|
1614
1690
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#levelIterative">levelIterative</a></p>
|
|
1615
1691
|
<ul>
|
|
1616
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1692
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1114">src/data-structures/binary-tree/abstract-binary-tree.ts:1114</a></li></ul></aside></li>
|
|
1617
1693
|
<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>
|
|
1618
1694
|
<li class="tsd-description">
|
|
1619
1695
|
<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
|
|
@@ -1637,12 +1713,13 @@ will accumulate results based on that property. If no property name is provided,
|
|
|
1637
1713
|
accumulating results</p>
|
|
1638
1714
|
</div>
|
|
1639
1715
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1640
|
-
<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>
|
|
1716
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>levelIterative</code> returns an object of type <code>AbstractBinaryTreeNodeProperties<N></code>.</p>
|
|
1641
1717
|
|
|
1642
1718
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1719
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#levelIterative">levelIterative</a></p>
|
|
1643
1720
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#levelIterative">levelIterative</a></p>
|
|
1644
1721
|
<ul>
|
|
1645
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1722
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1116">src/data-structures/binary-tree/abstract-binary-tree.ts:1116</a></li></ul></aside></li></ul></section>
|
|
1646
1723
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="listLevels" class="tsd-anchor"></a>
|
|
1647
1724
|
<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>
|
|
1648
1725
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1659,12 +1736,13 @@ accumulating results</p>
|
|
|
1659
1736
|
root node of a binary tree. If it is null, the function will use the root node of the current binary tree instance.</p>
|
|
1660
1737
|
</div>
|
|
1661
1738
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1662
|
-
<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>
|
|
1739
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>listLevels</code> returns a 2D array of <code>AbstractBinaryTreeNodeProperty<N></code> objects.</p>
|
|
1663
1740
|
|
|
1664
1741
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1742
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#listLevels">listLevels</a></p>
|
|
1665
1743
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#listLevels">listLevels</a></p>
|
|
1666
1744
|
<ul>
|
|
1667
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1745
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1154">src/data-structures/binary-tree/abstract-binary-tree.ts:1154</a></li></ul></aside></li>
|
|
1668
1746
|
<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>
|
|
1669
1747
|
<li class="tsd-description">
|
|
1670
1748
|
<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>
|
|
@@ -1685,12 +1763,13 @@ specifies the property of the <code>BinaryTreeNode</code> object to collect at e
|
|
|
1685
1763
|
values:</p>
|
|
1686
1764
|
</div>
|
|
1687
1765
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1688
|
-
<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>
|
|
1766
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>listLevels</code> returns a 2D array of <code>AbstractBinaryTreeNodeProperty<N></code> objects.</p>
|
|
1689
1767
|
|
|
1690
1768
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1769
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#listLevels">listLevels</a></p>
|
|
1691
1770
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#listLevels">listLevels</a></p>
|
|
1692
1771
|
<ul>
|
|
1693
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1772
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1156">src/data-structures/binary-tree/abstract-binary-tree.ts:1156</a></li></ul></aside></li>
|
|
1694
1773
|
<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>
|
|
1695
1774
|
<li class="tsd-description">
|
|
1696
1775
|
<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>
|
|
@@ -1711,12 +1790,13 @@ specifies the property of the <code>BinaryTreeNode</code> object to collect at e
|
|
|
1711
1790
|
values:</p>
|
|
1712
1791
|
</div>
|
|
1713
1792
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1714
|
-
<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>
|
|
1793
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>listLevels</code> returns a 2D array of <code>AbstractBinaryTreeNodeProperty<N></code> objects.</p>
|
|
1715
1794
|
|
|
1716
1795
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1796
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#listLevels">listLevels</a></p>
|
|
1717
1797
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#listLevels">listLevels</a></p>
|
|
1718
1798
|
<ul>
|
|
1719
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1799
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1158">src/data-structures/binary-tree/abstract-binary-tree.ts:1158</a></li></ul></aside></li>
|
|
1720
1800
|
<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>
|
|
1721
1801
|
<li class="tsd-description">
|
|
1722
1802
|
<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>
|
|
@@ -1737,12 +1817,13 @@ specifies the property of the <code>BinaryTreeNode</code> object to collect at e
|
|
|
1737
1817
|
values:</p>
|
|
1738
1818
|
</div>
|
|
1739
1819
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1740
|
-
<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>
|
|
1820
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>listLevels</code> returns a 2D array of <code>AbstractBinaryTreeNodeProperty<N></code> objects.</p>
|
|
1741
1821
|
|
|
1742
1822
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1823
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#listLevels">listLevels</a></p>
|
|
1743
1824
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#listLevels">listLevels</a></p>
|
|
1744
1825
|
<ul>
|
|
1745
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1826
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1160">src/data-structures/binary-tree/abstract-binary-tree.ts:1160</a></li></ul></aside></li>
|
|
1746
1827
|
<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>
|
|
1747
1828
|
<li class="tsd-description">
|
|
1748
1829
|
<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>
|
|
@@ -1763,12 +1844,13 @@ specifies the property of the <code>BinaryTreeNode</code> object to collect at e
|
|
|
1763
1844
|
values:</p>
|
|
1764
1845
|
</div>
|
|
1765
1846
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1766
|
-
<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>
|
|
1847
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>listLevels</code> returns a 2D array of <code>AbstractBinaryTreeNodeProperty<N></code> objects.</p>
|
|
1767
1848
|
|
|
1768
1849
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1850
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#listLevels">listLevels</a></p>
|
|
1769
1851
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#listLevels">listLevels</a></p>
|
|
1770
1852
|
<ul>
|
|
1771
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1853
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1162">src/data-structures/binary-tree/abstract-binary-tree.ts:1162</a></li></ul></aside></li></ul></section>
|
|
1772
1854
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="morris" class="tsd-anchor"></a>
|
|
1773
1855
|
<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>
|
|
1774
1856
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1779,12 +1861,13 @@ traversal algorithm and returns the results based on the specified property name
|
|
|
1779
1861
|
The time complexity of Morris traversal is O(n), it's may slower than others
|
|
1780
1862
|
The space complexity Morris traversal is O(1) because no using stack</p>
|
|
1781
1863
|
</div>
|
|
1782
|
-
<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>
|
|
1864
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>morris</code> returns an object of type <code>AbstractBinaryTreeNodeProperties<N></code>.</p>
|
|
1783
1865
|
|
|
1784
1866
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1867
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#morris">morris</a></p>
|
|
1785
1868
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#morris">morris</a></p>
|
|
1786
1869
|
<ul>
|
|
1787
|
-
<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/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1245">src/data-structures/binary-tree/abstract-binary-tree.ts:1245</a></li></ul></aside></li>
|
|
1788
1871
|
<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>
|
|
1789
1872
|
<li class="tsd-description">
|
|
1790
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
|
|
@@ -1808,12 +1891,13 @@ property of the nodes that you want to retrieve in the results. It can be either
|
|
|
1808
1891
|
property. If not provided, it defaults to <code>'id'</code>.</p>
|
|
1809
1892
|
</div>
|
|
1810
1893
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1811
|
-
<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>AbstractBinaryTreeNodeProperties<N></code>.</p>
|
|
1812
1895
|
|
|
1813
1896
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1897
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#morris">morris</a></p>
|
|
1814
1898
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#morris">morris</a></p>
|
|
1815
1899
|
<ul>
|
|
1816
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1900
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1247">src/data-structures/binary-tree/abstract-binary-tree.ts:1247</a></li></ul></aside></li>
|
|
1817
1901
|
<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>
|
|
1818
1902
|
<li class="tsd-description">
|
|
1819
1903
|
<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
|
|
@@ -1837,12 +1921,13 @@ property of the nodes that you want to retrieve in the results. It can be either
|
|
|
1837
1921
|
property. If not provided, it defaults to <code>'id'</code>.</p>
|
|
1838
1922
|
</div>
|
|
1839
1923
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1840
|
-
<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>
|
|
1924
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>morris</code> returns an object of type <code>AbstractBinaryTreeNodeProperties<N></code>.</p>
|
|
1841
1925
|
|
|
1842
1926
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1927
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#morris">morris</a></p>
|
|
1843
1928
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#morris">morris</a></p>
|
|
1844
1929
|
<ul>
|
|
1845
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1930
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1249">src/data-structures/binary-tree/abstract-binary-tree.ts:1249</a></li></ul></aside></li>
|
|
1846
1931
|
<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>
|
|
1847
1932
|
<li class="tsd-description">
|
|
1848
1933
|
<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
|
|
@@ -1866,12 +1951,13 @@ property of the nodes that you want to retrieve in the results. It can be either
|
|
|
1866
1951
|
property. If not provided, it defaults to <code>'id'</code>.</p>
|
|
1867
1952
|
</div>
|
|
1868
1953
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1869
|
-
<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>
|
|
1954
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>morris</code> returns an object of type <code>AbstractBinaryTreeNodeProperties<N></code>.</p>
|
|
1870
1955
|
|
|
1871
1956
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1957
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#morris">morris</a></p>
|
|
1872
1958
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#morris">morris</a></p>
|
|
1873
1959
|
<ul>
|
|
1874
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1960
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1251">src/data-structures/binary-tree/abstract-binary-tree.ts:1251</a></li></ul></aside></li>
|
|
1875
1961
|
<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>
|
|
1876
1962
|
<li class="tsd-description">
|
|
1877
1963
|
<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
|
|
@@ -1895,42 +1981,44 @@ property of the nodes that you want to retrieve in the results. It can be either
|
|
|
1895
1981
|
property. If not provided, it defaults to <code>'id'</code>.</p>
|
|
1896
1982
|
</div>
|
|
1897
1983
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1898
|
-
<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>
|
|
1984
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>morris</code> returns an object of type <code>AbstractBinaryTreeNodeProperties<N></code>.</p>
|
|
1899
1985
|
|
|
1900
1986
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1987
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#morris">morris</a></p>
|
|
1901
1988
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#morris">morris</a></p>
|
|
1902
1989
|
<ul>
|
|
1903
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1904
|
-
<section class="tsd-panel tsd-member"><a id="remove" class="tsd-anchor"></a>
|
|
1990
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1253">src/data-structures/binary-tree/abstract-binary-tree.ts:1253</a></li></ul></aside></li></ul></section>
|
|
1991
|
+
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="remove" class="tsd-anchor"></a>
|
|
1905
1992
|
<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>
|
|
1906
|
-
<ul class="tsd-signatures">
|
|
1907
|
-
<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">
|
|
1993
|
+
<ul class="tsd-signatures tsd-is-inherited">
|
|
1994
|
+
<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>
|
|
1908
1995
|
<li class="tsd-description">
|
|
1909
|
-
<div class="tsd-comment tsd-typography"><p>The function
|
|
1910
|
-
|
|
1996
|
+
<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
|
|
1997
|
+
the deleted node and any nodes that need to be balanced.</p>
|
|
1911
1998
|
</div>
|
|
1912
1999
|
<div class="tsd-parameters">
|
|
1913
2000
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1914
2001
|
<ul class="tsd-parameter-list">
|
|
1915
2002
|
<li>
|
|
1916
2003
|
<h5><span class="tsd-kind-parameter">id</span>: <span class="tsd-signature-type">number</span></h5>
|
|
1917
|
-
<div class="tsd-comment tsd-typography"><p>The <code>id</code> parameter
|
|
1918
|
-
|
|
2004
|
+
<div class="tsd-comment tsd-typography"><p>The <code>id</code> parameter is the identifier of the binary tree node that needs to be removed
|
|
2005
|
+
from the binary search tree.</p>
|
|
1919
2006
|
</div>
|
|
1920
2007
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
1921
2008
|
<li>
|
|
1922
|
-
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">
|
|
1923
|
-
<div class="tsd-comment tsd-typography"><p>
|
|
1924
|
-
|
|
1925
|
-
set to
|
|
2009
|
+
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">ignoreCount</span>: <span class="tsd-signature-type">boolean</span></h5>
|
|
2010
|
+
<div class="tsd-comment tsd-typography"><p>A boolean flag indicating whether to ignore the count of the node being removed. If
|
|
2011
|
+
set to true, the count of the node will not be considered and the node will be removed regardless of its count. If
|
|
2012
|
+
set to false or not provided, the count of the node will be taken into account and the</p>
|
|
1926
2013
|
</div>
|
|
1927
2014
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1928
|
-
<h4 class="tsd-returns-title">Returns <a href="../types/
|
|
2015
|
+
<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>
|
|
1929
2016
|
|
|
1930
2017
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1931
|
-
<p>
|
|
2018
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#remove">remove</a></p>
|
|
2019
|
+
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#remove">remove</a></p>
|
|
1932
2020
|
<ul>
|
|
1933
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
2021
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/bst.ts#L173">src/data-structures/binary-tree/bst.ts:173</a></li></ul></aside></li></ul></section>
|
|
1934
2022
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="setVisitedCount" class="tsd-anchor"></a>
|
|
1935
2023
|
<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>
|
|
1936
2024
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -1944,7 +2032,7 @@ set to <code>true</code>, the left sum of all nodes will be recalculated. If it<
|
|
|
1944
2032
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
1945
2033
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#setVisitedCount">setVisitedCount</a></p>
|
|
1946
2034
|
<ul>
|
|
1947
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
2035
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1369">src/data-structures/binary-tree/abstract-binary-tree.ts:1369</a></li></ul></aside></li></ul></section>
|
|
1948
2036
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="subTreeAdd" class="tsd-anchor"></a>
|
|
1949
2037
|
<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>
|
|
1950
2038
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1975,9 +2063,10 @@ specifies the property of the <code>BinaryTreeNode</code> that should be modifie
|
|
|
1975
2063
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>a boolean value, which is <code>true</code>.</p>
|
|
1976
2064
|
|
|
1977
2065
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
2066
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#subTreeAdd">subTreeAdd</a></p>
|
|
1978
2067
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#subTreeAdd">subTreeAdd</a></p>
|
|
1979
2068
|
<ul>
|
|
1980
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
2069
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L922">src/data-structures/binary-tree/abstract-binary-tree.ts:922</a></li></ul></aside></li></ul></section>
|
|
1981
2070
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="subTreeSum" class="tsd-anchor"></a>
|
|
1982
2071
|
<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>
|
|
1983
2072
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -2005,9 +2094,10 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
2005
2094
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>a number, which is the sum of the values of the nodes in the subtree rooted at <code>subTreeRoot</code>.</p>
|
|
2006
2095
|
|
|
2007
2096
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
2097
|
+
<p>Implementation of <a href="../interfaces/IBST.html">IBST</a>.<a href="../interfaces/IBST.html#subTreeSum">subTreeSum</a></p>
|
|
2008
2098
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#subTreeSum">subTreeSum</a></p>
|
|
2009
2099
|
<ul>
|
|
2010
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
2100
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L866">src/data-structures/binary-tree/abstract-binary-tree.ts:866</a></li></ul></aside></li></ul></section></section></div>
|
|
2011
2101
|
<div class="col-sidebar">
|
|
2012
2102
|
<div class="page-menu">
|
|
2013
2103
|
<div class="tsd-navigation settings">
|
|
@@ -2027,7 +2117,7 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
2027
2117
|
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="#icon-chevronDown"></use></svg>On This Page</h3></summary>
|
|
2028
2118
|
<div class="tsd-accordion-details">
|
|
2029
2119
|
<ul>
|
|
2030
|
-
<li><a href="#constructor" class="
|
|
2120
|
+
<li><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-512"></use></svg><span>constructor</span></a></li>
|
|
2031
2121
|
<li><a href="#_comparator" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_comparator</span></a></li>
|
|
2032
2122
|
<li><a href="#autoIncrementId" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>auto<wbr/>Increment<wbr/>Id</span></a></li>
|
|
2033
2123
|
<li><a href="#count" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>count</span></a></li>
|
|
@@ -2046,7 +2136,6 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
2046
2136
|
<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>
|
|
2047
2137
|
<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>
|
|
2048
2138
|
<li><a href="#_compare" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_compare</span></a></li>
|
|
2049
|
-
<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>
|
|
2050
2139
|
<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>
|
|
2051
2140
|
<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>
|
|
2052
2141
|
<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>
|
|
@@ -2061,12 +2150,13 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
2061
2150
|
<li><a href="#_setVisitedLeftSum" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_set<wbr/>Visited<wbr/>Left<wbr/>Sum</span></a></li>
|
|
2062
2151
|
<li><a href="#_setVisitedNode" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_set<wbr/>Visited<wbr/>Node</span></a></li>
|
|
2063
2152
|
<li><a href="#_setVisitedVal" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_set<wbr/>Visited<wbr/>Val</span></a></li>
|
|
2064
|
-
<li><a href="#add" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>add</span></a></li>
|
|
2153
|
+
<li><a href="#add" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>add</span></a></li>
|
|
2065
2154
|
<li><a href="#addMany" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>add<wbr/>Many</span></a></li>
|
|
2066
2155
|
<li><a href="#addTo" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>add<wbr/>To</span></a></li>
|
|
2067
2156
|
<li><a href="#allGreaterNodesAdd" class="tsd-is-inherited"><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>
|
|
2068
2157
|
<li><a href="#balance" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>balance</span></a></li>
|
|
2069
2158
|
<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>
|
|
2159
|
+
<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>
|
|
2070
2160
|
<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>
|
|
2071
2161
|
<li><a href="#get" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get</span></a></li>
|
|
2072
2162
|
<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>
|
|
@@ -2081,6 +2171,7 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
2081
2171
|
<li><a href="#has" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>has</span></a></li>
|
|
2082
2172
|
<li><a href="#isAVLBalanced" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>isAVLBalanced</span></a></li>
|
|
2083
2173
|
<li><a href="#isBST" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>isBST</span></a></li>
|
|
2174
|
+
<li><a href="#isBSTByRooted" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>isBSTBy<wbr/>Rooted</span></a></li>
|
|
2084
2175
|
<li><a href="#isBalanced" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>is<wbr/>Balanced</span></a></li>
|
|
2085
2176
|
<li><a href="#isEmpty" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>is<wbr/>Empty</span></a></li>
|
|
2086
2177
|
<li><a href="#lastKey" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>last<wbr/>Key</span></a></li>
|
|
@@ -2088,7 +2179,7 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
2088
2179
|
<li><a href="#levelIterative" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>level<wbr/>Iterative</span></a></li>
|
|
2089
2180
|
<li><a href="#listLevels" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>list<wbr/>Levels</span></a></li>
|
|
2090
2181
|
<li><a href="#morris" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>morris</span></a></li>
|
|
2091
|
-
<li><a href="#remove" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>remove</span></a></li>
|
|
2182
|
+
<li><a href="#remove" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>remove</span></a></li>
|
|
2092
2183
|
<li><a href="#setVisitedCount" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>set<wbr/>Visited<wbr/>Count</span></a></li>
|
|
2093
2184
|
<li><a href="#subTreeAdd" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>sub<wbr/>Tree<wbr/>Add</span></a></li>
|
|
2094
2185
|
<li><a href="#subTreeSum" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>sub<wbr/>Tree<wbr/>Sum</span></a></li></ul></div></details></div>
|
|
@@ -2098,10 +2189,13 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
2098
2189
|
<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>
|
|
2099
2190
|
<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>
|
|
2100
2191
|
<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>
|
|
2192
|
+
<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>
|
|
2101
2193
|
<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>
|
|
2102
2194
|
<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>
|
|
2103
2195
|
<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>
|
|
2104
2196
|
<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>
|
|
2197
|
+
<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>
|
|
2198
|
+
<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>
|
|
2105
2199
|
<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>
|
|
2106
2200
|
<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>
|
|
2107
2201
|
<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>
|
|
@@ -2135,6 +2229,8 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
2135
2229
|
<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>
|
|
2136
2230
|
<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>
|
|
2137
2231
|
<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>
|
|
2232
|
+
<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>
|
|
2233
|
+
<li><a href="RBTreeNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>RBTree<wbr/>Node</span></a></li>
|
|
2138
2234
|
<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>
|
|
2139
2235
|
<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>
|
|
2140
2236
|
<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>
|
|
@@ -2144,6 +2240,7 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
2144
2240
|
<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>
|
|
2145
2241
|
<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>
|
|
2146
2242
|
<li><a href="TreeMultiSet.html" class="current"><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>
|
|
2243
|
+
<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>
|
|
2147
2244
|
<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>
|
|
2148
2245
|
<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>
|
|
2149
2246
|
<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>
|
|
@@ -2153,35 +2250,46 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
2153
2250
|
<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>
|
|
2154
2251
|
<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>
|
|
2155
2252
|
<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>
|
|
2156
|
-
<li><a href="../interfaces/
|
|
2157
|
-
<li><a href="../interfaces/
|
|
2253
|
+
<li><a href="../interfaces/IAVLTree.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-256"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.51 16V15.016H11.298V8.224H9.51V7.24H14.19V8.224H12.402V15.016H14.19V16H9.51Z" fill="var(--color-text)"></path></g></svg><span>IAVLTree</span></a></li>
|
|
2254
|
+
<li><a href="../interfaces/IAVLTreeNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>IAVLTree<wbr/>Node</span></a></li>
|
|
2255
|
+
<li><a href="../interfaces/IAbstractBinaryTree.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>IAbstract<wbr/>Binary<wbr/>Tree</span></a></li>
|
|
2256
|
+
<li><a href="../interfaces/IAbstractBinaryTreeNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>IAbstract<wbr/>Binary<wbr/>Tree<wbr/>Node</span></a></li>
|
|
2257
|
+
<li><a href="../interfaces/IAbstractGraph.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>IAbstract<wbr/>Graph</span></a></li>
|
|
2258
|
+
<li><a href="../interfaces/IBST.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>IBST</span></a></li>
|
|
2259
|
+
<li><a href="../interfaces/IBSTNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>IBSTNode</span></a></li>
|
|
2158
2260
|
<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>
|
|
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>
|
|
2160
2261
|
<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/
|
|
2262
|
+
<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>
|
|
2263
|
+
<li><a href="../types/AbstractBinaryTreeNodeProperties.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Abstract<wbr/>Binary<wbr/>Tree<wbr/>Node<wbr/>Properties</span></a></li>
|
|
2264
|
+
<li><a href="../types/AbstractBinaryTreeNodeProperty.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Abstract<wbr/>Binary<wbr/>Tree<wbr/>Node<wbr/>Property</span></a></li>
|
|
2265
|
+
<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>
|
|
2266
|
+
<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>
|
|
2162
2267
|
<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>
|
|
2163
|
-
<li><a href="../types/
|
|
2164
|
-
<li><a href="../types/
|
|
2268
|
+
<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>
|
|
2269
|
+
<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>
|
|
2165
2270
|
<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>
|
|
2166
2271
|
<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>
|
|
2272
|
+
<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>
|
|
2167
2273
|
<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>
|
|
2168
2274
|
<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>
|
|
2169
2275
|
<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>
|
|
2170
2276
|
<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>
|
|
2171
2277
|
<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>
|
|
2278
|
+
<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>
|
|
2279
|
+
<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>
|
|
2172
2280
|
<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>
|
|
2173
2281
|
<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>
|
|
2174
2282
|
<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>
|
|
2175
2283
|
<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>
|
|
2176
2284
|
<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>
|
|
2285
|
+
<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>
|
|
2177
2286
|
<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>
|
|
2178
2287
|
<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>
|
|
2179
2288
|
<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>
|
|
2180
|
-
<li><a href="../types/
|
|
2181
|
-
<li><a href="../types/ResultsByProperty.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Results<wbr/>By<wbr/>Property</span></a></li>
|
|
2289
|
+
<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>
|
|
2182
2290
|
<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>
|
|
2183
2291
|
<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>
|
|
2184
|
-
<li><a href="../types/
|
|
2292
|
+
<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>
|
|
2185
2293
|
<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>
|
|
2186
2294
|
<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>
|
|
2187
2295
|
<div class="tsd-generator">
|