data-structure-typed 1.17.4 → 1.18.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +193 -66
- package/backup/recursive-type/src/assets/complexities-diff.jpg +0 -0
- package/backup/recursive-type/src/assets/data-structure-complexities.jpg +0 -0
- package/backup/recursive-type/src/assets/logo.png +0 -0
- package/backup/recursive-type/src/assets/overview-diagram-of-data-structures.png +0 -0
- package/backup/recursive-type/src/data-structures/binary-tree/aa-tree.ts +3 -0
- package/backup/recursive-type/src/data-structures/binary-tree/avl-tree.ts +288 -0
- package/backup/recursive-type/src/data-structures/binary-tree/b-tree.ts +3 -0
- package/backup/recursive-type/src/data-structures/binary-tree/binary-indexed-tree.ts +78 -0
- package/backup/recursive-type/src/data-structures/binary-tree/binary-tree.ts +1502 -0
- package/backup/recursive-type/src/data-structures/binary-tree/bst.ts +503 -0
- package/backup/recursive-type/src/data-structures/binary-tree/diagrams/avl-tree-inserting.gif +0 -0
- package/backup/recursive-type/src/data-structures/binary-tree/diagrams/bst-rotation.gif +0 -0
- package/backup/recursive-type/src/data-structures/binary-tree/diagrams/segment-tree.png +0 -0
- package/backup/recursive-type/src/data-structures/binary-tree/index.ts +11 -0
- package/backup/recursive-type/src/data-structures/binary-tree/rb-tree.ts +110 -0
- package/backup/recursive-type/src/data-structures/binary-tree/segment-tree.ts +243 -0
- package/backup/recursive-type/src/data-structures/binary-tree/splay-tree.ts +3 -0
- package/backup/recursive-type/src/data-structures/binary-tree/tree-multiset.ts +55 -0
- package/backup/recursive-type/src/data-structures/binary-tree/two-three-tree.ts +3 -0
- package/backup/recursive-type/src/data-structures/diagrams/README.md +5 -0
- package/backup/recursive-type/src/data-structures/graph/abstract-graph.ts +985 -0
- package/backup/recursive-type/src/data-structures/graph/diagrams/adjacency-list-pros-cons.jpg +0 -0
- package/backup/recursive-type/src/data-structures/graph/diagrams/adjacency-list.jpg +0 -0
- package/backup/recursive-type/src/data-structures/graph/diagrams/adjacency-matrix-pros-cons.jpg +0 -0
- package/backup/recursive-type/src/data-structures/graph/diagrams/adjacency-matrix.jpg +0 -0
- package/backup/recursive-type/src/data-structures/graph/diagrams/dfs-can-do.jpg +0 -0
- package/backup/recursive-type/src/data-structures/graph/diagrams/edge-list-pros-cons.jpg +0 -0
- package/backup/recursive-type/src/data-structures/graph/diagrams/edge-list.jpg +0 -0
- package/backup/recursive-type/src/data-structures/graph/diagrams/max-flow.jpg +0 -0
- package/backup/recursive-type/src/data-structures/graph/diagrams/mst.jpg +0 -0
- package/backup/recursive-type/src/data-structures/graph/diagrams/tarjan-articulation-point-bridge.png +0 -0
- package/backup/recursive-type/src/data-structures/graph/diagrams/tarjan-complicate-simple.png +0 -0
- package/backup/recursive-type/src/data-structures/graph/diagrams/tarjan-strongly-connected-component.png +0 -0
- package/backup/recursive-type/src/data-structures/graph/diagrams/tarjan.mp4 +0 -0
- package/backup/recursive-type/src/data-structures/graph/diagrams/tarjan.webp +0 -0
- package/backup/recursive-type/src/data-structures/graph/directed-graph.ts +478 -0
- package/backup/recursive-type/src/data-structures/graph/index.ts +3 -0
- package/backup/recursive-type/src/data-structures/graph/undirected-graph.ts +293 -0
- package/backup/recursive-type/src/data-structures/hash/coordinate-map.ts +67 -0
- package/backup/recursive-type/src/data-structures/hash/coordinate-set.ts +56 -0
- package/backup/recursive-type/src/data-structures/hash/hash-table.ts +3 -0
- package/backup/recursive-type/src/data-structures/hash/index.ts +6 -0
- package/backup/recursive-type/src/data-structures/hash/pair.ts +3 -0
- package/backup/recursive-type/src/data-structures/hash/tree-map.ts +3 -0
- package/backup/recursive-type/src/data-structures/hash/tree-set.ts +3 -0
- package/backup/recursive-type/src/data-structures/heap/heap.ts +176 -0
- package/backup/recursive-type/src/data-structures/heap/index.ts +3 -0
- package/backup/recursive-type/src/data-structures/heap/max-heap.ts +31 -0
- package/backup/recursive-type/src/data-structures/heap/min-heap.ts +34 -0
- package/backup/recursive-type/src/data-structures/index.ts +15 -0
- package/backup/recursive-type/src/data-structures/interfaces/abstract-graph.ts +42 -0
- package/backup/recursive-type/src/data-structures/interfaces/avl-tree.ts +1 -0
- package/backup/recursive-type/src/data-structures/interfaces/binary-tree.ts +56 -0
- package/backup/recursive-type/src/data-structures/interfaces/bst.ts +1 -0
- package/backup/recursive-type/src/data-structures/interfaces/directed-graph.ts +15 -0
- package/backup/recursive-type/src/data-structures/interfaces/doubly-linked-list.ts +1 -0
- package/backup/recursive-type/src/data-structures/interfaces/heap.ts +1 -0
- package/backup/recursive-type/src/data-structures/interfaces/index.ts +13 -0
- package/backup/recursive-type/src/data-structures/interfaces/navigator.ts +1 -0
- package/backup/recursive-type/src/data-structures/interfaces/priority-queue.ts +1 -0
- package/backup/recursive-type/src/data-structures/interfaces/segment-tree.ts +1 -0
- package/backup/recursive-type/src/data-structures/interfaces/singly-linked-list.ts +1 -0
- package/backup/recursive-type/src/data-structures/interfaces/tree-multiset.ts +1 -0
- package/backup/recursive-type/src/data-structures/interfaces/undirected-graph.ts +3 -0
- package/backup/recursive-type/src/data-structures/linked-list/doubly-linked-list.ts +573 -0
- package/backup/recursive-type/src/data-structures/linked-list/index.ts +3 -0
- package/backup/recursive-type/src/data-structures/linked-list/singly-linked-list.ts +490 -0
- package/backup/recursive-type/src/data-structures/linked-list/skip-linked-list.ts +3 -0
- package/backup/recursive-type/src/data-structures/matrix/index.ts +4 -0
- package/backup/recursive-type/src/data-structures/matrix/matrix.ts +27 -0
- package/backup/recursive-type/src/data-structures/matrix/matrix2d.ts +208 -0
- package/backup/recursive-type/src/data-structures/matrix/navigator.ts +122 -0
- package/backup/recursive-type/src/data-structures/matrix/vector2d.ts +316 -0
- package/backup/recursive-type/src/data-structures/priority-queue/index.ts +3 -0
- package/backup/recursive-type/src/data-structures/priority-queue/max-priority-queue.ts +49 -0
- package/backup/recursive-type/src/data-structures/priority-queue/min-priority-queue.ts +50 -0
- package/backup/recursive-type/src/data-structures/priority-queue/priority-queue.ts +354 -0
- package/backup/recursive-type/src/data-structures/queue/deque.ts +251 -0
- package/backup/recursive-type/src/data-structures/queue/index.ts +2 -0
- package/backup/recursive-type/src/data-structures/queue/queue.ts +120 -0
- package/backup/recursive-type/src/data-structures/stack/index.ts +1 -0
- package/backup/recursive-type/src/data-structures/stack/stack.ts +98 -0
- package/backup/recursive-type/src/data-structures/tree/index.ts +1 -0
- package/backup/recursive-type/src/data-structures/tree/tree.ts +80 -0
- package/backup/recursive-type/src/data-structures/trie/index.ts +1 -0
- package/backup/recursive-type/src/data-structures/trie/trie.ts +227 -0
- package/backup/recursive-type/src/data-structures/types/abstract-graph.ts +5 -0
- package/backup/recursive-type/src/data-structures/types/avl-tree.ts +8 -0
- package/backup/recursive-type/src/data-structures/types/binary-tree.ts +10 -0
- package/backup/recursive-type/src/data-structures/types/bst.ts +6 -0
- package/backup/recursive-type/src/data-structures/types/directed-graph.ts +8 -0
- package/backup/recursive-type/src/data-structures/types/doubly-linked-list.ts +1 -0
- package/backup/recursive-type/src/data-structures/types/heap.ts +5 -0
- package/backup/recursive-type/src/data-structures/types/index.ts +12 -0
- package/backup/recursive-type/src/data-structures/types/navigator.ts +13 -0
- package/backup/recursive-type/src/data-structures/types/priority-queue.ts +9 -0
- package/backup/recursive-type/src/data-structures/types/segment-tree.ts +1 -0
- package/backup/recursive-type/src/data-structures/types/singly-linked-list.ts +1 -0
- package/backup/recursive-type/src/data-structures/types/tree-multiset.ts +1 -0
- package/backup/recursive-type/src/index.ts +1 -0
- package/backup/recursive-type/src/utils/index.ts +2 -0
- package/backup/recursive-type/src/utils/types/index.ts +1 -0
- package/backup/recursive-type/src/utils/types/utils.ts +6 -0
- package/backup/recursive-type/src/utils/utils.ts +78 -0
- package/dist/data-structures/binary-tree/avl-tree.d.ts +19 -25
- package/dist/data-structures/binary-tree/avl-tree.js +12 -20
- package/dist/data-structures/binary-tree/binary-indexed-tree.d.ts +3 -1
- package/dist/data-structures/binary-tree/binary-indexed-tree.js +10 -0
- package/dist/data-structures/binary-tree/binary-tree.d.ts +135 -161
- package/dist/data-structures/binary-tree/binary-tree.js +192 -164
- package/dist/data-structures/binary-tree/bst.d.ts +21 -21
- package/dist/data-structures/binary-tree/bst.js +33 -36
- package/dist/data-structures/binary-tree/rb-tree.d.ts +1 -2
- package/dist/data-structures/binary-tree/rb-tree.js +68 -5
- package/dist/data-structures/binary-tree/segment-tree.d.ts +17 -39
- package/dist/data-structures/binary-tree/segment-tree.js +34 -47
- package/dist/data-structures/binary-tree/tree-multiset.d.ts +9 -8
- package/dist/data-structures/binary-tree/tree-multiset.js +7 -6
- package/dist/data-structures/graph/abstract-graph.d.ts +56 -71
- package/dist/data-structures/graph/abstract-graph.js +87 -92
- package/dist/data-structures/graph/directed-graph.d.ts +128 -105
- package/dist/data-structures/graph/directed-graph.js +161 -121
- package/dist/data-structures/graph/undirected-graph.d.ts +81 -62
- package/dist/data-structures/graph/undirected-graph.js +99 -78
- package/dist/data-structures/hash/coordinate-map.d.ts +1 -5
- package/dist/data-structures/hash/coordinate-map.js +3 -9
- package/dist/data-structures/hash/coordinate-set.d.ts +2 -6
- package/dist/data-structures/hash/coordinate-set.js +3 -9
- package/dist/data-structures/hash/hash-table.d.ts +2 -1
- package/dist/data-structures/hash/hash-table.js +7 -0
- package/dist/data-structures/hash/pair.d.ts +2 -1
- package/dist/data-structures/hash/pair.js +7 -0
- package/dist/data-structures/hash/tree-map.d.ts +2 -1
- package/dist/data-structures/hash/tree-map.js +7 -0
- package/dist/data-structures/hash/tree-set.d.ts +2 -1
- package/dist/data-structures/hash/tree-set.js +7 -0
- package/dist/data-structures/heap/heap.d.ts +0 -14
- package/dist/data-structures/heap/heap.js +3 -27
- package/dist/data-structures/index.d.ts +1 -0
- package/dist/data-structures/index.js +1 -0
- package/dist/data-structures/interfaces/abstract-graph.d.ts +22 -0
- package/dist/data-structures/interfaces/abstract-graph.js +2 -0
- package/dist/data-structures/interfaces/avl-tree.d.ts +1 -0
- package/dist/data-structures/interfaces/avl-tree.js +2 -0
- package/dist/data-structures/interfaces/binary-tree.d.ts +27 -0
- package/dist/data-structures/interfaces/binary-tree.js +2 -0
- package/dist/data-structures/interfaces/bst.d.ts +1 -0
- package/dist/data-structures/interfaces/bst.js +2 -0
- package/dist/data-structures/interfaces/directed-graph.d.ts +9 -0
- package/dist/data-structures/interfaces/directed-graph.js +2 -0
- package/dist/data-structures/interfaces/doubly-linked-list.d.ts +1 -0
- package/dist/data-structures/interfaces/doubly-linked-list.js +2 -0
- package/dist/data-structures/interfaces/heap.d.ts +1 -0
- package/dist/data-structures/interfaces/heap.js +2 -0
- package/dist/data-structures/interfaces/index.d.ts +13 -0
- package/dist/data-structures/interfaces/index.js +29 -0
- package/dist/data-structures/interfaces/navigator.d.ts +1 -0
- package/dist/data-structures/interfaces/navigator.js +2 -0
- package/dist/data-structures/interfaces/priority-queue.d.ts +1 -0
- package/dist/data-structures/interfaces/priority-queue.js +2 -0
- package/dist/data-structures/interfaces/segment-tree.d.ts +1 -0
- package/dist/data-structures/interfaces/segment-tree.js +2 -0
- package/dist/data-structures/interfaces/singly-linked-list.d.ts +1 -0
- package/dist/data-structures/interfaces/singly-linked-list.js +2 -0
- package/dist/data-structures/interfaces/tree-multiset.d.ts +1 -0
- package/dist/data-structures/interfaces/tree-multiset.js +2 -0
- package/dist/data-structures/interfaces/undirected-graph.d.ts +2 -0
- package/dist/data-structures/interfaces/undirected-graph.js +2 -0
- package/dist/data-structures/linked-list/doubly-linked-list.d.ts +1 -3
- package/dist/data-structures/linked-list/doubly-linked-list.js +12 -18
- package/dist/data-structures/linked-list/singly-linked-list.d.ts +1 -2
- package/dist/data-structures/linked-list/singly-linked-list.js +12 -15
- package/dist/data-structures/priority-queue/priority-queue.d.ts +1 -1
- package/dist/data-structures/priority-queue/priority-queue.js +4 -4
- package/dist/data-structures/queue/deque.d.ts +5 -5
- package/dist/data-structures/queue/deque.js +6 -6
- package/dist/data-structures/queue/queue.d.ts +1 -1
- package/dist/data-structures/stack/stack.d.ts +1 -1
- package/dist/data-structures/tree/tree.d.ts +12 -4
- package/dist/data-structures/tree/tree.js +44 -12
- package/dist/data-structures/trie/trie.d.ts +3 -3
- package/dist/data-structures/trie/trie.js +10 -10
- package/dist/data-structures/types/abstract-graph.d.ts +1 -20
- package/dist/data-structures/types/avl-tree.d.ts +5 -4
- package/dist/data-structures/types/binary-tree.d.ts +6 -5
- package/dist/data-structures/types/bst.d.ts +4 -3
- package/dist/data-structures/types/directed-graph.d.ts +5 -9
- package/dist/data-structures/types/directed-graph.js +7 -0
- package/dist/data-structures/types/doubly-linked-list.d.ts +1 -1
- package/dist/data-structures/types/heap.d.ts +2 -2
- package/dist/data-structures/types/index.d.ts +0 -1
- package/dist/data-structures/types/index.js +0 -1
- package/dist/data-structures/types/navigator.d.ts +2 -2
- package/dist/data-structures/types/priority-queue.d.ts +2 -2
- package/dist/data-structures/types/tree-multiset.d.ts +3 -4
- package/docs/assets/search.js +1 -1
- package/docs/classes/AVLTree.html +552 -405
- package/docs/classes/AVLTreeNode.html +107 -242
- package/docs/classes/AaTree.html +18 -13
- package/docs/classes/AbstractEdge.html +77 -68
- package/docs/classes/AbstractGraph.html +223 -115
- package/docs/classes/AbstractVertex.html +71 -45
- package/docs/classes/ArrayDeque.html +31 -26
- package/docs/classes/BST.html +543 -391
- package/docs/classes/BSTNode.html +107 -236
- package/docs/classes/BTree.html +18 -13
- package/docs/classes/BinaryIndexedTree.html +56 -21
- package/docs/classes/BinaryTree.html +564 -355
- package/docs/classes/BinaryTreeNode.html +146 -199
- package/docs/classes/Character.html +21 -16
- package/docs/classes/CoordinateMap.html +49 -52
- package/docs/classes/CoordinateSet.html +50 -53
- package/docs/classes/Deque.html +51 -68
- package/docs/classes/DirectedEdge.html +98 -103
- package/docs/classes/DirectedGraph.html +449 -210
- package/docs/classes/DirectedVertex.html +63 -52
- package/docs/classes/DoublyLinkedList.html +56 -71
- package/docs/classes/DoublyLinkedListNode.html +28 -23
- package/docs/classes/HashTable.html +155 -0
- package/docs/classes/Heap.html +33 -109
- package/docs/classes/HeapItem.html +25 -20
- package/docs/classes/Matrix2D.html +33 -28
- package/docs/classes/MatrixNTI2D.html +21 -16
- package/docs/classes/MaxHeap.html +33 -114
- package/docs/classes/MaxPriorityQueue.html +71 -61
- package/docs/classes/MinHeap.html +33 -114
- package/docs/classes/MinPriorityQueue.html +71 -61
- package/docs/classes/Navigator.html +28 -23
- package/docs/classes/ObjectDeque.html +66 -51
- package/docs/classes/{RBTree.html → Pair.html} +25 -20
- package/docs/classes/PriorityQueue.html +66 -56
- package/docs/classes/Queue.html +33 -28
- package/docs/classes/SegmentTree.html +129 -57
- package/docs/classes/SegmentTreeNode.html +62 -140
- package/docs/classes/SinglyLinkedList.html +53 -58
- package/docs/classes/SinglyLinkedListNode.html +25 -20
- package/docs/classes/SkipLinkedList.html +18 -13
- package/docs/classes/SplayTree.html +18 -13
- package/docs/classes/Stack.html +31 -26
- package/docs/classes/TreeMap.html +155 -0
- package/docs/classes/TreeMultiSet.html +541 -388
- package/docs/classes/TreeNode.html +125 -35
- package/docs/classes/TreeSet.html +155 -0
- package/docs/classes/Trie.html +30 -25
- package/docs/classes/TrieNode.html +33 -28
- package/docs/classes/TwoThreeTree.html +18 -13
- package/docs/classes/UndirectedEdge.html +87 -80
- package/docs/classes/UndirectedGraph.html +356 -178
- package/docs/classes/UndirectedVertex.html +63 -52
- package/docs/classes/Vector2D.html +45 -40
- package/docs/enums/CP.html +21 -16
- package/docs/enums/FamilyPosition.html +21 -16
- package/docs/enums/LoopType.html +20 -15
- package/docs/{interfaces/AVLTreeDeleted.html → enums/TopologicalProperty.html} +47 -44
- package/docs/index.html +203 -69
- package/docs/interfaces/{PriorityQueueOptions.html → IBinaryTree.html} +49 -40
- package/docs/interfaces/IBinaryTreeNode.html +383 -0
- package/docs/interfaces/IDirectedGraph.html +24 -19
- package/docs/interfaces/IGraph.html +122 -89
- package/docs/interfaces/{HeapOptions.html → IUNDirectedGraph.html} +26 -53
- package/docs/modules.html +33 -23
- package/docs/types/{ToThunkFn.html → AVLTreeDeleted.html} +31 -22
- package/docs/types/BSTComparator.html +18 -13
- package/docs/types/BSTDeletedResult.html +23 -18
- package/docs/types/BinaryTreeDeleted.html +23 -18
- package/docs/types/BinaryTreeNodeId.html +18 -13
- package/docs/types/BinaryTreeNodePropertyName.html +18 -13
- package/docs/types/DFSOrderPattern.html +18 -13
- package/docs/types/DijkstraResult.html +18 -13
- package/docs/types/Direction.html +18 -13
- package/docs/types/{DoublyLinkedListGetBy.html → EdgeId.html} +22 -17
- package/docs/types/{TrlFn.html → HeapOptions.html} +33 -20
- package/docs/types/{TrlAsyncFn.html → NavigatorParams.html} +46 -20
- package/docs/types/NodeOrPropertyName.html +18 -13
- package/docs/types/PriorityQueueComparator.html +18 -13
- package/docs/types/PriorityQueueDFSOrderPattern.html +18 -13
- package/docs/types/{SpecifyOptional.html → PriorityQueueOptions.html} +32 -20
- package/docs/types/RecursiveAVLTreeNode.html +135 -0
- package/docs/types/RecursiveBSTNode.html +135 -0
- package/docs/types/RecursiveBinaryTreeNode.html +135 -0
- package/docs/types/ResultByProperty.html +21 -16
- package/docs/types/ResultsByProperty.html +21 -16
- package/docs/types/SegmentTreeNodeVal.html +18 -13
- package/docs/types/TopologicalStatus.html +18 -13
- package/docs/types/TreeMultiSetDeletedResult.html +23 -18
- package/docs/types/Turning.html +18 -13
- package/docs/types/VertexId.html +18 -13
- package/notes/note.md +12 -1
- package/package.json +11 -3
- package/tsconfig.json +2 -2
- package/docs/interfaces/NavigatorParams.html +0 -197
- package/docs/types/Thunk.html +0 -133
|
@@ -14,20 +14,20 @@
|
|
|
14
14
|
<ul class="tsd-breadcrumb">
|
|
15
15
|
<li><a href="../modules.html">data-structure-typed</a></li>
|
|
16
16
|
<li><a href="AVLTree.html">AVLTree</a></li></ul>
|
|
17
|
-
<h1>Class AVLTree<
|
|
17
|
+
<h1>Class AVLTree<N></h1></div>
|
|
18
18
|
<section class="tsd-panel">
|
|
19
19
|
<h4>Type Parameters</h4>
|
|
20
20
|
<ul class="tsd-type-parameter-list">
|
|
21
21
|
<li>
|
|
22
|
-
<h4><span class="tsd-kind-type-parameter">
|
|
22
|
+
<h4><span class="tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol"> extends </span><a href="AVLTreeNode.html" class="tsd-signature-type tsd-kind-class">AVLTreeNode</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="AVLTreeNode.html" class="tsd-signature-type tsd-kind-class">AVLTreeNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span></h4></li></ul></section>
|
|
23
23
|
<section class="tsd-panel tsd-hierarchy">
|
|
24
24
|
<h4>Hierarchy</h4>
|
|
25
25
|
<ul class="tsd-hierarchy">
|
|
26
|
-
<li><a href="BST.html" class="tsd-signature-type tsd-kind-class">BST</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
26
|
+
<li><a href="BST.html" class="tsd-signature-type tsd-kind-class">BST</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">></span>
|
|
27
27
|
<ul class="tsd-hierarchy">
|
|
28
28
|
<li><span class="target">AVLTree</span></li></ul></li></ul></section><aside class="tsd-sources">
|
|
29
29
|
<ul>
|
|
30
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
30
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/avl-tree.ts#L17">src/data-structures/binary-tree/avl-tree.ts:17</a></li></ul></aside>
|
|
31
31
|
<section class="tsd-panel-group tsd-index-group">
|
|
32
32
|
<section class="tsd-panel tsd-index-panel">
|
|
33
33
|
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
|
|
@@ -40,21 +40,21 @@
|
|
|
40
40
|
<section class="tsd-index-section">
|
|
41
41
|
<h3 class="tsd-index-heading">Properties</h3>
|
|
42
42
|
<div class="tsd-index-list"><a href="AVLTree.html#_comparator" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-1024"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)"></path></g></svg><span>_comparator</span></a>
|
|
43
|
-
<a href="AVLTree.html#_count" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_count</span></a>
|
|
44
|
-
<a href="AVLTree.html#_loopType" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_loop<wbr/>Type</span></a>
|
|
45
|
-
<a href="AVLTree.html#_root" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_root</span></a>
|
|
46
|
-
<a href="AVLTree.html#_size" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_size</span></a>
|
|
47
|
-
<a href="AVLTree.html#_visitedCount" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_visited<wbr/>Count</span></a>
|
|
48
|
-
<a href="AVLTree.html#_visitedId" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_visited<wbr/>Id</span></a>
|
|
49
|
-
<a href="AVLTree.html#_visitedLeftSum" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_visited<wbr/>Left<wbr/>Sum</span></a>
|
|
50
|
-
<a href="AVLTree.html#_visitedNode" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_visited<wbr/>Node</span></a>
|
|
51
|
-
<a href="AVLTree.html#_visitedVal" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_visited<wbr/>Val</span></a>
|
|
52
43
|
</div></section>
|
|
53
44
|
<section class="tsd-index-section">
|
|
54
45
|
<h3 class="tsd-index-heading">Accessors</h3>
|
|
55
|
-
<div class="tsd-index-list"><a href="AVLTree.html#
|
|
46
|
+
<div class="tsd-index-list"><a href="AVLTree.html#autoIncrementId" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-262144"><rect fill="var(--color-icon-background)" stroke="#FF4D4D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M8.85 16L11.13 7.24H12.582L14.85 16H13.758L13.182 13.672H10.53L9.954 16H8.85ZM10.746 12.76H12.954L12.282 10.06C12.154 9.548 12.054 9.12 11.982 8.776C11.91 8.432 11.866 8.208 11.85 8.104C11.834 8.208 11.79 8.432 11.718 8.776C11.646 9.12 11.546 9.544 11.418 10.048L10.746 12.76Z" fill="var(--color-text)"></path></g></svg><span>auto<wbr/>Increment<wbr/>Id</span></a>
|
|
47
|
+
<a href="AVLTree.html#count" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>count</span></a>
|
|
48
|
+
<a href="AVLTree.html#isDuplicatedVal" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>is<wbr/>Duplicated<wbr/>Val</span></a>
|
|
49
|
+
<a href="AVLTree.html#loopType" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>loop<wbr/>Type</span></a>
|
|
50
|
+
<a href="AVLTree.html#maxId" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>max<wbr/>Id</span></a>
|
|
56
51
|
<a href="AVLTree.html#root" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>root</span></a>
|
|
57
52
|
<a href="AVLTree.html#size" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>size</span></a>
|
|
53
|
+
<a href="AVLTree.html#visitedCount" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>visited<wbr/>Count</span></a>
|
|
54
|
+
<a href="AVLTree.html#visitedId" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>visited<wbr/>Id</span></a>
|
|
55
|
+
<a href="AVLTree.html#visitedLeftSum" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>visited<wbr/>Left<wbr/>Sum</span></a>
|
|
56
|
+
<a href="AVLTree.html#visitedNode" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>visited<wbr/>Node</span></a>
|
|
57
|
+
<a href="AVLTree.html#visitedVal" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>visited<wbr/>Val</span></a>
|
|
58
58
|
</div></section>
|
|
59
59
|
<section class="tsd-index-section">
|
|
60
60
|
<h3 class="tsd-index-heading">Methods</h3>
|
|
@@ -63,9 +63,21 @@
|
|
|
63
63
|
<a href="AVLTree.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>
|
|
64
64
|
<a href="AVLTree.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>
|
|
65
65
|
<a href="AVLTree.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>
|
|
66
|
+
<a href="AVLTree.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>
|
|
66
67
|
<a href="AVLTree.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>
|
|
67
68
|
<a href="AVLTree.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>
|
|
68
69
|
<a href="AVLTree.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>
|
|
70
|
+
<a href="AVLTree.html#_setAutoIncrementId" 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/>Auto<wbr/>Increment<wbr/>Id</span></a>
|
|
71
|
+
<a href="AVLTree.html#_setCount" 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/>Count</span></a>
|
|
72
|
+
<a href="AVLTree.html#_setIsDuplicatedVal" 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/>Is<wbr/>Duplicated<wbr/>Val</span></a>
|
|
73
|
+
<a href="AVLTree.html#_setLoopType" 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/>Loop<wbr/>Type</span></a>
|
|
74
|
+
<a href="AVLTree.html#_setMaxId" 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/>Max<wbr/>Id</span></a>
|
|
75
|
+
<a href="AVLTree.html#_setRoot" 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/>Root</span></a>
|
|
76
|
+
<a href="AVLTree.html#_setSize" 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/>Size</span></a>
|
|
77
|
+
<a href="AVLTree.html#_setVisitedId" 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/>Id</span></a>
|
|
78
|
+
<a href="AVLTree.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>
|
|
79
|
+
<a href="AVLTree.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>
|
|
80
|
+
<a href="AVLTree.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>
|
|
69
81
|
<a href="AVLTree.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>
|
|
70
82
|
<a href="AVLTree.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>
|
|
71
83
|
<a href="AVLTree.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>
|
|
@@ -78,10 +90,8 @@
|
|
|
78
90
|
<a href="AVLTree.html#balanceRL" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>balanceRL</span></a>
|
|
79
91
|
<a href="AVLTree.html#balanceRR" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>balanceRR</span></a>
|
|
80
92
|
<a href="AVLTree.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>
|
|
81
|
-
<a href="AVLTree.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>
|
|
82
93
|
<a href="AVLTree.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>
|
|
83
94
|
<a href="AVLTree.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>
|
|
84
|
-
<a href="AVLTree.html#getCount" 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/>Count</span></a>
|
|
85
95
|
<a href="AVLTree.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>
|
|
86
96
|
<a href="AVLTree.html#getHeight" 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/>Height</span></a>
|
|
87
97
|
<a href="AVLTree.html#getLeftMost" 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/>Left<wbr/>Most</span></a>
|
|
@@ -90,8 +100,6 @@
|
|
|
90
100
|
<a href="AVLTree.html#getPathToRoot" 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/>Path<wbr/>To<wbr/>Root</span></a>
|
|
91
101
|
<a href="AVLTree.html#getPredecessor" 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/>Predecessor</span></a>
|
|
92
102
|
<a href="AVLTree.html#getRightMost" 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/>Right<wbr/>Most</span></a>
|
|
93
|
-
<a href="AVLTree.html#getRoot" 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/>Root</span></a>
|
|
94
|
-
<a href="AVLTree.html#getSize" 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/>Size</span></a>
|
|
95
103
|
<a href="AVLTree.html#getSubTreeSizeAndCount" 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/>Sub<wbr/>Tree<wbr/>Size<wbr/>And<wbr/>Count</span></a>
|
|
96
104
|
<a href="AVLTree.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>
|
|
97
105
|
<a href="AVLTree.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,6 +112,7 @@
|
|
|
104
112
|
<a href="AVLTree.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>
|
|
105
113
|
<a href="AVLTree.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>
|
|
106
114
|
<a href="AVLTree.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>
|
|
115
|
+
<a href="AVLTree.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>
|
|
107
116
|
<a href="AVLTree.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>
|
|
108
117
|
<a href="AVLTree.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>
|
|
109
118
|
<a href="AVLTree.html#updateHeight" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>update<wbr/>Height</span></a>
|
|
@@ -113,7 +122,7 @@
|
|
|
113
122
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="constructor" class="tsd-anchor"></a>
|
|
114
123
|
<h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><g stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" id="icon-anchor"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></g></svg></a></h3>
|
|
115
124
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
116
|
-
<li class="tsd-signature tsd-anchor-link" id="constructor.new_AVLTree"><span class="tsd-kind-constructor-signature">new AVLTree</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
125
|
+
<li class="tsd-signature tsd-anchor-link" id="constructor.new_AVLTree"><span class="tsd-kind-constructor-signature">new AVLTree</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="AVLTree.html" class="tsd-signature-type tsd-kind-class">AVLTree</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_AVLTree" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
117
126
|
<li class="tsd-description">
|
|
118
127
|
<div class="tsd-comment tsd-typography"><p>The constructor function accepts an optional options object and sets the comparator property if provided.</p>
|
|
119
128
|
</div>
|
|
@@ -121,7 +130,7 @@
|
|
|
121
130
|
<h4>Type Parameters</h4>
|
|
122
131
|
<ul class="tsd-type-parameter-list">
|
|
123
132
|
<li>
|
|
124
|
-
<h4><span class="tsd-kind-type-parameter">
|
|
133
|
+
<h4><span class="tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol"> extends </span><a href="AVLTreeNode.html" class="tsd-signature-type tsd-kind-class">AVLTreeNode</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="AVLTreeNode.html" class="tsd-signature-type tsd-kind-class">AVLTreeNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span><a href="../types/RecursiveAVLTreeNode.html" class="tsd-signature-type tsd-kind-type-alias">RecursiveAVLTreeNode</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>
|
|
125
134
|
<div class="tsd-parameters">
|
|
126
135
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
127
136
|
<ul class="tsd-parameter-list">
|
|
@@ -135,11 +144,11 @@
|
|
|
135
144
|
<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>
|
|
136
145
|
<li class="tsd-parameter">
|
|
137
146
|
<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>
|
|
138
|
-
<h4 class="tsd-returns-title">Returns <a href="AVLTree.html" class="tsd-signature-type tsd-kind-class">AVLTree</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
147
|
+
<h4 class="tsd-returns-title">Returns <a href="AVLTree.html" class="tsd-signature-type tsd-kind-class">AVLTree</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>
|
|
139
148
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
140
149
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#constructor">constructor</a></p>
|
|
141
150
|
<ul>
|
|
142
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
151
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/bst.ts#L29">src/data-structures/binary-tree/bst.ts:29</a></li></ul></aside></li></ul></section></section>
|
|
143
152
|
<section class="tsd-panel-group tsd-member-group">
|
|
144
153
|
<h2>Properties</h2>
|
|
145
154
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_comparator" class="tsd-anchor"></a>
|
|
@@ -147,63 +156,18 @@
|
|
|
147
156
|
<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">
|
|
148
157
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_comparator">_comparator</a></p>
|
|
149
158
|
<ul>
|
|
150
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
151
|
-
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_count" class="tsd-anchor"></a>
|
|
152
|
-
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_count</span><a href="#_count" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
153
|
-
<div class="tsd-signature"><span class="tsd-kind-property">_count</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></div><aside class="tsd-sources">
|
|
154
|
-
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_count">_count</a></p>
|
|
155
|
-
<ul>
|
|
156
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L263">src/data-structures/binary-tree/binary-tree.ts:263</a></li></ul></aside></section>
|
|
157
|
-
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_loopType" class="tsd-anchor"></a>
|
|
158
|
-
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_loop<wbr/>Type</span><a href="#_loopType" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
159
|
-
<div class="tsd-signature"><span class="tsd-kind-property">_loop<wbr/>Type</span><span class="tsd-signature-symbol">:</span> <a href="../enums/LoopType.html" class="tsd-signature-type tsd-kind-enum">LoopType</a><span class="tsd-signature-symbol"> = LoopType.iterative</span></div><aside class="tsd-sources">
|
|
160
|
-
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_loopType">_loopType</a></p>
|
|
161
|
-
<ul>
|
|
162
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L207">src/data-structures/binary-tree/binary-tree.ts:207</a></li></ul></aside></section>
|
|
163
|
-
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_root" class="tsd-anchor"></a>
|
|
164
|
-
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_root</span><a href="#_root" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
165
|
-
<div class="tsd-signature"><span class="tsd-kind-property">_root</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol"> = null</span></div><aside class="tsd-sources">
|
|
166
|
-
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_root">_root</a></p>
|
|
167
|
-
<ul>
|
|
168
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L239">src/data-structures/binary-tree/binary-tree.ts:239</a></li></ul></aside></section>
|
|
169
|
-
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_size" class="tsd-anchor"></a>
|
|
170
|
-
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_size</span><a href="#_size" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
171
|
-
<div class="tsd-signature"><span class="tsd-kind-property">_size</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></div><aside class="tsd-sources">
|
|
172
|
-
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_size">_size</a></p>
|
|
173
|
-
<ul>
|
|
174
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L253">src/data-structures/binary-tree/binary-tree.ts:253</a></li></ul></aside></section>
|
|
175
|
-
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_visitedCount" class="tsd-anchor"></a>
|
|
176
|
-
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_visited<wbr/>Count</span><a href="#_visitedCount" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
177
|
-
<div class="tsd-signature"><span class="tsd-kind-property">_visited<wbr/>Count</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> = []</span></div><aside class="tsd-sources">
|
|
178
|
-
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_visitedCount">_visitedCount</a></p>
|
|
179
|
-
<ul>
|
|
180
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L211">src/data-structures/binary-tree/binary-tree.ts:211</a></li></ul></aside></section>
|
|
181
|
-
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_visitedId" class="tsd-anchor"></a>
|
|
182
|
-
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_visited<wbr/>Id</span><a href="#_visitedId" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
183
|
-
<div class="tsd-signature"><span class="tsd-kind-property">_visited<wbr/>Id</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> = []</span></div><aside class="tsd-sources">
|
|
184
|
-
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_visitedId">_visitedId</a></p>
|
|
185
|
-
<ul>
|
|
186
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L208">src/data-structures/binary-tree/binary-tree.ts:208</a></li></ul></aside></section>
|
|
187
|
-
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_visitedLeftSum" class="tsd-anchor"></a>
|
|
188
|
-
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_visited<wbr/>Left<wbr/>Sum</span><a href="#_visitedLeftSum" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
189
|
-
<div class="tsd-signature"><span class="tsd-kind-property">_visited<wbr/>Left<wbr/>Sum</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> = []</span></div><aside class="tsd-sources">
|
|
190
|
-
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_visitedLeftSum">_visitedLeftSum</a></p>
|
|
191
|
-
<ul>
|
|
192
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L212">src/data-structures/binary-tree/binary-tree.ts:212</a></li></ul></aside></section>
|
|
193
|
-
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_visitedNode" class="tsd-anchor"></a>
|
|
194
|
-
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_visited<wbr/>Node</span><a href="#_visitedNode" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
195
|
-
<div class="tsd-signature"><span class="tsd-kind-property">_visited<wbr/>Node</span><span class="tsd-signature-symbol">:</span> <a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> = []</span></div><aside class="tsd-sources">
|
|
196
|
-
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_visitedNode">_visitedNode</a></p>
|
|
197
|
-
<ul>
|
|
198
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L210">src/data-structures/binary-tree/binary-tree.ts:210</a></li></ul></aside></section>
|
|
199
|
-
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_visitedVal" class="tsd-anchor"></a>
|
|
200
|
-
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_visited<wbr/>Val</span><a href="#_visitedVal" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
201
|
-
<div class="tsd-signature"><span class="tsd-kind-property">_visited<wbr/>Val</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> = []</span></div><aside class="tsd-sources">
|
|
202
|
-
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_visitedVal">_visitedVal</a></p>
|
|
203
|
-
<ul>
|
|
204
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L209">src/data-structures/binary-tree/binary-tree.ts:209</a></li></ul></aside></section></section>
|
|
159
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/bst.ts#L485">src/data-structures/binary-tree/bst.ts:485</a></li></ul></aside></section></section>
|
|
205
160
|
<section class="tsd-panel-group tsd-member-group">
|
|
206
161
|
<h2>Accessors</h2>
|
|
162
|
+
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="autoIncrementId" class="tsd-anchor"></a>
|
|
163
|
+
<h3 class="tsd-anchor-link"><span>auto<wbr/>Increment<wbr/>Id</span><a href="#autoIncrementId" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
164
|
+
<ul class="tsd-signatures tsd-is-inherited">
|
|
165
|
+
<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>
|
|
166
|
+
<li class="tsd-description">
|
|
167
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources">
|
|
168
|
+
<p>Inherited from BST.autoIncrementId</p>
|
|
169
|
+
<ul>
|
|
170
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L220">src/data-structures/binary-tree/binary-tree.ts:220</a></li></ul></aside></li></ul></section>
|
|
207
171
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="count" class="tsd-anchor"></a>
|
|
208
172
|
<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>
|
|
209
173
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -212,38 +176,43 @@
|
|
|
212
176
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
|
|
213
177
|
<p>Inherited from BST.count</p>
|
|
214
178
|
<ul>
|
|
215
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
216
|
-
<
|
|
179
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L250">src/data-structures/binary-tree/binary-tree.ts:250</a></li></ul></aside></li></ul></section>
|
|
180
|
+
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="isDuplicatedVal" class="tsd-anchor"></a>
|
|
181
|
+
<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>
|
|
182
|
+
<ul class="tsd-signatures tsd-is-inherited">
|
|
183
|
+
<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>
|
|
217
184
|
<li class="tsd-description">
|
|
218
|
-
<
|
|
219
|
-
<
|
|
220
|
-
<ul class="tsd-parameter-list">
|
|
221
|
-
<li>
|
|
222
|
-
<h5><span class="tsd-kind-parameter">v</span>: <span class="tsd-signature-type">number</span></h5></li></ul></div>
|
|
223
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
224
|
-
<p>Inherited from BST.count</p>
|
|
185
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources">
|
|
186
|
+
<p>Inherited from BST.isDuplicatedVal</p>
|
|
225
187
|
<ul>
|
|
226
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
227
|
-
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="
|
|
228
|
-
<h3 class="tsd-anchor-link"><span>
|
|
188
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L232">src/data-structures/binary-tree/binary-tree.ts:232</a></li></ul></aside></li></ul></section>
|
|
189
|
+
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="loopType" class="tsd-anchor"></a>
|
|
190
|
+
<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>
|
|
229
191
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
230
|
-
<li class="tsd-signature" id="
|
|
192
|
+
<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>
|
|
231
193
|
<li class="tsd-description">
|
|
232
|
-
<h4 class="tsd-returns-title">Returns <
|
|
233
|
-
<p>Inherited from BST.
|
|
194
|
+
<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">
|
|
195
|
+
<p>Inherited from BST.loopType</p>
|
|
234
196
|
<ul>
|
|
235
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
236
|
-
<
|
|
197
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L185">src/data-structures/binary-tree/binary-tree.ts:185</a></li></ul></aside></li></ul></section>
|
|
198
|
+
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="maxId" class="tsd-anchor"></a>
|
|
199
|
+
<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>
|
|
200
|
+
<ul class="tsd-signatures tsd-is-inherited">
|
|
201
|
+
<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>
|
|
237
202
|
<li class="tsd-description">
|
|
238
|
-
<
|
|
239
|
-
<
|
|
240
|
-
<ul
|
|
241
|
-
<li>
|
|
242
|
-
<
|
|
243
|
-
<
|
|
203
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
|
|
204
|
+
<p>Inherited from BST.maxId</p>
|
|
205
|
+
<ul>
|
|
206
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L226">src/data-structures/binary-tree/binary-tree.ts:226</a></li></ul></aside></li></ul></section>
|
|
207
|
+
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="root" class="tsd-anchor"></a>
|
|
208
|
+
<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>
|
|
209
|
+
<ul class="tsd-signatures tsd-is-inherited">
|
|
210
|
+
<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>
|
|
211
|
+
<li class="tsd-description">
|
|
212
|
+
<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">
|
|
244
213
|
<p>Inherited from BST.root</p>
|
|
245
214
|
<ul>
|
|
246
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
215
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L238">src/data-structures/binary-tree/binary-tree.ts:238</a></li></ul></aside></li></ul></section>
|
|
247
216
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="size" class="tsd-anchor"></a>
|
|
248
217
|
<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>
|
|
249
218
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -252,18 +221,52 @@
|
|
|
252
221
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
|
|
253
222
|
<p>Inherited from BST.size</p>
|
|
254
223
|
<ul>
|
|
255
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
256
|
-
<
|
|
224
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L244">src/data-structures/binary-tree/binary-tree.ts:244</a></li></ul></aside></li></ul></section>
|
|
225
|
+
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="visitedCount" class="tsd-anchor"></a>
|
|
226
|
+
<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>
|
|
227
|
+
<ul class="tsd-signatures tsd-is-inherited">
|
|
228
|
+
<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>
|
|
257
229
|
<li class="tsd-description">
|
|
258
|
-
<
|
|
259
|
-
<
|
|
260
|
-
<ul
|
|
261
|
-
<li>
|
|
262
|
-
<
|
|
263
|
-
<
|
|
264
|
-
<
|
|
230
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources">
|
|
231
|
+
<p>Inherited from BST.visitedCount</p>
|
|
232
|
+
<ul>
|
|
233
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L208">src/data-structures/binary-tree/binary-tree.ts:208</a></li></ul></aside></li></ul></section>
|
|
234
|
+
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="visitedId" class="tsd-anchor"></a>
|
|
235
|
+
<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>
|
|
236
|
+
<ul class="tsd-signatures tsd-is-inherited">
|
|
237
|
+
<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>
|
|
238
|
+
<li class="tsd-description">
|
|
239
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources">
|
|
240
|
+
<p>Inherited from BST.visitedId</p>
|
|
265
241
|
<ul>
|
|
266
|
-
<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/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L190">src/data-structures/binary-tree/binary-tree.ts:190</a></li></ul></aside></li></ul></section>
|
|
243
|
+
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="visitedLeftSum" class="tsd-anchor"></a>
|
|
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>
|
|
245
|
+
<ul class="tsd-signatures tsd-is-inherited">
|
|
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>
|
|
247
|
+
<li class="tsd-description">
|
|
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>Inherited from BST.visitedLeftSum</p>
|
|
250
|
+
<ul>
|
|
251
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L214">src/data-structures/binary-tree/binary-tree.ts:214</a></li></ul></aside></li></ul></section>
|
|
252
|
+
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="visitedNode" class="tsd-anchor"></a>
|
|
253
|
+
<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>
|
|
254
|
+
<ul class="tsd-signatures tsd-is-inherited">
|
|
255
|
+
<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>
|
|
256
|
+
<li class="tsd-description">
|
|
257
|
+
<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">
|
|
258
|
+
<p>Inherited from BST.visitedNode</p>
|
|
259
|
+
<ul>
|
|
260
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L202">src/data-structures/binary-tree/binary-tree.ts:202</a></li></ul></aside></li></ul></section>
|
|
261
|
+
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="visitedVal" class="tsd-anchor"></a>
|
|
262
|
+
<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>
|
|
263
|
+
<ul class="tsd-signatures tsd-is-inherited">
|
|
264
|
+
<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>
|
|
265
|
+
<li class="tsd-description">
|
|
266
|
+
<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">
|
|
267
|
+
<p>Inherited from BST.visitedVal</p>
|
|
268
|
+
<ul>
|
|
269
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L196">src/data-structures/binary-tree/binary-tree.ts:196</a></li></ul></aside></li></ul></section></section>
|
|
267
270
|
<section class="tsd-panel-group tsd-member-group">
|
|
268
271
|
<h2>Methods</h2>
|
|
269
272
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="BFS" class="tsd-anchor"></a>
|
|
@@ -274,12 +277,12 @@
|
|
|
274
277
|
<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
278
|
or property name.</p>
|
|
276
279
|
</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>ResultsByProperty<
|
|
280
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>ResultsByProperty<N></code>.</p>
|
|
278
281
|
|
|
279
282
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
280
283
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#BFS">BFS</a></p>
|
|
281
284
|
<ul>
|
|
282
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
285
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L950">src/data-structures/binary-tree/binary-tree.ts:950</a></li></ul></aside></li>
|
|
283
286
|
<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
287
|
<li class="tsd-description">
|
|
285
288
|
<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,13 +299,13 @@ performed starting from that node. If a property name is provided, the breadth-f
|
|
|
296
299
|
performed starting from the root node</p>
|
|
297
300
|
</div>
|
|
298
301
|
<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>ResultsByProperty<
|
|
302
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>ResultsByProperty<N></code>.</p>
|
|
300
303
|
|
|
301
304
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
302
305
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#BFS">BFS</a></p>
|
|
303
306
|
<ul>
|
|
304
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
305
|
-
<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">
|
|
307
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L952">src/data-structures/binary-tree/binary-tree.ts:952</a></li></ul></aside></li>
|
|
308
|
+
<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
309
|
<li class="tsd-description">
|
|
307
310
|
<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
|
|
308
311
|
or property name.</p>
|
|
@@ -318,13 +321,13 @@ performed starting from that node. If a property name is provided, the breadth-f
|
|
|
318
321
|
performed starting from the root node</p>
|
|
319
322
|
</div>
|
|
320
323
|
<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">
|
|
324
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>ResultsByProperty<N></code>.</p>
|
|
322
325
|
|
|
323
326
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
324
327
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#BFS">BFS</a></p>
|
|
325
328
|
<ul>
|
|
326
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
327
|
-
<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><
|
|
329
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L954">src/data-structures/binary-tree/binary-tree.ts:954</a></li></ul></aside></li>
|
|
330
|
+
<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
331
|
<li class="tsd-description">
|
|
329
332
|
<div class="tsd-comment tsd-typography"><p>The BFS function performs a breadth-first search on a binary tree and returns the results based on a specified node
|
|
330
333
|
or property name.</p>
|
|
@@ -340,12 +343,12 @@ performed starting from that node. If a property name is provided, the breadth-f
|
|
|
340
343
|
performed starting from the root node</p>
|
|
341
344
|
</div>
|
|
342
345
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
343
|
-
<h4 class="tsd-returns-title">Returns <
|
|
346
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>ResultsByProperty<N></code>.</p>
|
|
344
347
|
|
|
345
348
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
346
349
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#BFS">BFS</a></p>
|
|
347
350
|
<ul>
|
|
348
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
351
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L956">src/data-structures/binary-tree/binary-tree.ts:956</a></li></ul></aside></li>
|
|
349
352
|
<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
353
|
<li class="tsd-description">
|
|
351
354
|
<div class="tsd-comment tsd-typography"><p>The BFS function performs a breadth-first search on a binary tree and returns the results based on a specified node
|
|
@@ -362,12 +365,12 @@ performed starting from that node. If a property name is provided, the breadth-f
|
|
|
362
365
|
performed starting from the root node</p>
|
|
363
366
|
</div>
|
|
364
367
|
<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>ResultsByProperty<
|
|
368
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>ResultsByProperty<N></code>.</p>
|
|
366
369
|
|
|
367
370
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
368
371
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#BFS">BFS</a></p>
|
|
369
372
|
<ul>
|
|
370
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
373
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L958">src/data-structures/binary-tree/binary-tree.ts:958</a></li></ul></aside></li></ul></section>
|
|
371
374
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="DFS" class="tsd-anchor"></a>
|
|
372
375
|
<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
376
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -376,12 +379,12 @@ performed starting from the root node</p>
|
|
|
376
379
|
<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
380
|
specified pattern and node or property name.</p>
|
|
378
381
|
</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>ResultsByProperty<
|
|
382
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>ResultsByProperty<N></code>.</p>
|
|
380
383
|
|
|
381
384
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
382
385
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#DFS">DFS</a></p>
|
|
383
386
|
<ul>
|
|
384
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
387
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L986">src/data-structures/binary-tree/binary-tree.ts:986</a></li></ul></aside></li>
|
|
385
388
|
<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
389
|
<li class="tsd-description">
|
|
387
390
|
<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,13 +408,13 @@ either the name of a property in the <code>BinaryTreeNode</code> object or the v
|
|
|
405
408
|
no value</p>
|
|
406
409
|
</div>
|
|
407
410
|
<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>ResultsByProperty<
|
|
411
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>ResultsByProperty<N></code>.</p>
|
|
409
412
|
|
|
410
413
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
411
414
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#DFS">DFS</a></p>
|
|
412
415
|
<ul>
|
|
413
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
414
|
-
<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">
|
|
416
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L988">src/data-structures/binary-tree/binary-tree.ts:988</a></li></ul></aside></li>
|
|
417
|
+
<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
418
|
<li class="tsd-description">
|
|
416
419
|
<div class="tsd-comment tsd-typography"><p>The DFS function performs a depth-first search traversal on a binary tree and returns the results based on the
|
|
417
420
|
specified pattern and node or property name.</p>
|
|
@@ -434,13 +437,13 @@ either the name of a property in the <code>BinaryTreeNode</code> object or the v
|
|
|
434
437
|
no value</p>
|
|
435
438
|
</div>
|
|
436
439
|
<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">
|
|
440
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>ResultsByProperty<N></code>.</p>
|
|
438
441
|
|
|
439
442
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
440
443
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#DFS">DFS</a></p>
|
|
441
444
|
<ul>
|
|
442
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
443
|
-
<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><
|
|
445
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L990">src/data-structures/binary-tree/binary-tree.ts:990</a></li></ul></aside></li>
|
|
446
|
+
<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
447
|
<li class="tsd-description">
|
|
445
448
|
<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
|
|
446
449
|
specified pattern and node or property name.</p>
|
|
@@ -463,12 +466,12 @@ either the name of a property in the <code>BinaryTreeNode</code> object or the v
|
|
|
463
466
|
no value</p>
|
|
464
467
|
</div>
|
|
465
468
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
466
|
-
<h4 class="tsd-returns-title">Returns <
|
|
469
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>ResultsByProperty<N></code>.</p>
|
|
467
470
|
|
|
468
471
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
469
472
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#DFS">DFS</a></p>
|
|
470
473
|
<ul>
|
|
471
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
474
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L992">src/data-structures/binary-tree/binary-tree.ts:992</a></li></ul></aside></li>
|
|
472
475
|
<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
476
|
<li class="tsd-description">
|
|
474
477
|
<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 +495,12 @@ either the name of a property in the <code>BinaryTreeNode</code> object or the v
|
|
|
492
495
|
no value</p>
|
|
493
496
|
</div>
|
|
494
497
|
<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>ResultsByProperty<
|
|
498
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>ResultsByProperty<N></code>.</p>
|
|
496
499
|
|
|
497
500
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
498
501
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#DFS">DFS</a></p>
|
|
499
502
|
<ul>
|
|
500
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
503
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L994">src/data-structures/binary-tree/binary-tree.ts:994</a></li></ul></aside></li></ul></section>
|
|
501
504
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="DFSIterative" class="tsd-anchor"></a>
|
|
502
505
|
<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
506
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -510,7 +513,7 @@ Space complexity of Iterative DFS equals to recursive DFS which is O(n) because
|
|
|
510
513
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
511
514
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#DFSIterative">DFSIterative</a></p>
|
|
512
515
|
<ul>
|
|
513
|
-
<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/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1036">src/data-structures/binary-tree/binary-tree.ts:1036</a></li></ul></aside></li>
|
|
514
517
|
<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
518
|
<li class="tsd-description">
|
|
516
519
|
<div class="tsd-comment tsd-typography"><p>Time complexity is O(n)
|
|
@@ -529,8 +532,8 @@ Space complexity of Iterative DFS equals to recursive DFS which is O(n) because
|
|
|
529
532
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
530
533
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#DFSIterative">DFSIterative</a></p>
|
|
531
534
|
<ul>
|
|
532
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
533
|
-
<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">
|
|
535
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1038">src/data-structures/binary-tree/binary-tree.ts:1038</a></li></ul></aside></li>
|
|
536
|
+
<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
537
|
<li class="tsd-description">
|
|
535
538
|
<div class="tsd-comment tsd-typography"><p>Time complexity is O(n)
|
|
536
539
|
Space complexity of Iterative DFS equals to recursive DFS which is O(n) because of the stack</p>
|
|
@@ -544,12 +547,12 @@ Space complexity of Iterative DFS equals to recursive DFS which is O(n) because
|
|
|
544
547
|
<li>
|
|
545
548
|
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">nodeOrPropertyName</span>: <span class="tsd-signature-type">"val"</span></h5>
|
|
546
549
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
547
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">
|
|
550
|
+
<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
551
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
549
552
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#DFSIterative">DFSIterative</a></p>
|
|
550
553
|
<ul>
|
|
551
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
552
|
-
<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><
|
|
554
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1040">src/data-structures/binary-tree/binary-tree.ts:1040</a></li></ul></aside></li>
|
|
555
|
+
<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
556
|
<li class="tsd-description">
|
|
554
557
|
<div class="tsd-comment tsd-typography"><p>Time complexity is O(n)
|
|
555
558
|
Space complexity of Iterative DFS equals to recursive DFS which is O(n) because of the stack</p>
|
|
@@ -563,11 +566,11 @@ Space complexity of Iterative DFS equals to recursive DFS which is O(n) because
|
|
|
563
566
|
<li>
|
|
564
567
|
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">nodeOrPropertyName</span>: <span class="tsd-signature-type">"node"</span></h5>
|
|
565
568
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
566
|
-
<h4 class="tsd-returns-title">Returns <
|
|
569
|
+
<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
570
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
568
571
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#DFSIterative">DFSIterative</a></p>
|
|
569
572
|
<ul>
|
|
570
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
573
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1042">src/data-structures/binary-tree/binary-tree.ts:1042</a></li></ul></aside></li>
|
|
571
574
|
<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
575
|
<li class="tsd-description">
|
|
573
576
|
<div class="tsd-comment tsd-typography"><p>Time complexity is O(n)
|
|
@@ -586,7 +589,7 @@ Space complexity of Iterative DFS equals to recursive DFS which is O(n) because
|
|
|
586
589
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
587
590
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#DFSIterative">DFSIterative</a></p>
|
|
588
591
|
<ul>
|
|
589
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
592
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1044">src/data-structures/binary-tree/binary-tree.ts:1044</a></li></ul></aside></li></ul></section>
|
|
590
593
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_accumulatedByPropertyName" class="tsd-anchor"></a>
|
|
591
594
|
<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
595
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -599,8 +602,8 @@ provided property name or a default property name.</p>
|
|
|
599
602
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
600
603
|
<ul class="tsd-parameter-list">
|
|
601
604
|
<li>
|
|
602
|
-
<h5><span class="tsd-kind-parameter">node</span>: <
|
|
603
|
-
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is of type <code>
|
|
605
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
606
|
+
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is of type <code>N</code>, which represents a node in a binary tree.</p>
|
|
604
607
|
</div>
|
|
605
608
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
606
609
|
<li>
|
|
@@ -614,7 +617,7 @@ the property name of the node that should be accumulated. If it is a node object
|
|
|
614
617
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
615
618
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_accumulatedByPropertyName">_accumulatedByPropertyName</a></p>
|
|
616
619
|
<ul>
|
|
617
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
620
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1456">src/data-structures/binary-tree/binary-tree.ts:1456</a></li></ul></aside></li></ul></section>
|
|
618
621
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_compare" class="tsd-anchor"></a>
|
|
619
622
|
<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
623
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -642,11 +645,46 @@ than), or CP.eq (equal).</p>
|
|
|
642
645
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
643
646
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_compare">_compare</a></p>
|
|
644
647
|
<ul>
|
|
645
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
648
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/bst.ts#L495">src/data-structures/binary-tree/bst.ts:495</a></li></ul></aside></li></ul></section>
|
|
649
|
+
<section class="tsd-panel tsd-member"><a id="_createNode" class="tsd-anchor"></a>
|
|
650
|
+
<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>
|
|
651
|
+
<ul class="tsd-signatures">
|
|
652
|
+
<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>
|
|
653
|
+
<li class="tsd-description">
|
|
654
|
+
<div class="tsd-comment tsd-typography"><p>The function creates a new binary tree node with the given id, value, and count if the value is not null, otherwise
|
|
655
|
+
it returns null.</p>
|
|
656
|
+
</div>
|
|
657
|
+
<div class="tsd-parameters">
|
|
658
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
659
|
+
<ul class="tsd-parameter-list">
|
|
660
|
+
<li>
|
|
661
|
+
<h5><span class="tsd-kind-parameter">id</span>: <span class="tsd-signature-type">number</span></h5>
|
|
662
|
+
<div class="tsd-comment tsd-typography"><p>The <code>id</code> parameter is the identifier for the binary tree node. It is of type
|
|
663
|
+
<code>BinaryTreeNodeId</code>.</p>
|
|
664
|
+
</div>
|
|
665
|
+
<div class="tsd-comment tsd-typography"></div></li>
|
|
666
|
+
<li>
|
|
667
|
+
<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>
|
|
668
|
+
<div class="tsd-comment tsd-typography"><p>The <code>val</code> parameter represents the value of the node. It can be of type <code>N</code> (generic type)
|
|
669
|
+
or <code>null</code>.</p>
|
|
670
|
+
</div>
|
|
671
|
+
<div class="tsd-comment tsd-typography"></div></li>
|
|
672
|
+
<li>
|
|
673
|
+
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">count</span>: <span class="tsd-signature-type">number</span></h5>
|
|
674
|
+
<div class="tsd-comment tsd-typography"><p>The <code>count</code> parameter is an optional parameter of type <code>number</code>. It represents the number
|
|
675
|
+
of occurrences of the value in the binary tree node. If not provided, the default value is <code>undefined</code>.</p>
|
|
676
|
+
</div>
|
|
677
|
+
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
678
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h4><p>a BinaryTreeNode object if the value is not null, otherwise it returns null.</p>
|
|
679
|
+
|
|
680
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
681
|
+
<p>Overrides <a href="BST.html">BST</a>.<a href="BST.html#_createNode">_createNode</a></p>
|
|
682
|
+
<ul>
|
|
683
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/avl-tree.ts#L19">src/data-structures/binary-tree/avl-tree.ts:19</a></li></ul></aside></li></ul></section>
|
|
646
684
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_getResultByPropertyName" class="tsd-anchor"></a>
|
|
647
685
|
<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>
|
|
648
686
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
649
|
-
<li class="tsd-signature tsd-anchor-link" id="_getResultByPropertyName._getResultByPropertyName-1"><span class="tsd-kind-call-signature">_get<wbr/>Result<wbr/>By<wbr/>Property<wbr/>Name</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../types/ResultsByProperty.html" class="tsd-signature-type tsd-kind-type-alias">ResultsByProperty</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
687
|
+
<li class="tsd-signature tsd-anchor-link" id="_getResultByPropertyName._getResultByPropertyName-1"><span class="tsd-kind-call-signature">_get<wbr/>Result<wbr/>By<wbr/>Property<wbr/>Name</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../types/ResultsByProperty.html" class="tsd-signature-type tsd-kind-type-alias">ResultsByProperty</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">></span><a href="#_getResultByPropertyName._getResultByPropertyName-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
650
688
|
<li class="tsd-description">
|
|
651
689
|
<div class="tsd-comment tsd-typography"><p>The function <code>_getResultByPropertyName</code> returns different results based on the provided property name or defaulting
|
|
652
690
|
to 'id'.</p>
|
|
@@ -660,12 +698,12 @@ to 'id'.</p>
|
|
|
660
698
|
can accept a value of type <code>NodeOrPropertyName</code>.</p>
|
|
661
699
|
</div>
|
|
662
700
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
663
|
-
<h4 class="tsd-returns-title">Returns <a href="../types/ResultsByProperty.html" class="tsd-signature-type tsd-kind-type-alias">ResultsByProperty</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
701
|
+
<h4 class="tsd-returns-title">Returns <a href="../types/ResultsByProperty.html" class="tsd-signature-type tsd-kind-type-alias">ResultsByProperty</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">></span></h4><p>The method returns an object of type <code>ResultsByProperty<T></code>.</p>
|
|
664
702
|
|
|
665
703
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
666
704
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_getResultByPropertyName">_getResultByPropertyName</a></p>
|
|
667
705
|
<ul>
|
|
668
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
706
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1485">src/data-structures/binary-tree/binary-tree.ts:1485</a></li></ul></aside></li></ul></section>
|
|
669
707
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_pushByPropertyNameStopOrNot" class="tsd-anchor"></a>
|
|
670
708
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_push<wbr/>By<wbr/>Property<wbr/>Name<wbr/>Stop<wbr/>Or<wbr/>Not</span><a href="#_pushByPropertyNameStopOrNot" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
671
709
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -678,18 +716,18 @@ a result array.</p>
|
|
|
678
716
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
679
717
|
<ul class="tsd-parameter-list">
|
|
680
718
|
<li>
|
|
681
|
-
<h5><span class="tsd-kind-parameter">cur</span>: <
|
|
719
|
+
<h5><span class="tsd-kind-parameter">cur</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
682
720
|
<div class="tsd-comment tsd-typography"><p>The current binary tree node that is being checked.</p>
|
|
683
721
|
</div>
|
|
684
722
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
685
723
|
<li>
|
|
686
|
-
<h5><span class="tsd-kind-parameter">result</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
724
|
+
<h5><span class="tsd-kind-parameter">result</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span></h5>
|
|
687
725
|
<div class="tsd-comment tsd-typography"><p>An array that stores the matching nodes found during the
|
|
688
726
|
traversal.</p>
|
|
689
727
|
</div>
|
|
690
728
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
691
729
|
<li>
|
|
692
|
-
<h5><span class="tsd-kind-parameter">nodeProperty</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
730
|
+
<h5><span class="tsd-kind-parameter">nodeProperty</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
693
731
|
<div class="tsd-comment tsd-typography"><p>The <code>nodeProperty</code> parameter is the value that we are searching for in
|
|
694
732
|
the binary tree nodes. It can be either the <code>id</code>, <code>count</code>, or <code>val</code> property of the node.</p>
|
|
695
733
|
</div>
|
|
@@ -713,7 +751,7 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
713
751
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
714
752
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_pushByPropertyNameStopOrNot">_pushByPropertyNameStopOrNot</a></p>
|
|
715
753
|
<ul>
|
|
716
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
754
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1419">src/data-structures/binary-tree/binary-tree.ts:1419</a></li></ul></aside></li></ul></section>
|
|
717
755
|
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_resetResults" class="tsd-anchor"></a>
|
|
718
756
|
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_reset<wbr/>Results</span><a href="#_resetResults" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
719
757
|
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
@@ -725,11 +763,165 @@ stop after finding the first matching node or continue searching for all matchin
|
|
|
725
763
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
726
764
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_resetResults">_resetResults</a></p>
|
|
727
765
|
<ul>
|
|
728
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
766
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1395">src/data-structures/binary-tree/binary-tree.ts:1395</a></li></ul></aside></li></ul></section>
|
|
767
|
+
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setAutoIncrementId" class="tsd-anchor"></a>
|
|
768
|
+
<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>
|
|
769
|
+
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
770
|
+
<li class="tsd-signature tsd-anchor-link" id="_setAutoIncrementId._setAutoIncrementId-1"><span class="tsd-kind-call-signature">_set<wbr/>Auto<wbr/>Increment<wbr/>Id</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#_setAutoIncrementId._setAutoIncrementId-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
771
|
+
<li class="tsd-description">
|
|
772
|
+
<div class="tsd-parameters">
|
|
773
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
774
|
+
<ul class="tsd-parameter-list">
|
|
775
|
+
<li>
|
|
776
|
+
<h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">boolean</span></h5></li></ul></div>
|
|
777
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
778
|
+
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_setAutoIncrementId">_setAutoIncrementId</a></p>
|
|
779
|
+
<ul>
|
|
780
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1364">src/data-structures/binary-tree/binary-tree.ts:1364</a></li></ul></aside></li></ul></section>
|
|
781
|
+
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setCount" class="tsd-anchor"></a>
|
|
782
|
+
<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>
|
|
783
|
+
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
784
|
+
<li class="tsd-signature tsd-anchor-link" id="_setCount._setCount-1"><span class="tsd-kind-call-signature">_set<wbr/>Count</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">v</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#_setCount._setCount-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
785
|
+
<li class="tsd-description">
|
|
786
|
+
<div class="tsd-parameters">
|
|
787
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
788
|
+
<ul class="tsd-parameter-list">
|
|
789
|
+
<li>
|
|
790
|
+
<h5><span class="tsd-kind-parameter">v</span>: <span class="tsd-signature-type">number</span></h5></li></ul></div>
|
|
791
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
792
|
+
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_setCount">_setCount</a></p>
|
|
793
|
+
<ul>
|
|
794
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1388">src/data-structures/binary-tree/binary-tree.ts:1388</a></li></ul></aside></li></ul></section>
|
|
795
|
+
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setIsDuplicatedVal" class="tsd-anchor"></a>
|
|
796
|
+
<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>
|
|
797
|
+
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
798
|
+
<li class="tsd-signature tsd-anchor-link" id="_setIsDuplicatedVal._setIsDuplicatedVal-1"><span class="tsd-kind-call-signature">_set<wbr/>Is<wbr/>Duplicated<wbr/>Val</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#_setIsDuplicatedVal._setIsDuplicatedVal-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
799
|
+
<li class="tsd-description">
|
|
800
|
+
<div class="tsd-parameters">
|
|
801
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
802
|
+
<ul class="tsd-parameter-list">
|
|
803
|
+
<li>
|
|
804
|
+
<h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">boolean</span></h5></li></ul></div>
|
|
805
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
806
|
+
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_setIsDuplicatedVal">_setIsDuplicatedVal</a></p>
|
|
807
|
+
<ul>
|
|
808
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1372">src/data-structures/binary-tree/binary-tree.ts:1372</a></li></ul></aside></li></ul></section>
|
|
809
|
+
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setLoopType" class="tsd-anchor"></a>
|
|
810
|
+
<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>
|
|
811
|
+
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
812
|
+
<li class="tsd-signature tsd-anchor-link" id="_setLoopType._setLoopType-1"><span class="tsd-kind-call-signature">_set<wbr/>Loop<wbr/>Type</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#_setLoopType._setLoopType-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
813
|
+
<li class="tsd-description">
|
|
814
|
+
<div class="tsd-parameters">
|
|
815
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
816
|
+
<ul class="tsd-parameter-list">
|
|
817
|
+
<li>
|
|
818
|
+
<h5><span class="tsd-kind-parameter">value</span>: <a href="../enums/LoopType.html" class="tsd-signature-type tsd-kind-enum">LoopType</a></h5></li></ul></div>
|
|
819
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
820
|
+
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_setLoopType">_setLoopType</a></p>
|
|
821
|
+
<ul>
|
|
822
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1340">src/data-structures/binary-tree/binary-tree.ts:1340</a></li></ul></aside></li></ul></section>
|
|
823
|
+
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setMaxId" class="tsd-anchor"></a>
|
|
824
|
+
<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>
|
|
825
|
+
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
826
|
+
<li class="tsd-signature tsd-anchor-link" id="_setMaxId._setMaxId-1"><span class="tsd-kind-call-signature">_set<wbr/>Max<wbr/>Id</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#_setMaxId._setMaxId-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
827
|
+
<li class="tsd-description">
|
|
828
|
+
<div class="tsd-parameters">
|
|
829
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
830
|
+
<ul class="tsd-parameter-list">
|
|
831
|
+
<li>
|
|
832
|
+
<h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">number</span></h5></li></ul></div>
|
|
833
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
834
|
+
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_setMaxId">_setMaxId</a></p>
|
|
835
|
+
<ul>
|
|
836
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1368">src/data-structures/binary-tree/binary-tree.ts:1368</a></li></ul></aside></li></ul></section>
|
|
837
|
+
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setRoot" class="tsd-anchor"></a>
|
|
838
|
+
<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>
|
|
839
|
+
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
840
|
+
<li class="tsd-signature tsd-anchor-link" id="_setRoot._setRoot-1"><span class="tsd-kind-call-signature">_set<wbr/>Root</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">v</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#_setRoot._setRoot-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
841
|
+
<li class="tsd-description">
|
|
842
|
+
<div class="tsd-parameters">
|
|
843
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
844
|
+
<ul class="tsd-parameter-list">
|
|
845
|
+
<li>
|
|
846
|
+
<h5><span class="tsd-kind-parameter">v</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5></li></ul></div>
|
|
847
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
848
|
+
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_setRoot">_setRoot</a></p>
|
|
849
|
+
<ul>
|
|
850
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1376">src/data-structures/binary-tree/binary-tree.ts:1376</a></li></ul></aside></li></ul></section>
|
|
851
|
+
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setSize" class="tsd-anchor"></a>
|
|
852
|
+
<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>
|
|
853
|
+
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
854
|
+
<li class="tsd-signature tsd-anchor-link" id="_setSize._setSize-1"><span class="tsd-kind-call-signature">_set<wbr/>Size</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">v</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#_setSize._setSize-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
855
|
+
<li class="tsd-description">
|
|
856
|
+
<div class="tsd-parameters">
|
|
857
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
858
|
+
<ul class="tsd-parameter-list">
|
|
859
|
+
<li>
|
|
860
|
+
<h5><span class="tsd-kind-parameter">v</span>: <span class="tsd-signature-type">number</span></h5></li></ul></div>
|
|
861
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
862
|
+
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_setSize">_setSize</a></p>
|
|
863
|
+
<ul>
|
|
864
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1384">src/data-structures/binary-tree/binary-tree.ts:1384</a></li></ul></aside></li></ul></section>
|
|
865
|
+
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setVisitedId" class="tsd-anchor"></a>
|
|
866
|
+
<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>
|
|
867
|
+
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
868
|
+
<li class="tsd-signature tsd-anchor-link" id="_setVisitedId._setVisitedId-1"><span class="tsd-kind-call-signature">_set<wbr/>Visited<wbr/>Id</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#_setVisitedId._setVisitedId-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
869
|
+
<li class="tsd-description">
|
|
870
|
+
<div class="tsd-parameters">
|
|
871
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
872
|
+
<ul class="tsd-parameter-list">
|
|
873
|
+
<li>
|
|
874
|
+
<h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h5></li></ul></div>
|
|
875
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
876
|
+
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_setVisitedId">_setVisitedId</a></p>
|
|
877
|
+
<ul>
|
|
878
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1344">src/data-structures/binary-tree/binary-tree.ts:1344</a></li></ul></aside></li></ul></section>
|
|
879
|
+
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setVisitedLeftSum" class="tsd-anchor"></a>
|
|
880
|
+
<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>
|
|
881
|
+
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
882
|
+
<li class="tsd-signature tsd-anchor-link" id="_setVisitedLeftSum._setVisitedLeftSum-1"><span class="tsd-kind-call-signature">_set<wbr/>Visited<wbr/>Left<wbr/>Sum</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#_setVisitedLeftSum._setVisitedLeftSum-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
883
|
+
<li class="tsd-description">
|
|
884
|
+
<div class="tsd-parameters">
|
|
885
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
886
|
+
<ul class="tsd-parameter-list">
|
|
887
|
+
<li>
|
|
888
|
+
<h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h5></li></ul></div>
|
|
889
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
890
|
+
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_setVisitedLeftSum">_setVisitedLeftSum</a></p>
|
|
891
|
+
<ul>
|
|
892
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1360">src/data-structures/binary-tree/binary-tree.ts:1360</a></li></ul></aside></li></ul></section>
|
|
893
|
+
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setVisitedNode" class="tsd-anchor"></a>
|
|
894
|
+
<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>
|
|
895
|
+
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
896
|
+
<li class="tsd-signature tsd-anchor-link" id="_setVisitedNode._setVisitedNode-1"><span class="tsd-kind-call-signature">_set<wbr/>Visited<wbr/>Node</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#_setVisitedNode._setVisitedNode-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
897
|
+
<li class="tsd-description">
|
|
898
|
+
<div class="tsd-parameters">
|
|
899
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
900
|
+
<ul class="tsd-parameter-list">
|
|
901
|
+
<li>
|
|
902
|
+
<h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h5></li></ul></div>
|
|
903
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
904
|
+
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_setVisitedNode">_setVisitedNode</a></p>
|
|
905
|
+
<ul>
|
|
906
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1352">src/data-structures/binary-tree/binary-tree.ts:1352</a></li></ul></aside></li></ul></section>
|
|
907
|
+
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setVisitedVal" class="tsd-anchor"></a>
|
|
908
|
+
<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>
|
|
909
|
+
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
910
|
+
<li class="tsd-signature tsd-anchor-link" id="_setVisitedVal._setVisitedVal-1"><span class="tsd-kind-call-signature">_set<wbr/>Visited<wbr/>Val</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#_setVisitedVal._setVisitedVal-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
911
|
+
<li class="tsd-description">
|
|
912
|
+
<div class="tsd-parameters">
|
|
913
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
914
|
+
<ul class="tsd-parameter-list">
|
|
915
|
+
<li>
|
|
916
|
+
<h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h5></li></ul></div>
|
|
917
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
918
|
+
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_setVisitedVal">_setVisitedVal</a></p>
|
|
919
|
+
<ul>
|
|
920
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1348">src/data-structures/binary-tree/binary-tree.ts:1348</a></li></ul></aside></li></ul></section>
|
|
729
921
|
<section class="tsd-panel tsd-member"><a id="add" class="tsd-anchor"></a>
|
|
730
922
|
<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>
|
|
731
923
|
<ul class="tsd-signatures">
|
|
732
|
-
<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><
|
|
924
|
+
<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>
|
|
733
925
|
<li class="tsd-description">
|
|
734
926
|
<div class="tsd-comment tsd-typography"><p>The function overrides the add method of a Binary Search Tree to insert a node with a given id and value, and then
|
|
735
927
|
balances the tree.</p>
|
|
@@ -744,9 +936,9 @@ update in the AVL tree.</p>
|
|
|
744
936
|
</div>
|
|
745
937
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
746
938
|
<li>
|
|
747
|
-
<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">
|
|
939
|
+
<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>
|
|
748
940
|
<div class="tsd-comment tsd-typography"><p>The <code>val</code> parameter represents the value that you want to assign to the node with the given
|
|
749
|
-
<code>id</code>. It can be of type <code>
|
|
941
|
+
<code>id</code>. It can be of type <code>N</code> (the generic type) or <code>null</code>.</p>
|
|
750
942
|
</div>
|
|
751
943
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
752
944
|
<li>
|
|
@@ -756,16 +948,16 @@ of times the value <code>val</code> should be inserted into the AVL tree. If the
|
|
|
756
948
|
to <code>1</code>, indicating that the value should be inserted once.</p>
|
|
757
949
|
</div>
|
|
758
950
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
759
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
951
|
+
<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 either an N object or null.</p>
|
|
760
952
|
|
|
761
953
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
762
954
|
<p>Overrides <a href="BST.html">BST</a>.<a href="BST.html#add">add</a></p>
|
|
763
955
|
<ul>
|
|
764
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
956
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/avl-tree.ts#L36">src/data-structures/binary-tree/avl-tree.ts:36</a></li></ul></aside></li></ul></section>
|
|
765
957
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="addMany" class="tsd-anchor"></a>
|
|
766
958
|
<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>
|
|
767
959
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
768
|
-
<li class="tsd-signature tsd-anchor-link" id="addMany.addMany-1"><span class="tsd-kind-call-signature">add<wbr/>Many</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
960
|
+
<li class="tsd-signature tsd-anchor-link" id="addMany.addMany-1"><span class="tsd-kind-call-signature">add<wbr/>Many</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span><a href="#addMany.addMany-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
769
961
|
<li class="tsd-description">
|
|
770
962
|
<div class="tsd-comment tsd-typography"><p>The <code>addMany</code> function inserts multiple items into a binary tree and returns an array of the inserted nodes or
|
|
771
963
|
null/undefined values.</p>
|
|
@@ -774,21 +966,21 @@ null/undefined values.</p>
|
|
|
774
966
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
775
967
|
<ul class="tsd-parameter-list">
|
|
776
968
|
<li>
|
|
777
|
-
<h5><span class="tsd-kind-parameter">data</span>: <
|
|
778
|
-
<div class="tsd-comment tsd-typography"><p>The <code>data</code> parameter can be either an array of elements of type <code>
|
|
779
|
-
array of <code>
|
|
969
|
+
<h5><span class="tsd-kind-parameter">data</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[]</span></h5>
|
|
970
|
+
<div class="tsd-comment tsd-typography"><p>The <code>data</code> parameter can be either an array of elements of type <code>N</code> or an
|
|
971
|
+
array of <code>N</code> objects.</p>
|
|
780
972
|
</div>
|
|
781
973
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
782
|
-
<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><
|
|
974
|
+
<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>
|
|
783
975
|
|
|
784
976
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
785
977
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#addMany">addMany</a></p>
|
|
786
978
|
<ul>
|
|
787
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
979
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L389">src/data-structures/binary-tree/binary-tree.ts:389</a></li></ul></aside></li></ul></section>
|
|
788
980
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="addTo" class="tsd-anchor"></a>
|
|
789
981
|
<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>
|
|
790
982
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
791
|
-
<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><
|
|
983
|
+
<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>
|
|
792
984
|
<li class="tsd-description">
|
|
793
985
|
<div class="tsd-comment tsd-typography"><p>The function inserts a new node into a binary tree as the left or right child of a given parent node.</p>
|
|
794
986
|
</div>
|
|
@@ -796,23 +988,23 @@ array of <code>BinaryTreeNode<T></code> objects.</p>
|
|
|
796
988
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
797
989
|
<ul class="tsd-parameter-list">
|
|
798
990
|
<li>
|
|
799
|
-
<h5><span class="tsd-kind-parameter">newNode</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
991
|
+
<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>
|
|
800
992
|
<div class="tsd-comment tsd-typography"><p>The <code>newNode</code> parameter is an instance of the <code>BinaryTreeNode</code> class or
|
|
801
993
|
<code>null</code>. It represents the node that needs to be inserted into the binary tree.</p>
|
|
802
994
|
</div>
|
|
803
995
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
804
996
|
<li>
|
|
805
|
-
<h5><span class="tsd-kind-parameter">parent</span>: <
|
|
997
|
+
<h5><span class="tsd-kind-parameter">parent</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
806
998
|
<div class="tsd-comment tsd-typography"><p>The <code>parent</code> parameter is a BinaryTreeNode object representing the parent node to which the new node
|
|
807
999
|
will be inserted as a child.</p>
|
|
808
1000
|
</div>
|
|
809
1001
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
810
|
-
<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><
|
|
1002
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h4><p>The method returns the newly inserted node, either as the left child or the right child of the parent node.</p>
|
|
811
1003
|
|
|
812
1004
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
813
1005
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#addTo">addTo</a></p>
|
|
814
1006
|
<ul>
|
|
815
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1007
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L349">src/data-structures/binary-tree/binary-tree.ts:349</a></li></ul></aside></li></ul></section>
|
|
816
1008
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="allGreaterNodesAdd" class="tsd-anchor"></a>
|
|
817
1009
|
<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>
|
|
818
1010
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -825,8 +1017,8 @@ that have a greater value than a given node.</p>
|
|
|
825
1017
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
826
1018
|
<ul class="tsd-parameter-list">
|
|
827
1019
|
<li>
|
|
828
|
-
<h5><span class="tsd-kind-parameter">node</span>: <
|
|
829
|
-
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is of type <code>
|
|
1020
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1021
|
+
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is of type <code>N</code>, which represents a node in a binary search tree. It
|
|
830
1022
|
contains properties such as <code>id</code> and <code>count</code>.</p>
|
|
831
1023
|
</div>
|
|
832
1024
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
@@ -848,7 +1040,7 @@ defaults to 'id'.</p>
|
|
|
848
1040
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
849
1041
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#allGreaterNodesAdd">allGreaterNodesAdd</a></p>
|
|
850
1042
|
<ul>
|
|
851
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1043
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/bst.ts#L351">src/data-structures/binary-tree/bst.ts:351</a></li></ul></aside></li></ul></section>
|
|
852
1044
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="balance" class="tsd-anchor"></a>
|
|
853
1045
|
<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>
|
|
854
1046
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -862,7 +1054,7 @@ recursive or iterative approach.</p>
|
|
|
862
1054
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
863
1055
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#balance">balance</a></p>
|
|
864
1056
|
<ul>
|
|
865
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1057
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/bst.ts#L402">src/data-structures/binary-tree/bst.ts:402</a></li></ul></aside></li></ul></section>
|
|
866
1058
|
<section class="tsd-panel tsd-member"><a id="balanceFactor" class="tsd-anchor"></a>
|
|
867
1059
|
<h3 class="tsd-anchor-link"><span>balance<wbr/>Factor</span><a href="#balanceFactor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
868
1060
|
<ul class="tsd-signatures">
|
|
@@ -875,15 +1067,15 @@ height of its right subtree.</p>
|
|
|
875
1067
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
876
1068
|
<ul class="tsd-parameter-list">
|
|
877
1069
|
<li>
|
|
878
|
-
<h5><span class="tsd-kind-parameter">node</span>: <
|
|
879
|
-
<div class="tsd-comment tsd-typography"><p>The parameter "node" is of type
|
|
1070
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1071
|
+
<div class="tsd-comment tsd-typography"><p>The parameter "node" is of type N, which represents a node in an AVL tree.</p>
|
|
880
1072
|
</div>
|
|
881
1073
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
882
1074
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>The balance factor of the given AVL tree node.</p>
|
|
883
1075
|
|
|
884
1076
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
885
1077
|
<ul>
|
|
886
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1078
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/avl-tree.ts#L68">src/data-structures/binary-tree/avl-tree.ts:68</a></li></ul></aside></li></ul></section>
|
|
887
1079
|
<section class="tsd-panel tsd-member"><a id="balanceLL" class="tsd-anchor"></a>
|
|
888
1080
|
<h3 class="tsd-anchor-link"><span>balanceLL</span><a href="#balanceLL" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
889
1081
|
<ul class="tsd-signatures">
|
|
@@ -895,14 +1087,14 @@ height of its right subtree.</p>
|
|
|
895
1087
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
896
1088
|
<ul class="tsd-parameter-list">
|
|
897
1089
|
<li>
|
|
898
|
-
<h5><span class="tsd-kind-parameter">A</span>: <
|
|
1090
|
+
<h5><span class="tsd-kind-parameter">A</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
899
1091
|
<div class="tsd-comment tsd-typography"><p>The parameter A is an AVLTreeNode object.</p>
|
|
900
1092
|
</div>
|
|
901
1093
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
902
1094
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
903
1095
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
904
1096
|
<ul>
|
|
905
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1097
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/avl-tree.ts#L130">src/data-structures/binary-tree/avl-tree.ts:130</a></li></ul></aside></li></ul></section>
|
|
906
1098
|
<section class="tsd-panel tsd-member"><a id="balanceLR" class="tsd-anchor"></a>
|
|
907
1099
|
<h3 class="tsd-anchor-link"><span>balanceLR</span><a href="#balanceLR" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
908
1100
|
<ul class="tsd-signatures">
|
|
@@ -914,14 +1106,14 @@ height of its right subtree.</p>
|
|
|
914
1106
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
915
1107
|
<ul class="tsd-parameter-list">
|
|
916
1108
|
<li>
|
|
917
|
-
<h5><span class="tsd-kind-parameter">A</span>: <
|
|
1109
|
+
<h5><span class="tsd-kind-parameter">A</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
918
1110
|
<div class="tsd-comment tsd-typography"><p>A is an AVLTreeNode object.</p>
|
|
919
1111
|
</div>
|
|
920
1112
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
921
1113
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
922
1114
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
923
1115
|
<ul>
|
|
924
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1116
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/avl-tree.ts#L160">src/data-structures/binary-tree/avl-tree.ts:160</a></li></ul></aside></li></ul></section>
|
|
925
1117
|
<section class="tsd-panel tsd-member"><a id="balancePath" class="tsd-anchor"></a>
|
|
926
1118
|
<h3 class="tsd-anchor-link"><span>balance<wbr/>Path</span><a href="#balancePath" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
927
1119
|
<ul class="tsd-signatures">
|
|
@@ -934,14 +1126,14 @@ each node in the path from the given node to the root.</p>
|
|
|
934
1126
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
935
1127
|
<ul class="tsd-parameter-list">
|
|
936
1128
|
<li>
|
|
937
|
-
<h5><span class="tsd-kind-parameter">node</span>: <
|
|
1129
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
938
1130
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is an AVLTreeNode object, which represents a node in an AVL tree.</p>
|
|
939
1131
|
</div>
|
|
940
1132
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
941
1133
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
942
1134
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
943
1135
|
<ul>
|
|
944
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1136
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/avl-tree.ts#L99">src/data-structures/binary-tree/avl-tree.ts:99</a></li></ul></aside></li></ul></section>
|
|
945
1137
|
<section class="tsd-panel tsd-member"><a id="balanceRL" class="tsd-anchor"></a>
|
|
946
1138
|
<h3 class="tsd-anchor-link"><span>balanceRL</span><a href="#balanceRL" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
947
1139
|
<ul class="tsd-signatures">
|
|
@@ -953,14 +1145,14 @@ each node in the path from the given node to the root.</p>
|
|
|
953
1145
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
954
1146
|
<ul class="tsd-parameter-list">
|
|
955
1147
|
<li>
|
|
956
|
-
<h5><span class="tsd-kind-parameter">A</span>: <
|
|
1148
|
+
<h5><span class="tsd-kind-parameter">A</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
957
1149
|
<div class="tsd-comment tsd-typography"><p>A is an AVLTreeNode object.</p>
|
|
958
1150
|
</div>
|
|
959
1151
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
960
1152
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
961
1153
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
962
1154
|
<ul>
|
|
963
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1155
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/avl-tree.ts#L243">src/data-structures/binary-tree/avl-tree.ts:243</a></li></ul></aside></li></ul></section>
|
|
964
1156
|
<section class="tsd-panel tsd-member"><a id="balanceRR" class="tsd-anchor"></a>
|
|
965
1157
|
<h3 class="tsd-anchor-link"><span>balanceRR</span><a href="#balanceRR" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
966
1158
|
<ul class="tsd-signatures">
|
|
@@ -972,14 +1164,14 @@ each node in the path from the given node to the root.</p>
|
|
|
972
1164
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
973
1165
|
<ul class="tsd-parameter-list">
|
|
974
1166
|
<li>
|
|
975
|
-
<h5><span class="tsd-kind-parameter">A</span>: <
|
|
1167
|
+
<h5><span class="tsd-kind-parameter">A</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
976
1168
|
<div class="tsd-comment tsd-typography"><p>The parameter A is an AVLTreeNode object.</p>
|
|
977
1169
|
</div>
|
|
978
1170
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
979
1171
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
980
1172
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
981
1173
|
<ul>
|
|
982
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1174
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/avl-tree.ts#L208">src/data-structures/binary-tree/avl-tree.ts:208</a></li></ul></aside></li></ul></section>
|
|
983
1175
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="clear" class="tsd-anchor"></a>
|
|
984
1176
|
<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>
|
|
985
1177
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -991,43 +1183,7 @@ each node in the path from the given node to the root.</p>
|
|
|
991
1183
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
992
1184
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#clear">clear</a></p>
|
|
993
1185
|
<ul>
|
|
994
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
995
|
-
<section class="tsd-panel tsd-member"><a id="createNode" class="tsd-anchor"></a>
|
|
996
|
-
<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>
|
|
997
|
-
<ul class="tsd-signatures">
|
|
998
|
-
<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><a href="AVLTreeNode.html" class="tsd-signature-type tsd-kind-class">AVLTreeNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">></span><a href="#createNode.createNode-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
999
|
-
<li class="tsd-description">
|
|
1000
|
-
<div class="tsd-comment tsd-typography"><p>The function creates a new binary tree node with the given id, value, and count, or returns null if the value is
|
|
1001
|
-
null.</p>
|
|
1002
|
-
</div>
|
|
1003
|
-
<div class="tsd-parameters">
|
|
1004
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1005
|
-
<ul class="tsd-parameter-list">
|
|
1006
|
-
<li>
|
|
1007
|
-
<h5><span class="tsd-kind-parameter">id</span>: <span class="tsd-signature-type">number</span></h5>
|
|
1008
|
-
<div class="tsd-comment tsd-typography"><p>The <code>id</code> parameter is the identifier for the binary tree node. It is of type
|
|
1009
|
-
<code>BinaryTreeNodeId</code>, which could be a string or a number, depending on how you want to identify your nodes.</p>
|
|
1010
|
-
</div>
|
|
1011
|
-
<div class="tsd-comment tsd-typography"></div></li>
|
|
1012
|
-
<li>
|
|
1013
|
-
<h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
|
|
1014
|
-
<div class="tsd-comment tsd-typography"><p>The <code>val</code> parameter represents the value to be stored in the binary tree node. It can be of
|
|
1015
|
-
any type <code>T</code> or <code>null</code>.</p>
|
|
1016
|
-
</div>
|
|
1017
|
-
<div class="tsd-comment tsd-typography"></div></li>
|
|
1018
|
-
<li>
|
|
1019
|
-
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">count</span>: <span class="tsd-signature-type">number</span></h5>
|
|
1020
|
-
<div class="tsd-comment tsd-typography"><p>The count parameter is an optional parameter that represents the number of occurrences of
|
|
1021
|
-
the value in the binary tree node. It is of type number.</p>
|
|
1022
|
-
</div>
|
|
1023
|
-
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1024
|
-
<h4 class="tsd-returns-title">Returns <a href="AVLTreeNode.html" class="tsd-signature-type tsd-kind-class">AVLTreeNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">></span></h4><p>The function <code>createNode</code> returns a <code>BinaryTreeNode<T></code> object if the <code>val</code> parameter is not null.
|
|
1025
|
-
Otherwise, it returns null.</p>
|
|
1026
|
-
|
|
1027
|
-
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1028
|
-
<p>Overrides <a href="BST.html">BST</a>.<a href="BST.html#createNode">createNode</a></p>
|
|
1029
|
-
<ul>
|
|
1030
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/avl-tree.ts#L25">src/data-structures/binary-tree/avl-tree.ts:25</a></li></ul></aside></li></ul></section>
|
|
1186
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L273">src/data-structures/binary-tree/binary-tree.ts:273</a></li></ul></aside></li></ul></section>
|
|
1031
1187
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="fill" class="tsd-anchor"></a>
|
|
1032
1188
|
<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>
|
|
1033
1189
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1040,9 +1196,9 @@ was successful.</p>
|
|
|
1040
1196
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1041
1197
|
<ul class="tsd-parameter-list">
|
|
1042
1198
|
<li>
|
|
1043
|
-
<h5><span class="tsd-kind-parameter">data</span>: <
|
|
1044
|
-
<div class="tsd-comment tsd-typography"><p>The <code>data</code> parameter can be either an array of elements of type <code>
|
|
1045
|
-
array of <code>
|
|
1199
|
+
<h5><span class="tsd-kind-parameter">data</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[]</span></h5>
|
|
1200
|
+
<div class="tsd-comment tsd-typography"><p>The <code>data</code> parameter can be either an array of elements of type <code>N</code> or an
|
|
1201
|
+
array of <code>N</code> objects.</p>
|
|
1046
1202
|
</div>
|
|
1047
1203
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1048
1204
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>The method is returning a boolean value.</p>
|
|
@@ -1050,11 +1206,11 @@ array of <code>BinaryTreeNode<T></code> objects.</p>
|
|
|
1050
1206
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1051
1207
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#fill">fill</a></p>
|
|
1052
1208
|
<ul>
|
|
1053
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1209
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L436">src/data-structures/binary-tree/binary-tree.ts:436</a></li></ul></aside></li></ul></section>
|
|
1054
1210
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="get" class="tsd-anchor"></a>
|
|
1055
1211
|
<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>
|
|
1056
1212
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
1057
|
-
<li class="tsd-signature tsd-anchor-link" id="get.get-1"><span class="tsd-kind-call-signature">get</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">nodeProperty</span>, <span class="tsd-kind-parameter">propertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1213
|
+
<li class="tsd-signature tsd-anchor-link" id="get.get-1"><span class="tsd-kind-call-signature">get</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">nodeProperty</span>, <span class="tsd-kind-parameter">propertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><a href="#get.get-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1058
1214
|
<li class="tsd-description">
|
|
1059
1215
|
<div class="tsd-comment tsd-typography"><p>The <code>get</code> function returns the first node in a binary search tree that matches the given property value or name.</p>
|
|
1060
1216
|
</div>
|
|
@@ -1062,9 +1218,9 @@ array of <code>BinaryTreeNode<T></code> objects.</p>
|
|
|
1062
1218
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1063
1219
|
<ul class="tsd-parameter-list">
|
|
1064
1220
|
<li>
|
|
1065
|
-
<h5><span class="tsd-kind-parameter">nodeProperty</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
1221
|
+
<h5><span class="tsd-kind-parameter">nodeProperty</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1066
1222
|
<div class="tsd-comment tsd-typography"><p>The <code>nodeProperty</code> parameter can be either a <code>BinaryTreeNodeId</code> or a
|
|
1067
|
-
generic type <code>
|
|
1223
|
+
generic type <code>N</code>. It represents the value of the property that you want to search for in the binary search tree.</p>
|
|
1068
1224
|
</div>
|
|
1069
1225
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
1070
1226
|
<li>
|
|
@@ -1074,24 +1230,12 @@ specifies the property name to use for searching the binary search tree nodes. I
|
|
|
1074
1230
|
<code>'id'</code>.</p>
|
|
1075
1231
|
</div>
|
|
1076
1232
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1077
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1233
|
+
<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>
|
|
1078
1234
|
|
|
1079
1235
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1080
1236
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#get">get</a></p>
|
|
1081
1237
|
<ul>
|
|
1082
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1083
|
-
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getCount" class="tsd-anchor"></a>
|
|
1084
|
-
<h3 class="tsd-anchor-link"><span>get<wbr/>Count</span><a href="#getCount" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1085
|
-
<ul class="tsd-signatures tsd-is-inherited">
|
|
1086
|
-
<li class="tsd-signature tsd-anchor-link" id="getCount.getCount-1"><span class="tsd-kind-call-signature">get<wbr/>Count</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#getCount.getCount-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1087
|
-
<li class="tsd-description">
|
|
1088
|
-
<div class="tsd-comment tsd-typography"><p>Starting from TypeScript version 5.0 and onwards, the use of distinct access modifiers for Getters and Setters is not permitted. As an alternative, to ensure compatibility, it is necessary to adopt a Java-style approach for Setters (using the same name as the property) while utilizing separate method names for Getters.</p>
|
|
1089
|
-
</div>
|
|
1090
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4>
|
|
1091
|
-
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1092
|
-
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getCount">getCount</a></p>
|
|
1093
|
-
<ul>
|
|
1094
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L291">src/data-structures/binary-tree/binary-tree.ts:291</a></li></ul></aside></li></ul></section>
|
|
1238
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/bst.ts#L133">src/data-structures/binary-tree/bst.ts:133</a></li></ul></aside></li></ul></section>
|
|
1095
1239
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getDepth" class="tsd-anchor"></a>
|
|
1096
1240
|
<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>
|
|
1097
1241
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1103,8 +1247,8 @@ specifies the property name to use for searching the binary search tree nodes. I
|
|
|
1103
1247
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1104
1248
|
<ul class="tsd-parameter-list">
|
|
1105
1249
|
<li>
|
|
1106
|
-
<h5><span class="tsd-kind-parameter">node</span>: <
|
|
1107
|
-
<div class="tsd-comment tsd-typography"><p>
|
|
1250
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1251
|
+
<div class="tsd-comment tsd-typography"><p>N - This is the node for which we want to calculate the depth. It is a generic type,
|
|
1108
1252
|
meaning it can represent any type of data that we want to store in the node.</p>
|
|
1109
1253
|
</div>
|
|
1110
1254
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
@@ -1113,7 +1257,7 @@ meaning it can represent any type of data that we want to store in the node.</p>
|
|
|
1113
1257
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1114
1258
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getDepth">getDepth</a></p>
|
|
1115
1259
|
<ul>
|
|
1116
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1260
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L494">src/data-structures/binary-tree/binary-tree.ts:494</a></li></ul></aside></li></ul></section>
|
|
1117
1261
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getHeight" class="tsd-anchor"></a>
|
|
1118
1262
|
<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>
|
|
1119
1263
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1126,9 +1270,9 @@ approach.</p>
|
|
|
1126
1270
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1127
1271
|
<ul class="tsd-parameter-list">
|
|
1128
1272
|
<li>
|
|
1129
|
-
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">beginRoot</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1273
|
+
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">beginRoot</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1130
1274
|
<div class="tsd-comment tsd-typography"><p>The <code>beginRoot</code> parameter is an optional parameter of type
|
|
1131
|
-
<code>
|
|
1275
|
+
<code>N | null</code>. It represents the starting node from which to calculate the height of the binary tree.
|
|
1132
1276
|
If no value is provided for <code>beginRoot</code>, the function will use the <code>root</code> property of the class instance as</p>
|
|
1133
1277
|
</div>
|
|
1134
1278
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
@@ -1137,22 +1281,22 @@ If no value is provided for <code>beginRoot</code>, the function will use the <c
|
|
|
1137
1281
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1138
1282
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getHeight">getHeight</a></p>
|
|
1139
1283
|
<ul>
|
|
1140
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1284
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L511">src/data-structures/binary-tree/binary-tree.ts:511</a></li></ul></aside></li></ul></section>
|
|
1141
1285
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getLeftMost" class="tsd-anchor"></a>
|
|
1142
1286
|
<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>
|
|
1143
1287
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
1144
|
-
<li class="tsd-signature tsd-anchor-link" id="getLeftMost.getLeftMost-1"><span class="tsd-kind-call-signature">get<wbr/>Left<wbr/>Most</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1288
|
+
<li class="tsd-signature tsd-anchor-link" id="getLeftMost.getLeftMost-1"><span class="tsd-kind-call-signature">get<wbr/>Left<wbr/>Most</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><a href="#getLeftMost.getLeftMost-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1145
1289
|
<li class="tsd-description">
|
|
1146
1290
|
<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
|
|
1147
1291
|
recursion optimization.</p>
|
|
1148
1292
|
</div>
|
|
1149
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1293
|
+
<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>
|
|
1150
1294
|
|
|
1151
1295
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1152
1296
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getLeftMost">getLeftMost</a></p>
|
|
1153
1297
|
<ul>
|
|
1154
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1155
|
-
<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><
|
|
1298
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L698">src/data-structures/binary-tree/binary-tree.ts:698</a></li></ul></aside></li>
|
|
1299
|
+
<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>
|
|
1156
1300
|
<li class="tsd-description">
|
|
1157
1301
|
<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
|
|
1158
1302
|
recursion optimization.</p>
|
|
@@ -1161,17 +1305,17 @@ recursion optimization.</p>
|
|
|
1161
1305
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1162
1306
|
<ul class="tsd-parameter-list">
|
|
1163
1307
|
<li>
|
|
1164
|
-
<h5><span class="tsd-kind-parameter">node</span>: <
|
|
1165
|
-
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is an optional parameter of type <code>
|
|
1308
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1309
|
+
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is an optional parameter of type <code>N | null</code>. It represents the starting node from which to find the leftmost node in a binary tree. If no node is
|
|
1166
1310
|
provided, the function will use the root node of the binary tree.</p>
|
|
1167
1311
|
</div>
|
|
1168
1312
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1169
|
-
<h4 class="tsd-returns-title">Returns <
|
|
1313
|
+
<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>
|
|
1170
1314
|
|
|
1171
1315
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1172
1316
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getLeftMost">getLeftMost</a></p>
|
|
1173
1317
|
<ul>
|
|
1174
|
-
<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/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L700">src/data-structures/binary-tree/binary-tree.ts:700</a></li></ul></aside></li></ul></section>
|
|
1175
1319
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getMinHeight" class="tsd-anchor"></a>
|
|
1176
1320
|
<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>
|
|
1177
1321
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1184,9 +1328,9 @@ approach.</p>
|
|
|
1184
1328
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1185
1329
|
<ul class="tsd-parameter-list">
|
|
1186
1330
|
<li>
|
|
1187
|
-
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">beginRoot</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1331
|
+
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">beginRoot</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1188
1332
|
<div class="tsd-comment tsd-typography"><p>The <code>beginRoot</code> parameter is an optional parameter of type
|
|
1189
|
-
<code>
|
|
1333
|
+
<code>N | null</code>. It represents the starting node from which to calculate the minimum height of the binary
|
|
1190
1334
|
tree. If no value is provided for <code>beginRoot</code>, the function will use the root node of the binary tree.</p>
|
|
1191
1335
|
</div>
|
|
1192
1336
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
@@ -1195,11 +1339,11 @@ tree. If no value is provided for <code>beginRoot</code>, the function will use
|
|
|
1195
1339
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1196
1340
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getMinHeight">getMinHeight</a></p>
|
|
1197
1341
|
<ul>
|
|
1198
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1342
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L560">src/data-structures/binary-tree/binary-tree.ts:560</a></li></ul></aside></li></ul></section>
|
|
1199
1343
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getNodes" class="tsd-anchor"></a>
|
|
1200
1344
|
<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>
|
|
1201
1345
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
1202
|
-
<li class="tsd-signature tsd-anchor-link" id="getNodes.getNodes-1"><span class="tsd-kind-call-signature">get<wbr/>Nodes</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">nodeProperty</span>, <span class="tsd-kind-parameter">propertyName</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">onlyOne</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><
|
|
1346
|
+
<li class="tsd-signature tsd-anchor-link" id="getNodes.getNodes-1"><span class="tsd-kind-call-signature">get<wbr/>Nodes</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">nodeProperty</span>, <span class="tsd-kind-parameter">propertyName</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">onlyOne</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span><a href="#getNodes.getNodes-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1203
1347
|
<li class="tsd-description">
|
|
1204
1348
|
<div class="tsd-comment tsd-typography"><p>The function <code>getNodes</code> returns an array of binary search tree nodes that match a given property value, with the
|
|
1205
1349
|
option to specify the property name and whether to return only one node.</p>
|
|
@@ -1208,9 +1352,9 @@ option to specify the property name and whether to return only one node.</p>
|
|
|
1208
1352
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1209
1353
|
<ul class="tsd-parameter-list">
|
|
1210
1354
|
<li>
|
|
1211
|
-
<h5><span class="tsd-kind-parameter">nodeProperty</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
1355
|
+
<h5><span class="tsd-kind-parameter">nodeProperty</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1212
1356
|
<div class="tsd-comment tsd-typography"><p>The <code>nodeProperty</code> parameter can be either a <code>BinaryTreeNodeId</code> or a
|
|
1213
|
-
generic type <code>
|
|
1357
|
+
generic type <code>N</code>. It represents the property value that you want to search for in the binary search tree.</p>
|
|
1214
1358
|
</div>
|
|
1215
1359
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
1216
1360
|
<li>
|
|
@@ -1227,16 +1371,16 @@ nodeProperty. If set to true, the function will stop traversing the tree and ret
|
|
|
1227
1371
|
to false or not provided, the function will return all nodes that match the given nodeProperty.</p>
|
|
1228
1372
|
</div>
|
|
1229
1373
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1230
|
-
<h4 class="tsd-returns-title">Returns <
|
|
1374
|
+
<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>
|
|
1231
1375
|
|
|
1232
1376
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1233
1377
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getNodes">getNodes</a></p>
|
|
1234
1378
|
<ul>
|
|
1235
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1379
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/bst.ts#L223">src/data-structures/binary-tree/bst.ts:223</a></li></ul></aside></li></ul></section>
|
|
1236
1380
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getPathToRoot" class="tsd-anchor"></a>
|
|
1237
1381
|
<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>
|
|
1238
1382
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
1239
|
-
<li class="tsd-signature tsd-anchor-link" id="getPathToRoot.getPathToRoot-1"><span class="tsd-kind-call-signature">get<wbr/>Path<wbr/>To<wbr/>Root</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><
|
|
1383
|
+
<li class="tsd-signature tsd-anchor-link" id="getPathToRoot.getPathToRoot-1"><span class="tsd-kind-call-signature">get<wbr/>Path<wbr/>To<wbr/>Root</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span><a href="#getPathToRoot.getPathToRoot-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1240
1384
|
<li class="tsd-description">
|
|
1241
1385
|
<div class="tsd-comment tsd-typography"><p>The function getPathToRoot returns an array of BinaryTreeNode objects representing the path from a given node to the
|
|
1242
1386
|
root of a binary tree.</p>
|
|
@@ -1245,21 +1389,21 @@ root of a binary tree.</p>
|
|
|
1245
1389
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1246
1390
|
<ul class="tsd-parameter-list">
|
|
1247
1391
|
<li>
|
|
1248
|
-
<h5><span class="tsd-kind-parameter">node</span>: <
|
|
1392
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1249
1393
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object.</p>
|
|
1250
1394
|
</div>
|
|
1251
1395
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1252
|
-
<h4 class="tsd-returns-title">Returns <
|
|
1396
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>getPathToRoot</code> returns an array of <code>N</code> objects, representing the path from
|
|
1253
1397
|
the given <code>node</code> to the root of the binary tree.</p>
|
|
1254
1398
|
|
|
1255
1399
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1256
1400
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getPathToRoot">getPathToRoot</a></p>
|
|
1257
1401
|
<ul>
|
|
1258
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1402
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L688">src/data-structures/binary-tree/binary-tree.ts:688</a></li></ul></aside></li></ul></section>
|
|
1259
1403
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getPredecessor" class="tsd-anchor"></a>
|
|
1260
1404
|
<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>
|
|
1261
1405
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
1262
|
-
<li class="tsd-signature tsd-anchor-link" id="getPredecessor.getPredecessor-1"><span class="tsd-kind-call-signature">get<wbr/>Predecessor</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><
|
|
1406
|
+
<li class="tsd-signature tsd-anchor-link" id="getPredecessor.getPredecessor-1"><span class="tsd-kind-call-signature">get<wbr/>Predecessor</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><a href="#getPredecessor.getPredecessor-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1263
1407
|
<li class="tsd-description">
|
|
1264
1408
|
<div class="tsd-comment tsd-typography"><p>The function returns the predecessor of a given node in a binary tree.</p>
|
|
1265
1409
|
</div>
|
|
@@ -1267,31 +1411,31 @@ the given <code>node</code> to the root of the binary tree.</p>
|
|
|
1267
1411
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1268
1412
|
<ul class="tsd-parameter-list">
|
|
1269
1413
|
<li>
|
|
1270
|
-
<h5><span class="tsd-kind-parameter">node</span>: <
|
|
1414
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1271
1415
|
<div class="tsd-comment tsd-typography"><p>The parameter <code>node</code> is a BinaryTreeNode object, representing a node in a binary tree.</p>
|
|
1272
1416
|
</div>
|
|
1273
1417
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1274
|
-
<h4 class="tsd-returns-title">Returns <
|
|
1418
|
+
<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>
|
|
1275
1419
|
|
|
1276
1420
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1277
1421
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getPredecessor">getPredecessor</a></p>
|
|
1278
1422
|
<ul>
|
|
1279
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1423
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1218">src/data-structures/binary-tree/binary-tree.ts:1218</a></li></ul></aside></li></ul></section>
|
|
1280
1424
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getRightMost" class="tsd-anchor"></a>
|
|
1281
1425
|
<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>
|
|
1282
1426
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
1283
|
-
<li class="tsd-signature tsd-anchor-link" id="getRightMost.getRightMost-1"><span class="tsd-kind-call-signature">get<wbr/>Right<wbr/>Most</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1427
|
+
<li class="tsd-signature tsd-anchor-link" id="getRightMost.getRightMost-1"><span class="tsd-kind-call-signature">get<wbr/>Right<wbr/>Most</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><a href="#getRightMost.getRightMost-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1284
1428
|
<li class="tsd-description">
|
|
1285
1429
|
<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
|
|
1286
1430
|
tail recursion optimization.</p>
|
|
1287
1431
|
</div>
|
|
1288
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1432
|
+
<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>
|
|
1289
1433
|
|
|
1290
1434
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1291
1435
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getRightMost">getRightMost</a></p>
|
|
1292
1436
|
<ul>
|
|
1293
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1294
|
-
<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><
|
|
1437
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L733">src/data-structures/binary-tree/binary-tree.ts:733</a></li></ul></aside></li>
|
|
1438
|
+
<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>
|
|
1295
1439
|
<li class="tsd-description">
|
|
1296
1440
|
<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
|
|
1297
1441
|
tail recursion optimization.</p>
|
|
@@ -1300,42 +1444,17 @@ tail recursion optimization.</p>
|
|
|
1300
1444
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1301
1445
|
<ul class="tsd-parameter-list">
|
|
1302
1446
|
<li>
|
|
1303
|
-
<h5><span class="tsd-kind-parameter">node</span>: <
|
|
1304
|
-
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is an optional parameter of type <code>
|
|
1447
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1448
|
+
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is an optional parameter of type <code>N | null</code>. It represents the starting node from which to find the rightmost node in a binary tree. If no node is
|
|
1305
1449
|
provided, the function will use the root node of the binary tree.</p>
|
|
1306
1450
|
</div>
|
|
1307
1451
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1308
|
-
<h4 class="tsd-returns-title">Returns <
|
|
1452
|
+
<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>
|
|
1309
1453
|
|
|
1310
1454
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1311
1455
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getRightMost">getRightMost</a></p>
|
|
1312
1456
|
<ul>
|
|
1313
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1314
|
-
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getRoot" class="tsd-anchor"></a>
|
|
1315
|
-
<h3 class="tsd-anchor-link"><span>get<wbr/>Root</span><a href="#getRoot" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1316
|
-
<ul class="tsd-signatures tsd-is-inherited">
|
|
1317
|
-
<li class="tsd-signature tsd-anchor-link" id="getRoot.getRoot-1"><span class="tsd-kind-call-signature">get<wbr/>Root</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">></span><a href="#getRoot.getRoot-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1318
|
-
<li class="tsd-description">
|
|
1319
|
-
<div class="tsd-comment tsd-typography"><p>Starting from TypeScript version 5.0 and onwards, the use of distinct access modifiers for Getters and Setters is not permitted. As an alternative, to ensure compatibility, it is necessary to adopt a Java-style approach for Getters (using the same name as the property) while utilizing separate method names for Setters.</p>
|
|
1320
|
-
</div>
|
|
1321
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">></span></h4><p>The method is returning either a BinaryTreeNode object of type T or null.</p>
|
|
1322
|
-
|
|
1323
|
-
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1324
|
-
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getRoot">getRoot</a></p>
|
|
1325
|
-
<ul>
|
|
1326
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L277">src/data-structures/binary-tree/binary-tree.ts:277</a></li></ul></aside></li></ul></section>
|
|
1327
|
-
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getSize" class="tsd-anchor"></a>
|
|
1328
|
-
<h3 class="tsd-anchor-link"><span>get<wbr/>Size</span><a href="#getSize" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
1329
|
-
<ul class="tsd-signatures tsd-is-inherited">
|
|
1330
|
-
<li class="tsd-signature tsd-anchor-link" id="getSize.getSize-1"><span class="tsd-kind-call-signature">get<wbr/>Size</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#getSize.getSize-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
1331
|
-
<li class="tsd-description">
|
|
1332
|
-
<div class="tsd-comment tsd-typography"><p>Starting from TypeScript version 5.0 and onwards, the use of distinct access modifiers for Getters and Setters is not permitted. As an alternative, to ensure compatibility, it is necessary to adopt a Java-style approach for Setters (using the same name as the property) while utilizing separate method names for Getters.</p>
|
|
1333
|
-
</div>
|
|
1334
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4>
|
|
1335
|
-
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1336
|
-
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getSize">getSize</a></p>
|
|
1337
|
-
<ul>
|
|
1338
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/binary-tree/binary-tree.ts#L284">src/data-structures/binary-tree/binary-tree.ts:284</a></li></ul></aside></li></ul></section>
|
|
1457
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L735">src/data-structures/binary-tree/binary-tree.ts:735</a></li></ul></aside></li></ul></section>
|
|
1339
1458
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getSubTreeSizeAndCount" class="tsd-anchor"></a>
|
|
1340
1459
|
<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>
|
|
1341
1460
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1348,7 +1467,7 @@ traversal.</p>
|
|
|
1348
1467
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1349
1468
|
<ul class="tsd-parameter-list">
|
|
1350
1469
|
<li>
|
|
1351
|
-
<h5><span class="tsd-kind-parameter">subTreeRoot</span>: <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1470
|
+
<h5><span class="tsd-kind-parameter">subTreeRoot</span>: <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1352
1471
|
<div class="tsd-comment tsd-typography"><p>The <code>subTreeRoot</code> parameter is the root node of a binary
|
|
1353
1472
|
tree.</p>
|
|
1354
1473
|
</div>
|
|
@@ -1359,7 +1478,7 @@ represents the size of the subtree, and the second element represents the count
|
|
|
1359
1478
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1360
1479
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getSubTreeSizeAndCount">getSubTreeSizeAndCount</a></p>
|
|
1361
1480
|
<ul>
|
|
1362
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1481
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L812">src/data-structures/binary-tree/binary-tree.ts:812</a></li></ul></aside></li></ul></section>
|
|
1363
1482
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="has" class="tsd-anchor"></a>
|
|
1364
1483
|
<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>
|
|
1365
1484
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1372,9 +1491,9 @@ property.</p>
|
|
|
1372
1491
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1373
1492
|
<ul class="tsd-parameter-list">
|
|
1374
1493
|
<li>
|
|
1375
|
-
<h5><span class="tsd-kind-parameter">nodeProperty</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
1494
|
+
<h5><span class="tsd-kind-parameter">nodeProperty</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1376
1495
|
<div class="tsd-comment tsd-typography"><p>The <code>nodeProperty</code> parameter can be either a <code>BinaryTreeNodeId</code> or a
|
|
1377
|
-
generic type <code>
|
|
1496
|
+
generic type <code>N</code>. It represents the property of a binary tree node that you want to check.</p>
|
|
1378
1497
|
</div>
|
|
1379
1498
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
1380
1499
|
<li>
|
|
@@ -1388,7 +1507,7 @@ specifies the name of the property to check for in the nodes.</p>
|
|
|
1388
1507
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1389
1508
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#has">has</a></p>
|
|
1390
1509
|
<ul>
|
|
1391
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1510
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L663">src/data-structures/binary-tree/binary-tree.ts:663</a></li></ul></aside></li></ul></section>
|
|
1392
1511
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="isAVLBalanced" class="tsd-anchor"></a>
|
|
1393
1512
|
<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>
|
|
1394
1513
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1402,7 +1521,7 @@ is balanced according to the AVL tree property, and <code>false</code> otherwise
|
|
|
1402
1521
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1403
1522
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#isAVLBalanced">isAVLBalanced</a></p>
|
|
1404
1523
|
<ul>
|
|
1405
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1524
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/bst.ts#L443">src/data-structures/binary-tree/bst.ts:443</a></li></ul></aside></li></ul></section>
|
|
1406
1525
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="isBST" class="tsd-anchor"></a>
|
|
1407
1526
|
<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>
|
|
1408
1527
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1414,8 +1533,8 @@ is balanced according to the AVL tree property, and <code>false</code> otherwise
|
|
|
1414
1533
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1415
1534
|
<ul class="tsd-parameter-list">
|
|
1416
1535
|
<li>
|
|
1417
|
-
<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><
|
|
1418
|
-
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is an optional parameter of type <code>
|
|
1536
|
+
<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>
|
|
1537
|
+
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is an optional parameter of type <code>N | null</code>. It represents the root node of the binary search tree (BST) that we want to check for validity. If no node
|
|
1419
1538
|
is provided, the function will default to using the root node of the BST instance that</p>
|
|
1420
1539
|
</div>
|
|
1421
1540
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
@@ -1425,7 +1544,7 @@ tree, and <code>false</code> otherwise.</p>
|
|
|
1425
1544
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1426
1545
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#isBST">isBST</a></p>
|
|
1427
1546
|
<ul>
|
|
1428
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1547
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L775">src/data-structures/binary-tree/binary-tree.ts:775</a></li></ul></aside></li></ul></section>
|
|
1429
1548
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="isBalanced" class="tsd-anchor"></a>
|
|
1430
1549
|
<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>
|
|
1431
1550
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1437,9 +1556,9 @@ tree, and <code>false</code> otherwise.</p>
|
|
|
1437
1556
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1438
1557
|
<ul class="tsd-parameter-list">
|
|
1439
1558
|
<li>
|
|
1440
|
-
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">beginRoot</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1559
|
+
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">beginRoot</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1441
1560
|
<div class="tsd-comment tsd-typography"><p>The <code>beginRoot</code> parameter is the root node of a binary tree. It is
|
|
1442
|
-
of type <code>
|
|
1561
|
+
of type <code>N | null</code>, which means it can either be a <code>BinaryTreeNode</code> object or <code>null</code>.</p>
|
|
1443
1562
|
</div>
|
|
1444
1563
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1445
1564
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>The method is returning a boolean value.</p>
|
|
@@ -1447,7 +1566,7 @@ of type <code>BinaryTreeNode<T> | null</code>, which means it can either b
|
|
|
1447
1566
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1448
1567
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#isBalanced">isBalanced</a></p>
|
|
1449
1568
|
<ul>
|
|
1450
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1569
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L608">src/data-structures/binary-tree/binary-tree.ts:608</a></li></ul></aside></li></ul></section>
|
|
1451
1570
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="isEmpty" class="tsd-anchor"></a>
|
|
1452
1571
|
<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>
|
|
1453
1572
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1460,7 +1579,7 @@ of type <code>BinaryTreeNode<T> | null</code>, which means it can either b
|
|
|
1460
1579
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1461
1580
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#isEmpty">isEmpty</a></p>
|
|
1462
1581
|
<ul>
|
|
1463
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1582
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L284">src/data-structures/binary-tree/binary-tree.ts:284</a></li></ul></aside></li></ul></section>
|
|
1464
1583
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="lastKey" class="tsd-anchor"></a>
|
|
1465
1584
|
<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>
|
|
1466
1585
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1477,7 +1596,7 @@ there are no nodes in</p>
|
|
|
1477
1596
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1478
1597
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#lastKey">lastKey</a></p>
|
|
1479
1598
|
<ul>
|
|
1480
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1599
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/bst.ts#L146">src/data-structures/binary-tree/bst.ts:146</a></li></ul></aside></li></ul></section>
|
|
1481
1600
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="lesserSum" class="tsd-anchor"></a>
|
|
1482
1601
|
<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>
|
|
1483
1602
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1507,7 +1626,7 @@ binary search tree that have a property value lesser than the given <code>id</co
|
|
|
1507
1626
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1508
1627
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#lesserSum">lesserSum</a></p>
|
|
1509
1628
|
<ul>
|
|
1510
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1629
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/bst.ts#L274">src/data-structures/binary-tree/bst.ts:274</a></li></ul></aside></li></ul></section>
|
|
1511
1630
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="levelIterative" class="tsd-anchor"></a>
|
|
1512
1631
|
<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>
|
|
1513
1632
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1520,18 +1639,18 @@ in an array, based on a specified property name.</p>
|
|
|
1520
1639
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1521
1640
|
<ul class="tsd-parameter-list">
|
|
1522
1641
|
<li>
|
|
1523
|
-
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1642
|
+
<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>
|
|
1524
1643
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object representing the starting
|
|
1525
1644
|
node for the level order traversal. It can be null if no specific node is provided, in which case the root node of
|
|
1526
1645
|
the tree is used as the starting node.</p>
|
|
1527
1646
|
</div>
|
|
1528
1647
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1529
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>levelIterative</code> returns an object of type <code>ResultsByProperty<
|
|
1648
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>levelIterative</code> returns an object of type <code>ResultsByProperty<N></code>.</p>
|
|
1530
1649
|
|
|
1531
1650
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1532
1651
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#levelIterative">levelIterative</a></p>
|
|
1533
1652
|
<ul>
|
|
1534
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1653
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1095">src/data-structures/binary-tree/binary-tree.ts:1095</a></li></ul></aside></li>
|
|
1535
1654
|
<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>
|
|
1536
1655
|
<li class="tsd-description">
|
|
1537
1656
|
<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
|
|
@@ -1541,7 +1660,7 @@ in an array, based on a specified property name.</p>
|
|
|
1541
1660
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1542
1661
|
<ul class="tsd-parameter-list">
|
|
1543
1662
|
<li>
|
|
1544
|
-
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1663
|
+
<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>
|
|
1545
1664
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object representing the starting
|
|
1546
1665
|
node for the level order traversal. It can be null if no specific node is provided, in which case the root node of
|
|
1547
1666
|
the tree is used as the starting node.</p>
|
|
@@ -1555,13 +1674,13 @@ will accumulate results based on that property. If no property name is provided,
|
|
|
1555
1674
|
accumulating results</p>
|
|
1556
1675
|
</div>
|
|
1557
1676
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1558
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>levelIterative</code> returns an object of type <code>ResultsByProperty<
|
|
1677
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>levelIterative</code> returns an object of type <code>ResultsByProperty<N></code>.</p>
|
|
1559
1678
|
|
|
1560
1679
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1561
1680
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#levelIterative">levelIterative</a></p>
|
|
1562
1681
|
<ul>
|
|
1563
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1564
|
-
<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">
|
|
1682
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1097">src/data-structures/binary-tree/binary-tree.ts:1097</a></li></ul></aside></li>
|
|
1683
|
+
<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>
|
|
1565
1684
|
<li class="tsd-description">
|
|
1566
1685
|
<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
|
|
1567
1686
|
in an array, based on a specified property name.</p>
|
|
@@ -1570,7 +1689,7 @@ in an array, based on a specified property name.</p>
|
|
|
1570
1689
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1571
1690
|
<ul class="tsd-parameter-list">
|
|
1572
1691
|
<li>
|
|
1573
|
-
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1692
|
+
<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>
|
|
1574
1693
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object representing the starting
|
|
1575
1694
|
node for the level order traversal. It can be null if no specific node is provided, in which case the root node of
|
|
1576
1695
|
the tree is used as the starting node.</p>
|
|
@@ -1584,13 +1703,13 @@ will accumulate results based on that property. If no property name is provided,
|
|
|
1584
1703
|
accumulating results</p>
|
|
1585
1704
|
</div>
|
|
1586
1705
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1587
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">
|
|
1706
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>levelIterative</code> returns an object of type <code>ResultsByProperty<N></code>.</p>
|
|
1588
1707
|
|
|
1589
1708
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1590
1709
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#levelIterative">levelIterative</a></p>
|
|
1591
1710
|
<ul>
|
|
1592
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1593
|
-
<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><
|
|
1711
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1099">src/data-structures/binary-tree/binary-tree.ts:1099</a></li></ul></aside></li>
|
|
1712
|
+
<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>
|
|
1594
1713
|
<li class="tsd-description">
|
|
1595
1714
|
<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
|
|
1596
1715
|
in an array, based on a specified property name.</p>
|
|
@@ -1599,7 +1718,7 @@ in an array, based on a specified property name.</p>
|
|
|
1599
1718
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1600
1719
|
<ul class="tsd-parameter-list">
|
|
1601
1720
|
<li>
|
|
1602
|
-
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1721
|
+
<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>
|
|
1603
1722
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object representing the starting
|
|
1604
1723
|
node for the level order traversal. It can be null if no specific node is provided, in which case the root node of
|
|
1605
1724
|
the tree is used as the starting node.</p>
|
|
@@ -1613,12 +1732,12 @@ will accumulate results based on that property. If no property name is provided,
|
|
|
1613
1732
|
accumulating results</p>
|
|
1614
1733
|
</div>
|
|
1615
1734
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1616
|
-
<h4 class="tsd-returns-title">Returns <
|
|
1735
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>levelIterative</code> returns an object of type <code>ResultsByProperty<N></code>.</p>
|
|
1617
1736
|
|
|
1618
1737
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1619
1738
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#levelIterative">levelIterative</a></p>
|
|
1620
1739
|
<ul>
|
|
1621
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1740
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1101">src/data-structures/binary-tree/binary-tree.ts:1101</a></li></ul></aside></li>
|
|
1622
1741
|
<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>
|
|
1623
1742
|
<li class="tsd-description">
|
|
1624
1743
|
<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
|
|
@@ -1628,7 +1747,7 @@ in an array, based on a specified property name.</p>
|
|
|
1628
1747
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1629
1748
|
<ul class="tsd-parameter-list">
|
|
1630
1749
|
<li>
|
|
1631
|
-
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1750
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1632
1751
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object representing the starting
|
|
1633
1752
|
node for the level order traversal. It can be null if no specific node is provided, in which case the root node of
|
|
1634
1753
|
the tree is used as the starting node.</p>
|
|
@@ -1642,12 +1761,12 @@ will accumulate results based on that property. If no property name is provided,
|
|
|
1642
1761
|
accumulating results</p>
|
|
1643
1762
|
</div>
|
|
1644
1763
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1645
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>levelIterative</code> returns an object of type <code>ResultsByProperty<
|
|
1764
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>levelIterative</code> returns an object of type <code>ResultsByProperty<N></code>.</p>
|
|
1646
1765
|
|
|
1647
1766
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1648
1767
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#levelIterative">levelIterative</a></p>
|
|
1649
1768
|
<ul>
|
|
1650
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1769
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1103">src/data-structures/binary-tree/binary-tree.ts:1103</a></li></ul></aside></li></ul></section>
|
|
1651
1770
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="listLevels" class="tsd-anchor"></a>
|
|
1652
1771
|
<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>
|
|
1653
1772
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1659,17 +1778,17 @@ accumulating results</p>
|
|
|
1659
1778
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1660
1779
|
<ul class="tsd-parameter-list">
|
|
1661
1780
|
<li>
|
|
1662
|
-
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1781
|
+
<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>
|
|
1663
1782
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object or null. It represents the
|
|
1664
1783
|
root node of a binary tree. If it is null, the function will use the root node of the current binary tree instance.</p>
|
|
1665
1784
|
</div>
|
|
1666
1785
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1667
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>listLevels</code> returns a 2D array of <code>ResultByProperty<
|
|
1786
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>listLevels</code> returns a 2D array of <code>ResultByProperty<N></code> objects.</p>
|
|
1668
1787
|
|
|
1669
1788
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1670
1789
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#listLevels">listLevels</a></p>
|
|
1671
1790
|
<ul>
|
|
1672
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1791
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1141">src/data-structures/binary-tree/binary-tree.ts:1141</a></li></ul></aside></li>
|
|
1673
1792
|
<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>
|
|
1674
1793
|
<li class="tsd-description">
|
|
1675
1794
|
<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>
|
|
@@ -1678,7 +1797,7 @@ root node of a binary tree. If it is null, the function will use the root node o
|
|
|
1678
1797
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1679
1798
|
<ul class="tsd-parameter-list">
|
|
1680
1799
|
<li>
|
|
1681
|
-
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1800
|
+
<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>
|
|
1682
1801
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object or null. It represents the
|
|
1683
1802
|
root node of a binary tree. If it is null, the function will use the root node of the current binary tree instance.</p>
|
|
1684
1803
|
</div>
|
|
@@ -1690,13 +1809,13 @@ specifies the property of the <code>BinaryTreeNode</code> object to collect at e
|
|
|
1690
1809
|
values:</p>
|
|
1691
1810
|
</div>
|
|
1692
1811
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1693
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>listLevels</code> returns a 2D array of <code>ResultByProperty<
|
|
1812
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>listLevels</code> returns a 2D array of <code>ResultByProperty<N></code> objects.</p>
|
|
1694
1813
|
|
|
1695
1814
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1696
1815
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#listLevels">listLevels</a></p>
|
|
1697
1816
|
<ul>
|
|
1698
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1699
|
-
<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">
|
|
1817
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1143">src/data-structures/binary-tree/binary-tree.ts:1143</a></li></ul></aside></li>
|
|
1818
|
+
<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>
|
|
1700
1819
|
<li class="tsd-description">
|
|
1701
1820
|
<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>
|
|
1702
1821
|
</div>
|
|
@@ -1704,7 +1823,7 @@ values:</p>
|
|
|
1704
1823
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1705
1824
|
<ul class="tsd-parameter-list">
|
|
1706
1825
|
<li>
|
|
1707
|
-
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1826
|
+
<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>
|
|
1708
1827
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object or null. It represents the
|
|
1709
1828
|
root node of a binary tree. If it is null, the function will use the root node of the current binary tree instance.</p>
|
|
1710
1829
|
</div>
|
|
@@ -1716,13 +1835,13 @@ specifies the property of the <code>BinaryTreeNode</code> object to collect at e
|
|
|
1716
1835
|
values:</p>
|
|
1717
1836
|
</div>
|
|
1718
1837
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1719
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">
|
|
1838
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"val"</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>listLevels</code> returns a 2D array of <code>ResultByProperty<N></code> objects.</p>
|
|
1720
1839
|
|
|
1721
1840
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1722
1841
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#listLevels">listLevels</a></p>
|
|
1723
1842
|
<ul>
|
|
1724
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1725
|
-
<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><
|
|
1843
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1145">src/data-structures/binary-tree/binary-tree.ts:1145</a></li></ul></aside></li>
|
|
1844
|
+
<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>
|
|
1726
1845
|
<li class="tsd-description">
|
|
1727
1846
|
<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>
|
|
1728
1847
|
</div>
|
|
@@ -1730,7 +1849,7 @@ values:</p>
|
|
|
1730
1849
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1731
1850
|
<ul class="tsd-parameter-list">
|
|
1732
1851
|
<li>
|
|
1733
|
-
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1852
|
+
<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>
|
|
1734
1853
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object or null. It represents the
|
|
1735
1854
|
root node of a binary tree. If it is null, the function will use the root node of the current binary tree instance.</p>
|
|
1736
1855
|
</div>
|
|
@@ -1742,12 +1861,12 @@ specifies the property of the <code>BinaryTreeNode</code> object to collect at e
|
|
|
1742
1861
|
values:</p>
|
|
1743
1862
|
</div>
|
|
1744
1863
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1745
|
-
<h4 class="tsd-returns-title">Returns <
|
|
1864
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>listLevels</code> returns a 2D array of <code>ResultByProperty<N></code> objects.</p>
|
|
1746
1865
|
|
|
1747
1866
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1748
1867
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#listLevels">listLevels</a></p>
|
|
1749
1868
|
<ul>
|
|
1750
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1869
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1147">src/data-structures/binary-tree/binary-tree.ts:1147</a></li></ul></aside></li>
|
|
1751
1870
|
<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>
|
|
1752
1871
|
<li class="tsd-description">
|
|
1753
1872
|
<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>
|
|
@@ -1756,7 +1875,7 @@ values:</p>
|
|
|
1756
1875
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1757
1876
|
<ul class="tsd-parameter-list">
|
|
1758
1877
|
<li>
|
|
1759
|
-
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><
|
|
1878
|
+
<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>
|
|
1760
1879
|
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object or null. It represents the
|
|
1761
1880
|
root node of a binary tree. If it is null, the function will use the root node of the current binary tree instance.</p>
|
|
1762
1881
|
</div>
|
|
@@ -1768,12 +1887,12 @@ specifies the property of the <code>BinaryTreeNode</code> object to collect at e
|
|
|
1768
1887
|
values:</p>
|
|
1769
1888
|
</div>
|
|
1770
1889
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1771
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>listLevels</code> returns a 2D array of <code>ResultByProperty<
|
|
1890
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>listLevels</code> returns a 2D array of <code>ResultByProperty<N></code> objects.</p>
|
|
1772
1891
|
|
|
1773
1892
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1774
1893
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#listLevels">listLevels</a></p>
|
|
1775
1894
|
<ul>
|
|
1776
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1895
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1149">src/data-structures/binary-tree/binary-tree.ts:1149</a></li></ul></aside></li></ul></section>
|
|
1777
1896
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="morris" class="tsd-anchor"></a>
|
|
1778
1897
|
<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>
|
|
1779
1898
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1784,12 +1903,12 @@ traversal algorithm and returns the results based on the specified property name
|
|
|
1784
1903
|
The time complexity of Morris traversal is O(n), it's may slower than others
|
|
1785
1904
|
The space complexity Morris traversal is O(1) because no using stack</p>
|
|
1786
1905
|
</div>
|
|
1787
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>morris</code> returns an object of type <code>ResultsByProperty<
|
|
1906
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>morris</code> returns an object of type <code>ResultsByProperty<N></code>.</p>
|
|
1788
1907
|
|
|
1789
1908
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1790
1909
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#morris">morris</a></p>
|
|
1791
1910
|
<ul>
|
|
1792
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1911
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1232">src/data-structures/binary-tree/binary-tree.ts:1232</a></li></ul></aside></li>
|
|
1793
1912
|
<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>
|
|
1794
1913
|
<li class="tsd-description">
|
|
1795
1914
|
<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
|
|
@@ -1813,13 +1932,13 @@ property of the nodes that you want to retrieve in the results. It can be either
|
|
|
1813
1932
|
property. If not provided, it defaults to <code>'id'</code>.</p>
|
|
1814
1933
|
</div>
|
|
1815
1934
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1816
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>morris</code> returns an object of type <code>ResultsByProperty<
|
|
1935
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>morris</code> returns an object of type <code>ResultsByProperty<N></code>.</p>
|
|
1817
1936
|
|
|
1818
1937
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1819
1938
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#morris">morris</a></p>
|
|
1820
1939
|
<ul>
|
|
1821
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1822
|
-
<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">
|
|
1940
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1234">src/data-structures/binary-tree/binary-tree.ts:1234</a></li></ul></aside></li>
|
|
1941
|
+
<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>
|
|
1823
1942
|
<li class="tsd-description">
|
|
1824
1943
|
<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
|
|
1825
1944
|
traversal algorithm and returns the results based on the specified property name.
|
|
@@ -1842,13 +1961,13 @@ property of the nodes that you want to retrieve in the results. It can be either
|
|
|
1842
1961
|
property. If not provided, it defaults to <code>'id'</code>.</p>
|
|
1843
1962
|
</div>
|
|
1844
1963
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1845
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">
|
|
1964
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>morris</code> returns an object of type <code>ResultsByProperty<N></code>.</p>
|
|
1846
1965
|
|
|
1847
1966
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1848
1967
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#morris">morris</a></p>
|
|
1849
1968
|
<ul>
|
|
1850
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1851
|
-
<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><
|
|
1969
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1236">src/data-structures/binary-tree/binary-tree.ts:1236</a></li></ul></aside></li>
|
|
1970
|
+
<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>
|
|
1852
1971
|
<li class="tsd-description">
|
|
1853
1972
|
<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
|
|
1854
1973
|
traversal algorithm and returns the results based on the specified property name.
|
|
@@ -1871,12 +1990,12 @@ property of the nodes that you want to retrieve in the results. It can be either
|
|
|
1871
1990
|
property. If not provided, it defaults to <code>'id'</code>.</p>
|
|
1872
1991
|
</div>
|
|
1873
1992
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1874
|
-
<h4 class="tsd-returns-title">Returns <
|
|
1993
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>morris</code> returns an object of type <code>ResultsByProperty<N></code>.</p>
|
|
1875
1994
|
|
|
1876
1995
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1877
1996
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#morris">morris</a></p>
|
|
1878
1997
|
<ul>
|
|
1879
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
1998
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1238">src/data-structures/binary-tree/binary-tree.ts:1238</a></li></ul></aside></li>
|
|
1880
1999
|
<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>
|
|
1881
2000
|
<li class="tsd-description">
|
|
1882
2001
|
<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
|
|
@@ -1900,16 +2019,16 @@ property of the nodes that you want to retrieve in the results. It can be either
|
|
|
1900
2019
|
property. If not provided, it defaults to <code>'id'</code>.</p>
|
|
1901
2020
|
</div>
|
|
1902
2021
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1903
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>morris</code> returns an object of type <code>ResultsByProperty<
|
|
2022
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>morris</code> returns an object of type <code>ResultsByProperty<N></code>.</p>
|
|
1904
2023
|
|
|
1905
2024
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1906
2025
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#morris">morris</a></p>
|
|
1907
2026
|
<ul>
|
|
1908
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
2027
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1240">src/data-structures/binary-tree/binary-tree.ts:1240</a></li></ul></aside></li></ul></section>
|
|
1909
2028
|
<section class="tsd-panel tsd-member"><a id="remove" class="tsd-anchor"></a>
|
|
1910
2029
|
<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>
|
|
1911
2030
|
<ul class="tsd-signatures">
|
|
1912
|
-
<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">isUpdateAllLeftSum</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../
|
|
2031
|
+
<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">isUpdateAllLeftSum</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../types/AVLTreeDeleted.html" class="tsd-signature-type tsd-kind-type-alias">AVLTreeDeleted</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>
|
|
1913
2032
|
<li class="tsd-description">
|
|
1914
2033
|
<div class="tsd-comment tsd-typography"><p>The function overrides the remove method of the Binary Search Tree class, performs the removal operation, and
|
|
1915
2034
|
then balances the tree if necessary.</p>
|
|
@@ -1930,12 +2049,26 @@ determines whether the left sum of all nodes in the AVL tree should be updated a
|
|
|
1930
2049
|
<code>isUpdateAllLeftSum</code> is set to <code>true</code>, the left sum of all nodes will be recalculated.</p>
|
|
1931
2050
|
</div>
|
|
1932
2051
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
1933
|
-
<h4 class="tsd-returns-title">Returns <a href="../
|
|
2052
|
+
<h4 class="tsd-returns-title">Returns <a href="../types/AVLTreeDeleted.html" class="tsd-signature-type tsd-kind-type-alias">AVLTreeDeleted</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>The method is returning an array of <code>AVLTreeDeleted<N></code> objects.</p>
|
|
1934
2053
|
|
|
1935
2054
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1936
2055
|
<p>Overrides <a href="BST.html">BST</a>.<a href="BST.html#remove">remove</a></p>
|
|
1937
2056
|
<ul>
|
|
1938
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
2057
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/avl-tree.ts#L52">src/data-structures/binary-tree/avl-tree.ts:52</a></li></ul></aside></li></ul></section>
|
|
2058
|
+
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="setVisitedCount" class="tsd-anchor"></a>
|
|
2059
|
+
<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>
|
|
2060
|
+
<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
|
|
2061
|
+
<li class="tsd-signature tsd-anchor-link" id="setVisitedCount.setVisitedCount-1"><span class="tsd-kind-call-signature">set<wbr/>Visited<wbr/>Count</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#setVisitedCount.setVisitedCount-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
2062
|
+
<li class="tsd-description">
|
|
2063
|
+
<div class="tsd-parameters">
|
|
2064
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
2065
|
+
<ul class="tsd-parameter-list">
|
|
2066
|
+
<li>
|
|
2067
|
+
<h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h5></li></ul></div>
|
|
2068
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
2069
|
+
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#setVisitedCount">setVisitedCount</a></p>
|
|
2070
|
+
<ul>
|
|
2071
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L1356">src/data-structures/binary-tree/binary-tree.ts:1356</a></li></ul></aside></li></ul></section>
|
|
1939
2072
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="subTreeAdd" class="tsd-anchor"></a>
|
|
1940
2073
|
<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>
|
|
1941
2074
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1947,7 +2080,7 @@ determines whether the left sum of all nodes in the AVL tree should be updated a
|
|
|
1947
2080
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1948
2081
|
<ul class="tsd-parameter-list">
|
|
1949
2082
|
<li>
|
|
1950
|
-
<h5><span class="tsd-kind-parameter">subTreeRoot</span>: <
|
|
2083
|
+
<h5><span class="tsd-kind-parameter">subTreeRoot</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1951
2084
|
<div class="tsd-comment tsd-typography"><p>The <code>subTreeRoot</code> parameter is the root node of the subtree where the values will be modified.</p>
|
|
1952
2085
|
</div>
|
|
1953
2086
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
@@ -1968,7 +2101,7 @@ specifies the property of the <code>BinaryTreeNode</code> that should be modifie
|
|
|
1968
2101
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1969
2102
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#subTreeAdd">subTreeAdd</a></p>
|
|
1970
2103
|
<ul>
|
|
1971
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
2104
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L909">src/data-structures/binary-tree/binary-tree.ts:909</a></li></ul></aside></li></ul></section>
|
|
1972
2105
|
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="subTreeSum" class="tsd-anchor"></a>
|
|
1973
2106
|
<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>
|
|
1974
2107
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
@@ -1981,7 +2114,7 @@ iteratively.</p>
|
|
|
1981
2114
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
1982
2115
|
<ul class="tsd-parameter-list">
|
|
1983
2116
|
<li>
|
|
1984
|
-
<h5><span class="tsd-kind-parameter">subTreeRoot</span>: <
|
|
2117
|
+
<h5><span class="tsd-kind-parameter">subTreeRoot</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
1985
2118
|
<div class="tsd-comment tsd-typography"><p>The subTreeRoot parameter is the root node of the subtree for which you want to calculate the
|
|
1986
2119
|
sum.</p>
|
|
1987
2120
|
</div>
|
|
@@ -1998,7 +2131,7 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
1998
2131
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
1999
2132
|
<p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#subTreeSum">subTreeSum</a></p>
|
|
2000
2133
|
<ul>
|
|
2001
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
2134
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/binary-tree.ts#L853">src/data-structures/binary-tree/binary-tree.ts:853</a></li></ul></aside></li></ul></section>
|
|
2002
2135
|
<section class="tsd-panel tsd-member"><a id="updateHeight" class="tsd-anchor"></a>
|
|
2003
2136
|
<h3 class="tsd-anchor-link"><span>update<wbr/>Height</span><a href="#updateHeight" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
2004
2137
|
<ul class="tsd-signatures">
|
|
@@ -2010,14 +2143,14 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
2010
2143
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
2011
2144
|
<ul class="tsd-parameter-list">
|
|
2012
2145
|
<li>
|
|
2013
|
-
<h5><span class="tsd-kind-parameter">node</span>: <
|
|
2146
|
+
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
|
|
2014
2147
|
<div class="tsd-comment tsd-typography"><p>The parameter <code>node</code> is an AVLTreeNode object, which represents a node in an AVL tree.</p>
|
|
2015
2148
|
</div>
|
|
2016
2149
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
2017
2150
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
2018
2151
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
2019
2152
|
<ul>
|
|
2020
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
2153
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/60e08d3/src/data-structures/binary-tree/avl-tree.ts#L81">src/data-structures/binary-tree/avl-tree.ts:81</a></li></ul></aside></li></ul></section></section></div>
|
|
2021
2154
|
<div class="col-sidebar">
|
|
2022
2155
|
<div class="page-menu">
|
|
2023
2156
|
<div class="tsd-navigation settings">
|
|
@@ -2039,26 +2172,38 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
2039
2172
|
<ul>
|
|
2040
2173
|
<li><a href="#constructor" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-512"></use></svg><span>constructor</span></a></li>
|
|
2041
2174
|
<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>
|
|
2042
|
-
<li><a href="#
|
|
2043
|
-
<li><a href="#_loopType" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_loop<wbr/>Type</span></a></li>
|
|
2044
|
-
<li><a href="#_root" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_root</span></a></li>
|
|
2045
|
-
<li><a href="#_size" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_size</span></a></li>
|
|
2046
|
-
<li><a href="#_visitedCount" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_visited<wbr/>Count</span></a></li>
|
|
2047
|
-
<li><a href="#_visitedId" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_visited<wbr/>Id</span></a></li>
|
|
2048
|
-
<li><a href="#_visitedLeftSum" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_visited<wbr/>Left<wbr/>Sum</span></a></li>
|
|
2049
|
-
<li><a href="#_visitedNode" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_visited<wbr/>Node</span></a></li>
|
|
2050
|
-
<li><a href="#_visitedVal" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_visited<wbr/>Val</span></a></li>
|
|
2175
|
+
<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>
|
|
2051
2176
|
<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>
|
|
2177
|
+
<li><a href="#isDuplicatedVal" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>is<wbr/>Duplicated<wbr/>Val</span></a></li>
|
|
2178
|
+
<li><a href="#loopType" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>loop<wbr/>Type</span></a></li>
|
|
2179
|
+
<li><a href="#maxId" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>max<wbr/>Id</span></a></li>
|
|
2052
2180
|
<li><a href="#root" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>root</span></a></li>
|
|
2053
2181
|
<li><a href="#size" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>size</span></a></li>
|
|
2182
|
+
<li><a href="#visitedCount" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>visited<wbr/>Count</span></a></li>
|
|
2183
|
+
<li><a href="#visitedId" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>visited<wbr/>Id</span></a></li>
|
|
2184
|
+
<li><a href="#visitedLeftSum" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>visited<wbr/>Left<wbr/>Sum</span></a></li>
|
|
2185
|
+
<li><a href="#visitedNode" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>visited<wbr/>Node</span></a></li>
|
|
2186
|
+
<li><a href="#visitedVal" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>visited<wbr/>Val</span></a></li>
|
|
2054
2187
|
<li><a href="#BFS" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>BFS</span></a></li>
|
|
2055
2188
|
<li><a href="#DFS" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>DFS</span></a></li>
|
|
2056
2189
|
<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>
|
|
2057
2190
|
<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>
|
|
2058
2191
|
<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>
|
|
2192
|
+
<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>
|
|
2059
2193
|
<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>
|
|
2060
2194
|
<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>
|
|
2061
2195
|
<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>
|
|
2196
|
+
<li><a href="#_setAutoIncrementId" 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/>Auto<wbr/>Increment<wbr/>Id</span></a></li>
|
|
2197
|
+
<li><a href="#_setCount" 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/>Count</span></a></li>
|
|
2198
|
+
<li><a href="#_setIsDuplicatedVal" 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/>Is<wbr/>Duplicated<wbr/>Val</span></a></li>
|
|
2199
|
+
<li><a href="#_setLoopType" 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/>Loop<wbr/>Type</span></a></li>
|
|
2200
|
+
<li><a href="#_setMaxId" 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/>Max<wbr/>Id</span></a></li>
|
|
2201
|
+
<li><a href="#_setRoot" 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/>Root</span></a></li>
|
|
2202
|
+
<li><a href="#_setSize" 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/>Size</span></a></li>
|
|
2203
|
+
<li><a href="#_setVisitedId" 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/>Id</span></a></li>
|
|
2204
|
+
<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>
|
|
2205
|
+
<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>
|
|
2206
|
+
<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>
|
|
2062
2207
|
<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>
|
|
2063
2208
|
<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>
|
|
2064
2209
|
<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>
|
|
@@ -2071,10 +2216,8 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
2071
2216
|
<li><a href="#balanceRL" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>balanceRL</span></a></li>
|
|
2072
2217
|
<li><a href="#balanceRR" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>balanceRR</span></a></li>
|
|
2073
2218
|
<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>
|
|
2074
|
-
<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>
|
|
2075
2219
|
<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>
|
|
2076
2220
|
<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>
|
|
2077
|
-
<li><a href="#getCount" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Count</span></a></li>
|
|
2078
2221
|
<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>
|
|
2079
2222
|
<li><a href="#getHeight" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Height</span></a></li>
|
|
2080
2223
|
<li><a href="#getLeftMost" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Left<wbr/>Most</span></a></li>
|
|
@@ -2083,8 +2226,6 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
2083
2226
|
<li><a href="#getPathToRoot" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Path<wbr/>To<wbr/>Root</span></a></li>
|
|
2084
2227
|
<li><a href="#getPredecessor" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Predecessor</span></a></li>
|
|
2085
2228
|
<li><a href="#getRightMost" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Right<wbr/>Most</span></a></li>
|
|
2086
|
-
<li><a href="#getRoot" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Root</span></a></li>
|
|
2087
|
-
<li><a href="#getSize" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Size</span></a></li>
|
|
2088
2229
|
<li><a href="#getSubTreeSizeAndCount" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Sub<wbr/>Tree<wbr/>Size<wbr/>And<wbr/>Count</span></a></li>
|
|
2089
2230
|
<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>
|
|
2090
2231
|
<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>
|
|
@@ -2097,6 +2238,7 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
2097
2238
|
<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>
|
|
2098
2239
|
<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>
|
|
2099
2240
|
<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>
|
|
2241
|
+
<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>
|
|
2100
2242
|
<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>
|
|
2101
2243
|
<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>
|
|
2102
2244
|
<li><a href="#updateHeight" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>update<wbr/>Height</span></a></li></ul></div></details></div>
|
|
@@ -2106,6 +2248,7 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
2106
2248
|
<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>
|
|
2107
2249
|
<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>
|
|
2108
2250
|
<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>
|
|
2251
|
+
<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>
|
|
2109
2252
|
<li><a href="AVLTree.html" class="current"><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>
|
|
2110
2253
|
<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>
|
|
2111
2254
|
<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>
|
|
@@ -2128,6 +2271,7 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
2128
2271
|
<li><a href="DirectedVertex.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Directed<wbr/>Vertex</span></a></li>
|
|
2129
2272
|
<li><a href="DoublyLinkedList.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Doubly<wbr/>Linked<wbr/>List</span></a></li>
|
|
2130
2273
|
<li><a href="DoublyLinkedListNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Doubly<wbr/>Linked<wbr/>List<wbr/>Node</span></a></li>
|
|
2274
|
+
<li><a href="HashTable.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Hash<wbr/>Table</span></a></li>
|
|
2131
2275
|
<li><a href="Heap.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Heap</span></a></li>
|
|
2132
2276
|
<li><a href="HeapItem.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Heap<wbr/>Item</span></a></li>
|
|
2133
2277
|
<li><a href="Matrix2D.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Matrix2D</span></a></li>
|
|
@@ -2138,9 +2282,9 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
2138
2282
|
<li><a href="MinPriorityQueue.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Min<wbr/>Priority<wbr/>Queue</span></a></li>
|
|
2139
2283
|
<li><a href="Navigator.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Navigator</span></a></li>
|
|
2140
2284
|
<li><a href="ObjectDeque.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Object<wbr/>Deque</span></a></li>
|
|
2285
|
+
<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>
|
|
2141
2286
|
<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>
|
|
2142
2287
|
<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>
|
|
2143
|
-
<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>
|
|
2144
2288
|
<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>
|
|
2145
2289
|
<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>
|
|
2146
2290
|
<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>
|
|
@@ -2148,8 +2292,10 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
2148
2292
|
<li><a href="SkipLinkedList.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Skip<wbr/>Linked<wbr/>List</span></a></li>
|
|
2149
2293
|
<li><a href="SplayTree.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Splay<wbr/>Tree</span></a></li>
|
|
2150
2294
|
<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>
|
|
2295
|
+
<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>
|
|
2151
2296
|
<li><a href="TreeMultiSet.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Tree<wbr/>Multi<wbr/>Set</span></a></li>
|
|
2152
2297
|
<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>
|
|
2298
|
+
<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>
|
|
2153
2299
|
<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>
|
|
2154
2300
|
<li><a href="TrieNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Trie<wbr/>Node</span></a></li>
|
|
2155
2301
|
<li><a href="TwoThreeTree.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Two<wbr/>Three<wbr/>Tree</span></a></li>
|
|
@@ -2157,13 +2303,13 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
2157
2303
|
<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>
|
|
2158
2304
|
<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>
|
|
2159
2305
|
<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>
|
|
2160
|
-
<li><a href="../interfaces/
|
|
2161
|
-
<li><a href="../interfaces/
|
|
2306
|
+
<li><a href="../interfaces/IBinaryTree.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-256"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.51 16V15.016H11.298V8.224H9.51V7.24H14.19V8.224H12.402V15.016H14.19V16H9.51Z" fill="var(--color-text)"></path></g></svg><span>IBinary<wbr/>Tree</span></a></li>
|
|
2307
|
+
<li><a href="../interfaces/IBinaryTreeNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>IBinary<wbr/>Tree<wbr/>Node</span></a></li>
|
|
2162
2308
|
<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>
|
|
2163
2309
|
<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>
|
|
2164
|
-
<li><a href="../interfaces/
|
|
2165
|
-
<li><a href="../
|
|
2166
|
-
<li><a href="../types/BSTComparator.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><
|
|
2310
|
+
<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>
|
|
2311
|
+
<li><a href="../types/AVLTreeDeleted.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-4194304"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)"></path></g></svg><span>AVLTree<wbr/>Deleted</span></a></li>
|
|
2312
|
+
<li><a href="../types/BSTComparator.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>BSTComparator</span></a></li>
|
|
2167
2313
|
<li><a href="../types/BSTDeletedResult.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>BSTDeleted<wbr/>Result</span></a></li>
|
|
2168
2314
|
<li><a href="../types/BinaryTreeDeleted.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Binary<wbr/>Tree<wbr/>Deleted</span></a></li>
|
|
2169
2315
|
<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>
|
|
@@ -2171,20 +2317,21 @@ provided, it defaults to <code>'val'</code>.</p>
|
|
|
2171
2317
|
<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>
|
|
2172
2318
|
<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>
|
|
2173
2319
|
<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>
|
|
2174
|
-
<li><a href="../types/
|
|
2320
|
+
<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>
|
|
2321
|
+
<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>
|
|
2322
|
+
<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>
|
|
2175
2323
|
<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>
|
|
2176
2324
|
<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>
|
|
2177
2325
|
<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>
|
|
2326
|
+
<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>
|
|
2327
|
+
<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>
|
|
2328
|
+
<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>
|
|
2329
|
+
<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>
|
|
2178
2330
|
<li><a href="../types/ResultByProperty.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Result<wbr/>By<wbr/>Property</span></a></li>
|
|
2179
2331
|
<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>
|
|
2180
2332
|
<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>
|
|
2181
|
-
<li><a href="../types/SpecifyOptional.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Specify<wbr/>Optional</span></a></li>
|
|
2182
|
-
<li><a href="../types/Thunk.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Thunk</span></a></li>
|
|
2183
|
-
<li><a href="../types/ToThunkFn.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>To<wbr/>Thunk<wbr/>Fn</span></a></li>
|
|
2184
2333
|
<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>
|
|
2185
2334
|
<li><a href="../types/TreeMultiSetDeletedResult.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Tree<wbr/>Multi<wbr/>Set<wbr/>Deleted<wbr/>Result</span></a></li>
|
|
2186
|
-
<li><a href="../types/TrlAsyncFn.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Trl<wbr/>Async<wbr/>Fn</span></a></li>
|
|
2187
|
-
<li><a href="../types/TrlFn.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Trl<wbr/>Fn</span></a></li>
|
|
2188
2335
|
<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>
|
|
2189
2336
|
<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>
|
|
2190
2337
|
<div class="tsd-generator">
|