data-structure-typed 1.18.6 → 1.18.8
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 +154 -366
- package/dist/data-structures/binary-tree/abstract-binary-tree.d.ts +72 -51
- package/dist/data-structures/binary-tree/abstract-binary-tree.js +226 -158
- package/dist/data-structures/binary-tree/avl-tree.d.ts +7 -6
- package/dist/data-structures/binary-tree/avl-tree.js +5 -3
- package/dist/data-structures/binary-tree/binary-tree.d.ts +16 -6
- package/dist/data-structures/binary-tree/binary-tree.js +16 -7
- package/dist/data-structures/binary-tree/bst.d.ts +37 -28
- package/dist/data-structures/binary-tree/bst.js +44 -76
- package/dist/data-structures/binary-tree/rb-tree.d.ts +30 -1
- package/dist/data-structures/binary-tree/rb-tree.js +27 -14
- package/dist/data-structures/binary-tree/tree-multiset.d.ts +18 -7
- package/dist/data-structures/binary-tree/tree-multiset.js +20 -15
- package/dist/data-structures/graph/abstract-graph.d.ts +28 -27
- package/dist/data-structures/graph/abstract-graph.js +58 -36
- package/dist/data-structures/graph/directed-graph.d.ts +27 -24
- package/dist/data-structures/graph/directed-graph.js +65 -60
- package/dist/data-structures/graph/undirected-graph.d.ts +12 -18
- package/dist/data-structures/graph/undirected-graph.js +52 -65
- package/dist/data-structures/interfaces/abstract-binary-tree.d.ts +100 -0
- package/dist/data-structures/interfaces/abstract-binary-tree.js +2 -0
- package/dist/data-structures/interfaces/abstract-graph.d.ts +3 -8
- package/dist/data-structures/interfaces/avl-tree.d.ts +16 -1
- package/dist/data-structures/interfaces/binary-tree.d.ts +4 -24
- package/dist/data-structures/interfaces/bst.d.ts +18 -1
- package/dist/data-structures/interfaces/directed-graph.d.ts +4 -1
- package/dist/data-structures/interfaces/index.d.ts +1 -1
- package/dist/data-structures/interfaces/index.js +1 -1
- package/dist/data-structures/interfaces/rb-tree.d.ts +9 -0
- package/dist/data-structures/interfaces/rb-tree.js +2 -0
- package/dist/data-structures/interfaces/tree-multiset.d.ts +7 -1
- package/dist/data-structures/interfaces/undirected-graph.d.ts +4 -1
- package/dist/data-structures/tree/tree.d.ts +1 -4
- package/dist/data-structures/tree/tree.js +1 -12
- package/dist/data-structures/types/abstract-binary-tree.d.ts +11 -7
- package/dist/data-structures/types/abstract-binary-tree.js +9 -5
- package/dist/data-structures/types/avl-tree.d.ts +1 -1
- package/dist/data-structures/types/binary-tree.d.ts +1 -1
- package/dist/data-structures/types/bst.d.ts +1 -1
- package/dist/data-structures/types/bst.js +1 -1
- package/dist/data-structures/types/directed-graph.js +1 -1
- package/dist/data-structures/types/helpers.d.ts +1 -8
- package/dist/data-structures/types/rb-tree.d.ts +2 -0
- package/dist/data-structures/types/rb-tree.js +1 -1
- package/dist/data-structures/types/tree-multiset.d.ts +4 -4
- package/dist/utils/types/utils.d.ts +18 -0
- package/dist/utils/utils.d.ts +6 -1
- package/dist/utils/utils.js +83 -1
- package/package.json +2 -2
- 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 +0 -3
- package/backup/recursive-type/src/data-structures/binary-tree/avl-tree.ts +0 -288
- package/backup/recursive-type/src/data-structures/binary-tree/b-tree.ts +0 -3
- package/backup/recursive-type/src/data-structures/binary-tree/binary-indexed-tree.ts +0 -78
- package/backup/recursive-type/src/data-structures/binary-tree/binary-tree.ts +0 -1502
- package/backup/recursive-type/src/data-structures/binary-tree/bst.ts +0 -503
- 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 +0 -11
- package/backup/recursive-type/src/data-structures/binary-tree/rb-tree.ts +0 -110
- package/backup/recursive-type/src/data-structures/binary-tree/segment-tree.ts +0 -243
- package/backup/recursive-type/src/data-structures/binary-tree/splay-tree.ts +0 -3
- package/backup/recursive-type/src/data-structures/binary-tree/tree-multiset.ts +0 -55
- package/backup/recursive-type/src/data-structures/binary-tree/two-three-tree.ts +0 -3
- package/backup/recursive-type/src/data-structures/diagrams/README.md +0 -5
- package/backup/recursive-type/src/data-structures/graph/abstract-graph.ts +0 -985
- 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 +0 -478
- package/backup/recursive-type/src/data-structures/graph/index.ts +0 -3
- package/backup/recursive-type/src/data-structures/graph/undirected-graph.ts +0 -293
- package/backup/recursive-type/src/data-structures/hash/coordinate-map.ts +0 -67
- package/backup/recursive-type/src/data-structures/hash/coordinate-set.ts +0 -56
- package/backup/recursive-type/src/data-structures/hash/hash-table.ts +0 -3
- package/backup/recursive-type/src/data-structures/hash/index.ts +0 -6
- package/backup/recursive-type/src/data-structures/hash/pair.ts +0 -3
- package/backup/recursive-type/src/data-structures/hash/tree-map.ts +0 -3
- package/backup/recursive-type/src/data-structures/hash/tree-set.ts +0 -3
- package/backup/recursive-type/src/data-structures/heap/heap.ts +0 -176
- package/backup/recursive-type/src/data-structures/heap/index.ts +0 -3
- package/backup/recursive-type/src/data-structures/heap/max-heap.ts +0 -31
- package/backup/recursive-type/src/data-structures/heap/min-heap.ts +0 -34
- package/backup/recursive-type/src/data-structures/index.ts +0 -15
- package/backup/recursive-type/src/data-structures/interfaces/abstract-graph.ts +0 -42
- package/backup/recursive-type/src/data-structures/interfaces/avl-tree.ts +0 -1
- package/backup/recursive-type/src/data-structures/interfaces/binary-tree.ts +0 -56
- package/backup/recursive-type/src/data-structures/interfaces/bst.ts +0 -1
- package/backup/recursive-type/src/data-structures/interfaces/directed-graph.ts +0 -15
- package/backup/recursive-type/src/data-structures/interfaces/doubly-linked-list.ts +0 -1
- package/backup/recursive-type/src/data-structures/interfaces/heap.ts +0 -1
- package/backup/recursive-type/src/data-structures/interfaces/index.ts +0 -13
- package/backup/recursive-type/src/data-structures/interfaces/navigator.ts +0 -1
- package/backup/recursive-type/src/data-structures/interfaces/priority-queue.ts +0 -1
- package/backup/recursive-type/src/data-structures/interfaces/segment-tree.ts +0 -1
- package/backup/recursive-type/src/data-structures/interfaces/singly-linked-list.ts +0 -1
- package/backup/recursive-type/src/data-structures/interfaces/tree-multiset.ts +0 -1
- package/backup/recursive-type/src/data-structures/interfaces/undirected-graph.ts +0 -3
- package/backup/recursive-type/src/data-structures/linked-list/doubly-linked-list.ts +0 -573
- package/backup/recursive-type/src/data-structures/linked-list/index.ts +0 -3
- package/backup/recursive-type/src/data-structures/linked-list/singly-linked-list.ts +0 -490
- package/backup/recursive-type/src/data-structures/linked-list/skip-linked-list.ts +0 -3
- package/backup/recursive-type/src/data-structures/matrix/index.ts +0 -4
- package/backup/recursive-type/src/data-structures/matrix/matrix.ts +0 -27
- package/backup/recursive-type/src/data-structures/matrix/matrix2d.ts +0 -208
- package/backup/recursive-type/src/data-structures/matrix/navigator.ts +0 -122
- package/backup/recursive-type/src/data-structures/matrix/vector2d.ts +0 -316
- package/backup/recursive-type/src/data-structures/priority-queue/index.ts +0 -3
- package/backup/recursive-type/src/data-structures/priority-queue/max-priority-queue.ts +0 -49
- package/backup/recursive-type/src/data-structures/priority-queue/min-priority-queue.ts +0 -50
- package/backup/recursive-type/src/data-structures/priority-queue/priority-queue.ts +0 -354
- package/backup/recursive-type/src/data-structures/queue/deque.ts +0 -251
- package/backup/recursive-type/src/data-structures/queue/index.ts +0 -2
- package/backup/recursive-type/src/data-structures/queue/queue.ts +0 -120
- package/backup/recursive-type/src/data-structures/stack/index.ts +0 -1
- package/backup/recursive-type/src/data-structures/stack/stack.ts +0 -98
- package/backup/recursive-type/src/data-structures/tree/index.ts +0 -1
- package/backup/recursive-type/src/data-structures/tree/tree.ts +0 -80
- package/backup/recursive-type/src/data-structures/trie/index.ts +0 -1
- package/backup/recursive-type/src/data-structures/trie/trie.ts +0 -227
- package/backup/recursive-type/src/data-structures/types/abstract-graph.ts +0 -5
- package/backup/recursive-type/src/data-structures/types/avl-tree.ts +0 -8
- package/backup/recursive-type/src/data-structures/types/binary-tree.ts +0 -10
- package/backup/recursive-type/src/data-structures/types/bst.ts +0 -6
- package/backup/recursive-type/src/data-structures/types/directed-graph.ts +0 -8
- package/backup/recursive-type/src/data-structures/types/doubly-linked-list.ts +0 -1
- package/backup/recursive-type/src/data-structures/types/heap.ts +0 -5
- package/backup/recursive-type/src/data-structures/types/index.ts +0 -12
- package/backup/recursive-type/src/data-structures/types/navigator.ts +0 -13
- package/backup/recursive-type/src/data-structures/types/priority-queue.ts +0 -9
- package/backup/recursive-type/src/data-structures/types/segment-tree.ts +0 -1
- package/backup/recursive-type/src/data-structures/types/singly-linked-list.ts +0 -1
- package/backup/recursive-type/src/data-structures/types/tree-multiset.ts +0 -1
- package/backup/recursive-type/src/index.ts +0 -1
- package/backup/recursive-type/src/utils/index.ts +0 -2
- package/backup/recursive-type/src/utils/types/index.ts +0 -1
- package/backup/recursive-type/src/utils/types/utils.ts +0 -6
- package/backup/recursive-type/src/utils/utils.ts +0 -78
- package/docs/.nojekyll +0 -1
- package/docs/assets/highlight.css +0 -92
- package/docs/assets/main.js +0 -58
- package/docs/assets/search.js +0 -1
- package/docs/assets/style.css +0 -1367
- package/docs/classes/AVLTree.html +0 -2339
- package/docs/classes/AVLTreeNode.html +0 -450
- package/docs/classes/AaTree.html +0 -166
- package/docs/classes/AbstractBinaryTree.html +0 -2023
- package/docs/classes/AbstractBinaryTreeNode.html +0 -491
- package/docs/classes/AbstractEdge.html +0 -289
- package/docs/classes/AbstractGraph.html +0 -1046
- package/docs/classes/AbstractVertex.html +0 -252
- package/docs/classes/ArrayDeque.html +0 -433
- package/docs/classes/BST.html +0 -2196
- package/docs/classes/BSTNode.html +0 -453
- package/docs/classes/BTree.html +0 -166
- package/docs/classes/BinaryIndexedTree.html +0 -335
- package/docs/classes/BinaryTree.html +0 -2037
- package/docs/classes/BinaryTreeNode.html +0 -452
- package/docs/classes/Character.html +0 -214
- package/docs/classes/CoordinateMap.html +0 -477
- package/docs/classes/CoordinateSet.html +0 -438
- package/docs/classes/Deque.html +0 -969
- package/docs/classes/DirectedEdge.html +0 -360
- package/docs/classes/DirectedGraph.html +0 -1408
- package/docs/classes/DirectedVertex.html +0 -248
- package/docs/classes/DoublyLinkedList.html +0 -962
- package/docs/classes/DoublyLinkedListNode.html +0 -291
- package/docs/classes/HashTable.html +0 -166
- package/docs/classes/Heap.html +0 -417
- package/docs/classes/HeapItem.html +0 -249
- package/docs/classes/Matrix2D.html +0 -496
- package/docs/classes/MatrixNTI2D.html +0 -234
- package/docs/classes/MaxHeap.html +0 -430
- package/docs/classes/MaxPriorityQueue.html +0 -830
- package/docs/classes/MinHeap.html +0 -431
- package/docs/classes/MinPriorityQueue.html +0 -832
- package/docs/classes/Navigator.html +0 -307
- package/docs/classes/ObjectDeque.html +0 -449
- package/docs/classes/Pair.html +0 -166
- package/docs/classes/PriorityQueue.html +0 -754
- package/docs/classes/Queue.html +0 -386
- package/docs/classes/SegmentTree.html +0 -428
- package/docs/classes/SegmentTreeNode.html +0 -351
- package/docs/classes/SinglyLinkedList.html +0 -782
- package/docs/classes/SinglyLinkedListNode.html +0 -264
- package/docs/classes/SkipLinkedList.html +0 -166
- package/docs/classes/SplayTree.html +0 -166
- package/docs/classes/Stack.html +0 -362
- package/docs/classes/TreeMap.html +0 -166
- package/docs/classes/TreeMultiSet.html +0 -2196
- package/docs/classes/TreeMultiSetNode.html +0 -450
- package/docs/classes/TreeNode.html +0 -337
- package/docs/classes/TreeSet.html +0 -166
- package/docs/classes/Trie.html +0 -366
- package/docs/classes/TrieNode.html +0 -274
- package/docs/classes/TwoThreeTree.html +0 -166
- package/docs/classes/UndirectedEdge.html +0 -331
- package/docs/classes/UndirectedGraph.html +0 -1196
- package/docs/classes/UndirectedVertex.html +0 -248
- package/docs/classes/Vector2D.html +0 -799
- package/docs/enums/CP.html +0 -175
- package/docs/enums/FamilyPosition.html +0 -175
- package/docs/enums/LoopType.html +0 -176
- package/docs/enums/RBColor.html +0 -168
- package/docs/enums/TopologicalProperty.html +0 -175
- package/docs/index.html +0 -639
- package/docs/interfaces/IBinaryTree.html +0 -189
- package/docs/interfaces/IBinaryTreeNode.html +0 -396
- package/docs/interfaces/IDirectedGraph.html +0 -259
- package/docs/interfaces/IGraph.html +0 -471
- package/docs/interfaces/IUNDirectedGraph.html +0 -151
- package/docs/modules.html +0 -250
- package/docs/types/AVLTreeOptions.html +0 -144
- package/docs/types/AbstractBinaryTreeOptions.html +0 -150
- package/docs/types/AbstractRecursiveBinaryTreeNode.html +0 -146
- package/docs/types/AbstractResultByProperty.html +0 -146
- package/docs/types/AbstractResultsByProperty.html +0 -146
- package/docs/types/BSTComparator.html +0 -156
- package/docs/types/BSTOptions.html +0 -146
- package/docs/types/BinaryTreeDeletedResult.html +0 -153
- package/docs/types/BinaryTreeNodeId.html +0 -141
- package/docs/types/BinaryTreeNodePropertyName.html +0 -141
- package/docs/types/BinaryTreeOptions.html +0 -144
- package/docs/types/DFSOrderPattern.html +0 -141
- package/docs/types/DijkstraResult.html +0 -161
- package/docs/types/Direction.html +0 -141
- package/docs/types/EdgeId.html +0 -141
- package/docs/types/HeapOptions.html +0 -162
- package/docs/types/IdObject.html +0 -151
- package/docs/types/KeyValObject.html +0 -146
- package/docs/types/NavigatorParams.html +0 -175
- package/docs/types/NodeOrPropertyName.html +0 -141
- package/docs/types/PriorityQueueComparator.html +0 -161
- package/docs/types/PriorityQueueDFSOrderPattern.html +0 -141
- package/docs/types/PriorityQueueOptions.html +0 -155
- package/docs/types/RBTreeOptions.html +0 -144
- package/docs/types/RecursiveAVLTreeNode.html +0 -146
- package/docs/types/RecursiveBSTNode.html +0 -146
- package/docs/types/RecursiveBinaryTreeNode.html +0 -146
- package/docs/types/RecursiveTreeMultiSetNode.html +0 -146
- package/docs/types/SegmentTreeNodeVal.html +0 -141
- package/docs/types/TopologicalStatus.html +0 -141
- package/docs/types/TreeMultiSetOptions.html +0 -146
- package/docs/types/Turning.html +0 -141
- package/docs/types/VertexId.html +0 -141
- package/notes/bst.test.ts +0 -181
- package/notes/note.md +0 -34
package/README.md
CHANGED
|
@@ -204,22 +204,6 @@ wide range of data structures
|
|
|
204
204
|
DFS, DFSIterative, BFS, morris, Bellman-Ford Algorithm, Dijkstra's Algorithm, Floyd-Warshall Algorithm, Tarjan's Algorithm
|
|
205
205
|
|
|
206
206
|
# How
|
|
207
|
-
|
|
208
|
-
[API Docs](https://data-structure-typed-docs.vercel.app)
|
|
209
|
-
|
|
210
|
-
[Live Examples](https://data-structure-typed-examples.vercel.app)
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-

|
|
214
|
-
|
|
215
|
-

|
|
216
|
-
|
|
217
|
-

|
|
218
|
-
|
|
219
|
-

|
|
220
|
-
|
|
221
|
-
<a href="https://data-structure-typed-examples.vercel.app" target="_blank">Live Examples</a>
|
|
222
|
-
|
|
223
207
|
## install
|
|
224
208
|
|
|
225
209
|
### yarn
|
|
@@ -236,366 +220,159 @@ npm install data-structure-typed
|
|
|
236
220
|
|
|
237
221
|
### Binary Search Tree (BST) snippet
|
|
238
222
|
|
|
223
|
+
#### TS
|
|
239
224
|
```typescript
|
|
240
225
|
import {BST, BSTNode} from 'data-structure-typed';
|
|
241
226
|
|
|
242
|
-
const
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
const
|
|
253
|
-
|
|
254
|
-
expect(node6 && tree.getDepth(node6)).toBe(3);
|
|
255
|
-
|
|
256
|
-
const nodeId10 = tree.get(10, 'id');
|
|
257
|
-
expect(nodeId10?.id).toBe(10);
|
|
258
|
-
|
|
259
|
-
const nodeVal9 = tree.get(9, 'val');
|
|
260
|
-
expect(nodeVal9?.id).toBe(9);
|
|
261
|
-
|
|
262
|
-
const nodesByCount1 = tree.getNodes(1, 'count');
|
|
263
|
-
expect(nodesByCount1.length).toBe(16);
|
|
264
|
-
|
|
265
|
-
const leftMost = tree.getLeftMost();
|
|
227
|
+
const bst = new BST();
|
|
228
|
+
bst.add(11);
|
|
229
|
+
bst.add(3);
|
|
230
|
+
bst.addMany([15, 1, 8, 13, 16, 2, 6, 9, 12, 14, 4, 7, 10, 5]);
|
|
231
|
+
bst.size === 16; // true
|
|
232
|
+
bst.has(6); // true
|
|
233
|
+
const node6 = bst.get(6);
|
|
234
|
+
bst.getHeight(6) === 2; // true
|
|
235
|
+
bst.getHeight() === 5; // true
|
|
236
|
+
bst.getDepth(6) === 3; // true
|
|
237
|
+
const leftMost = bst.getLeftMost();
|
|
238
|
+
leftMost?.id === 1; // true
|
|
266
239
|
expect(leftMost?.id).toBe(1);
|
|
240
|
+
bst.remove(6);
|
|
241
|
+
bst.get(6); // null
|
|
242
|
+
bst.isAVLBalanced(); // true or false
|
|
243
|
+
const bfsIDs = bst.BFS();
|
|
244
|
+
bfsIDs[0] === 11; // true
|
|
245
|
+
expect(bfsIDs[0]).toBe(11);
|
|
246
|
+
|
|
247
|
+
const objBST = new BST<BSTNode<{ id: number, keyA: number }>>();
|
|
248
|
+
objBST.add(11, {id: 11, keyA: 11});
|
|
249
|
+
objBST.add(3, {id: 3, keyA: 3});
|
|
250
|
+
|
|
251
|
+
objBST.addMany([{id: 15, keyA: 15}, {id: 1, keyA: 1}, {id: 8, keyA: 8},
|
|
252
|
+
{id: 13, keyA: 13}, {id: 16, keyA: 16}, {id: 2, keyA: 2},
|
|
253
|
+
{id: 6, keyA: 6}, {id: 9, keyA: 9}, {id: 12, keyA: 12},
|
|
254
|
+
{id: 14, keyA: 14}, {id: 4, keyA: 4}, {id: 7, keyA: 7},
|
|
255
|
+
{id: 10, keyA: 10}, {id: 5, keyA: 5}]);
|
|
256
|
+
|
|
257
|
+
objBST.remove(11);
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
const avlTree = new AVLTree();
|
|
261
|
+
avlTree.addMany([11, 3, 15, 1, 8, 13, 16, 2, 6, 9, 12, 14, 4, 7, 10, 5])
|
|
262
|
+
avlTree.isAVLBalanced(); // true
|
|
263
|
+
avlTree.remove(10);
|
|
264
|
+
avlTree.isAVLBalanced(); // true
|
|
267
265
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
expect(
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
expect(node15 && tree.getHeight(node15)).toBe(2);
|
|
312
|
-
|
|
313
|
-
const removed1 = tree.remove(1, true);
|
|
314
|
-
expect(removed1).toBeInstanceOf(Array);
|
|
315
|
-
expect(removed1[0]).toBeDefined();
|
|
316
|
-
expect(removed1[0].deleted).toBeDefined();
|
|
317
|
-
if (removed1[0].deleted) expect(removed1[0].deleted.id).toBe(1);
|
|
318
|
-
|
|
319
|
-
expect(tree.isAVLBalanced()).toBe(true);
|
|
320
|
-
|
|
321
|
-
expect(tree.getHeight()).toBe(4);
|
|
322
|
-
|
|
323
|
-
// The code for removing these nodes (4, 10, 15, 5, 13, 3, 8, 6, 7, 9, 14) in sequence has been omitted.
|
|
324
|
-
|
|
325
|
-
expect(tree.isAVLBalanced()).toBe(false);
|
|
326
|
-
|
|
327
|
-
const bfsIDs = tree.BFS();
|
|
328
|
-
expect(bfsIDs[0]).toBe(2);
|
|
329
|
-
expect(bfsIDs[1]).toBe(12);
|
|
330
|
-
expect(bfsIDs[2]).toBe(16);
|
|
266
|
+
```
|
|
267
|
+
#### JS
|
|
268
|
+
```javascript
|
|
269
|
+
const {BST, BSTNode} = require('data-structure-typed');
|
|
270
|
+
|
|
271
|
+
const bst = new BST();
|
|
272
|
+
bst.add(11);
|
|
273
|
+
bst.add(3);
|
|
274
|
+
bst.addMany([15, 1, 8, 13, 16, 2, 6, 9, 12, 14, 4, 7, 10, 5]);
|
|
275
|
+
bst.size === 16; // true
|
|
276
|
+
bst.has(6); // true
|
|
277
|
+
const node6 = bst.get(6);
|
|
278
|
+
bst.getHeight(6) === 2; // true
|
|
279
|
+
bst.getHeight() === 5; // true
|
|
280
|
+
bst.getDepth(6) === 3; // true
|
|
281
|
+
const leftMost = bst.getLeftMost();
|
|
282
|
+
leftMost?.id === 1; // true
|
|
283
|
+
expect(leftMost?.id).toBe(1);
|
|
284
|
+
bst.remove(6);
|
|
285
|
+
bst.get(6); // null
|
|
286
|
+
bst.isAVLBalanced(); // true or false
|
|
287
|
+
const bfsIDs = bst.BFS();
|
|
288
|
+
bfsIDs[0] === 11; // true
|
|
289
|
+
expect(bfsIDs[0]).toBe(11);
|
|
290
|
+
|
|
291
|
+
const objBST = new BST();
|
|
292
|
+
objBST.add(11, {id: 11, keyA: 11});
|
|
293
|
+
objBST.add(3, {id: 3, keyA: 3});
|
|
294
|
+
|
|
295
|
+
objBST.addMany([{id: 15, keyA: 15}, {id: 1, keyA: 1}, {id: 8, keyA: 8},
|
|
296
|
+
{id: 13, keyA: 13}, {id: 16, keyA: 16}, {id: 2, keyA: 2},
|
|
297
|
+
{id: 6, keyA: 6}, {id: 9, keyA: 9}, {id: 12, keyA: 12},
|
|
298
|
+
{id: 14, keyA: 14}, {id: 4, keyA: 4}, {id: 7, keyA: 7},
|
|
299
|
+
{id: 10, keyA: 10}, {id: 5, keyA: 5}]);
|
|
300
|
+
|
|
301
|
+
objBST.remove(11);
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
const avlTree = new AVLTree();
|
|
305
|
+
avlTree.addMany([11, 3, 15, 1, 8, 13, 16, 2, 6, 9, 12, 14, 4, 7, 10, 5])
|
|
306
|
+
avlTree.isAVLBalanced(); // true
|
|
307
|
+
avlTree.remove(10);
|
|
308
|
+
avlTree.isAVLBalanced(); // true
|
|
331
309
|
|
|
332
|
-
const bfsNodes = tree.BFS('node');
|
|
333
|
-
expect(bfsNodes[0].id).toBe(2);
|
|
334
|
-
expect(bfsNodes[1].id).toBe(12);
|
|
335
|
-
expect(bfsNodes[2].id).toBe(16);
|
|
336
310
|
```
|
|
337
311
|
|
|
338
312
|
### Directed Graph simple snippet
|
|
339
313
|
|
|
314
|
+
#### TS or JS
|
|
340
315
|
```typescript
|
|
341
|
-
import {DirectedGraph
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
316
|
+
import {DirectedGraph} from 'data-structure-typed';
|
|
317
|
+
|
|
318
|
+
const graph = new DirectedGraph();
|
|
319
|
+
|
|
320
|
+
graph.addVertex('A');
|
|
321
|
+
graph.addVertex('B');
|
|
322
|
+
|
|
323
|
+
graph.hasVertex('A'); // true
|
|
324
|
+
graph.hasVertex('B'); // true
|
|
325
|
+
graph.hasVertex('C'); // false
|
|
326
|
+
|
|
327
|
+
graph.addEdge('A', 'B');
|
|
328
|
+
graph.hasEdge('A', 'B'); // true
|
|
329
|
+
graph.hasEdge('B', 'A'); // false
|
|
330
|
+
|
|
331
|
+
graph.removeEdgeSrcToDest('A', 'B');
|
|
332
|
+
graph.hasEdge('A', 'B'); // false
|
|
333
|
+
|
|
334
|
+
graph.addVertex('C');
|
|
335
|
+
|
|
336
|
+
graph.addEdge('A', 'B');
|
|
337
|
+
graph.addEdge('B', 'C');
|
|
338
|
+
|
|
339
|
+
const topologicalOrderIds = graph.topologicalSort(); // ['A', 'B', 'C']
|
|
340
|
+
```
|
|
360
341
|
|
|
361
|
-
|
|
362
|
-
const vertex1 = new DirectedVertex('A');
|
|
363
|
-
const vertex2 = new DirectedVertex('B');
|
|
364
|
-
const edge = new DirectedEdge('A', 'B');
|
|
342
|
+
### Undirected Graph snippet
|
|
365
343
|
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
344
|
+
#### TS or JS
|
|
345
|
+
```typescript
|
|
346
|
+
import {UndirectedGraph} from 'data-structure-typed';
|
|
347
|
+
|
|
348
|
+
const graph = new UndirectedGraph();
|
|
349
|
+
graph.addVertex('A');
|
|
350
|
+
graph.addVertex('B');
|
|
351
|
+
graph.addVertex('C');
|
|
352
|
+
graph.addVertex('D');
|
|
353
|
+
graph.removeVertex('C');
|
|
354
|
+
graph.addEdge('A', 'B');
|
|
355
|
+
graph.addEdge('B', 'D');
|
|
356
|
+
|
|
357
|
+
const dijkstraResult = graph.dijkstra('A');
|
|
358
|
+
Array.from(dijkstraResult?.seen ?? []).map(vertex => vertex.id) // ['A', 'B', 'D']
|
|
359
|
+
```
|
|
369
360
|
|
|
370
|
-
|
|
371
|
-
expect(graph.hasEdge('B', 'A')).toBe(false);
|
|
372
|
-
});
|
|
361
|
+
[API Docs](https://data-structure-typed-docs.vercel.app)
|
|
373
362
|
|
|
374
|
-
|
|
375
|
-
const vertex1 = new DirectedVertex('A');
|
|
376
|
-
const vertex2 = new DirectedVertex('B');
|
|
377
|
-
const edge = new DirectedEdge('A', 'B');
|
|
363
|
+
[Live Examples](https://data-structure-typed-examples.vercel.app)
|
|
378
364
|
|
|
379
|
-
graph.addVertex(vertex1);
|
|
380
|
-
graph.addVertex(vertex2);
|
|
381
|
-
graph.addEdge(edge);
|
|
382
365
|
|
|
383
|
-
|
|
384
|
-
expect(graph.hasEdge('A', 'B')).toBe(false);
|
|
385
|
-
});
|
|
366
|
+

|
|
386
367
|
|
|
387
|
-
|
|
388
|
-
const vertexA = new DirectedVertex('A');
|
|
389
|
-
const vertexB = new DirectedVertex('B');
|
|
390
|
-
const vertexC = new DirectedVertex('C');
|
|
391
|
-
const edgeAB = new DirectedEdge('A', 'B');
|
|
392
|
-
const edgeBC = new DirectedEdge('B', 'C');
|
|
368
|
+

|
|
393
369
|
|
|
394
|
-
|
|
395
|
-
graph.addVertex(vertexB);
|
|
396
|
-
graph.addVertex(vertexC);
|
|
397
|
-
graph.addEdge(edgeAB);
|
|
398
|
-
graph.addEdge(edgeBC);
|
|
370
|
+

|
|
399
371
|
|
|
400
|
-
|
|
401
|
-
if (topologicalOrder) expect(topologicalOrder.map(v => v.id)).toEqual(['A', 'B', 'C']);
|
|
402
|
-
});
|
|
403
|
-
```
|
|
372
|
+

|
|
404
373
|
|
|
405
|
-
|
|
374
|
+
<a href="https://data-structure-typed-examples.vercel.app" target="_blank">Live Examples</a>
|
|
406
375
|
|
|
407
|
-
```typescript
|
|
408
|
-
import {DirectedGraph, DirectedVertex, DirectedEdge, VertexId} from 'data-structure-typed';
|
|
409
|
-
|
|
410
|
-
class MyVertex extends DirectedVertex {
|
|
411
|
-
private _data: string;
|
|
412
|
-
get data(): string {
|
|
413
|
-
return this._data;
|
|
414
|
-
}
|
|
415
|
-
set data(value: string) {
|
|
416
|
-
this._data = value;
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
constructor(id: VertexId, data: string) {
|
|
420
|
-
super(id);
|
|
421
|
-
this._data = data;
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
class MyEdge extends DirectedEdge {
|
|
426
|
-
private _data: string;
|
|
427
|
-
get data(): string {
|
|
428
|
-
return this._data;
|
|
429
|
-
}
|
|
430
|
-
set data(value: string) {
|
|
431
|
-
this._data = value;
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
constructor(v1: VertexId, v2: VertexId, weight: number, data: string) {
|
|
435
|
-
super(v1, v2, weight);
|
|
436
|
-
this._data = data;
|
|
437
|
-
}
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
describe('DirectedGraph Test3', () => {
|
|
441
|
-
const myGraph = new DirectedGraph<MyVertex, MyEdge>();
|
|
442
|
-
|
|
443
|
-
it('should test graph operations', () => {
|
|
444
|
-
const vertex1 = new MyVertex(1, 'data1');
|
|
445
|
-
const vertex2 = new MyVertex(2, 'data2');
|
|
446
|
-
const vertex3 = new MyVertex(3, 'data3');
|
|
447
|
-
const vertex4 = new MyVertex(4, 'data4');
|
|
448
|
-
const vertex5 = new MyVertex(5, 'data5');
|
|
449
|
-
const vertex6 = new MyVertex(6, 'data6');
|
|
450
|
-
const vertex7 = new MyVertex(7, 'data7');
|
|
451
|
-
const vertex8 = new MyVertex(8, 'data8');
|
|
452
|
-
const vertex9 = new MyVertex(9, 'data9');
|
|
453
|
-
myGraph.addVertex(vertex1);
|
|
454
|
-
myGraph.addVertex(vertex2);
|
|
455
|
-
myGraph.addVertex(vertex3);
|
|
456
|
-
myGraph.addVertex(vertex4);
|
|
457
|
-
myGraph.addVertex(vertex5);
|
|
458
|
-
myGraph.addVertex(vertex6);
|
|
459
|
-
myGraph.addVertex(vertex7);
|
|
460
|
-
myGraph.addVertex(vertex8);
|
|
461
|
-
myGraph.addVertex(vertex9);
|
|
462
|
-
|
|
463
|
-
myGraph.addEdge(new MyEdge(1, 2, 10, 'edge-data1-2'));
|
|
464
|
-
myGraph.addEdge(new MyEdge(2, 1, 20, 'edge-data2-1'));
|
|
465
|
-
|
|
466
|
-
expect(myGraph.getEdge(1, 2)).toBeTruthy();
|
|
467
|
-
expect(myGraph.getEdge(2, 1)).toBeTruthy();
|
|
468
|
-
expect(myGraph.getEdge(1, '100')).toBeFalsy();
|
|
469
|
-
|
|
470
|
-
myGraph.removeEdgeBetween(1, 2);
|
|
471
|
-
expect(myGraph.getEdge(1, 2)).toBeFalsy();
|
|
472
|
-
|
|
473
|
-
myGraph.addEdge(new MyEdge(3, 1, 3, 'edge-data-3-1'));
|
|
474
|
-
myGraph.addEdge(new MyEdge(1, 9, 19, 'edge-data1-9'));
|
|
475
|
-
myGraph.addEdge(new MyEdge(9, 7, 97, 'edge-data9-7'));
|
|
476
|
-
myGraph.addEdge(new MyEdge(7, 9, 79, 'edge-data7-9'));
|
|
477
|
-
myGraph.addEdge(new MyEdge(1, 4, 14, 'edge-data1-4'));
|
|
478
|
-
myGraph.addEdge(new MyEdge(4, 7, 47, 'edge-data4-7'));
|
|
479
|
-
myGraph.addEdge(new MyEdge(1, 2, 12, 'edge-data1-2'));
|
|
480
|
-
myGraph.addEdge(new MyEdge(2, 3, 23, 'edge-data2-3'));
|
|
481
|
-
myGraph.addEdge(new MyEdge(3, 5, 35, 'edge-data3-5'));
|
|
482
|
-
myGraph.addEdge(new MyEdge(5, 7, 57, 'edge-data5-7'));
|
|
483
|
-
myGraph.addEdge(new MyEdge(7, 3, 73, 'edge-data7-3'));
|
|
484
|
-
|
|
485
|
-
const topologicalSorted = myGraph.topologicalSort();
|
|
486
|
-
expect(topologicalSorted).toBeNull();
|
|
487
|
-
|
|
488
|
-
const minPath1to7 = myGraph.getMinPathBetween(1, 7);
|
|
489
|
-
expect(minPath1to7).toBeInstanceOf(Array);
|
|
490
|
-
if (minPath1to7 && minPath1to7.length > 0) {
|
|
491
|
-
expect(minPath1to7).toHaveLength(3);
|
|
492
|
-
expect(minPath1to7[0]).toBeInstanceOf(MyVertex);
|
|
493
|
-
expect(minPath1to7[0].id).toBe(1);
|
|
494
|
-
expect(minPath1to7[1].id).toBe(9);
|
|
495
|
-
expect(minPath1to7[2].id).toBe(7);
|
|
496
|
-
}
|
|
497
|
-
|
|
498
|
-
const fordResult1 = myGraph.bellmanFord(1);
|
|
499
|
-
expect(fordResult1).toBeTruthy();
|
|
500
|
-
expect(fordResult1.hasNegativeCycle).toBeUndefined();
|
|
501
|
-
const {distMap, preMap, paths, min, minPath} = fordResult1;
|
|
502
|
-
expect(distMap).toBeInstanceOf(Map);
|
|
503
|
-
expect(distMap.size).toBe(9);
|
|
504
|
-
expect(distMap.get(vertex1)).toBe(0);
|
|
505
|
-
expect(distMap.get(vertex2)).toBe(12);
|
|
506
|
-
expect(distMap.get(vertex3)).toBe(35);
|
|
507
|
-
expect(distMap.get(vertex4)).toBe(14);
|
|
508
|
-
expect(distMap.get(vertex5)).toBe(70);
|
|
509
|
-
expect(distMap.get(vertex6)).toBe(Infinity);
|
|
510
|
-
expect(distMap.get(vertex7)).toBe(61);
|
|
511
|
-
expect(distMap.get(vertex8)).toBe(Infinity);
|
|
512
|
-
expect(distMap.get(vertex9)).toBe(19);
|
|
513
|
-
|
|
514
|
-
expect(preMap).toBeInstanceOf(Map);
|
|
515
|
-
expect(preMap.size).toBe(0);
|
|
516
|
-
|
|
517
|
-
expect(paths).toBeInstanceOf(Array);
|
|
518
|
-
expect(paths.length).toBe(0);
|
|
519
|
-
expect(min).toBe(Infinity);
|
|
520
|
-
expect(minPath).toBeInstanceOf(Array);
|
|
521
|
-
|
|
522
|
-
const floydResult = myGraph.floyd();
|
|
523
|
-
expect(floydResult).toBeTruthy();
|
|
524
|
-
if (floydResult) {
|
|
525
|
-
const {costs, predecessor} = floydResult;
|
|
526
|
-
expect(costs).toBeInstanceOf(Array);
|
|
527
|
-
expect(costs.length).toBe(9);
|
|
528
|
-
expect(costs[0]).toEqual([32, 12, 35, 14, 70, Infinity, 61, Infinity, 19]);
|
|
529
|
-
expect(costs[1]).toEqual([20, 32, 23, 34, 58, Infinity, 81, Infinity, 39]);
|
|
530
|
-
expect(costs[2]).toEqual([3, 15, 38, 17, 35, Infinity, 64, Infinity, 22]);
|
|
531
|
-
expect(costs[3]).toEqual([123, 135, 120, 137, 155, Infinity, 47, Infinity, 126]);
|
|
532
|
-
expect(costs[4]).toEqual([133, 145, 130, 147, 165, Infinity, 57, Infinity, 136]);
|
|
533
|
-
expect(costs[5]).toEqual([Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity]);
|
|
534
|
-
expect(costs[6]).toEqual([76, 88, 73, 90, 108, Infinity, 137, Infinity, 79]);
|
|
535
|
-
expect(costs[7]).toEqual([Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity]);
|
|
536
|
-
expect(costs[8]).toEqual([173, 185, 170, 187, 205, Infinity, 97, Infinity, 176]);
|
|
537
|
-
|
|
538
|
-
expect(predecessor).toBeInstanceOf(Array);
|
|
539
|
-
expect(predecessor.length).toBe(9);
|
|
540
|
-
expect(predecessor[0]).toEqual([vertex2, null, vertex2, null, vertex3, null, vertex4, null, null]);
|
|
541
|
-
expect(predecessor[1]).toEqual([null, vertex1, null, vertex1, vertex3, null, vertex4, null, vertex1]);
|
|
542
|
-
expect(predecessor[5]).toEqual([null, null, null, null, null, null, null, null, null]);
|
|
543
|
-
expect(predecessor[7]).toEqual([null, null, null, null, null, null, null, null, null]);
|
|
544
|
-
expect(predecessor[8]).toEqual([vertex7, vertex7, vertex7, vertex7, vertex7, null, null, null, vertex7]);
|
|
545
|
-
}
|
|
546
|
-
|
|
547
|
-
const dijkstraRes12tt = myGraph.dijkstra(1, 2, true, true);
|
|
548
|
-
expect(dijkstraRes12tt).toBeTruthy();
|
|
549
|
-
if (dijkstraRes12tt) {
|
|
550
|
-
const {distMap, minDist, minPath, paths, preMap, seen} = dijkstraRes12tt;
|
|
551
|
-
expect(distMap).toBeInstanceOf(Map);
|
|
552
|
-
expect(distMap.size).toBe(9);
|
|
553
|
-
expect(distMap.get(vertex1)).toBe(0);
|
|
554
|
-
expect(distMap.get(vertex2)).toBe(12);
|
|
555
|
-
expect(distMap.get(vertex3)).toBe(Infinity);
|
|
556
|
-
expect(distMap.get(vertex4)).toBe(14);
|
|
557
|
-
expect(distMap.get(vertex5)).toBe(Infinity);
|
|
558
|
-
expect(distMap.get(vertex6)).toBe(Infinity);
|
|
559
|
-
expect(distMap.get(vertex7)).toBe(Infinity);
|
|
560
|
-
expect(distMap.get(vertex8)).toBe(Infinity);
|
|
561
|
-
expect(distMap.get(vertex9)).toBe(19);
|
|
562
|
-
|
|
563
|
-
expect(minDist).toBe(12);
|
|
564
|
-
expect(minPath).toBeInstanceOf(Array);
|
|
565
|
-
expect(minPath.length).toBe(2);
|
|
566
|
-
expect(minPath[0]).toBe(vertex1);
|
|
567
|
-
expect(minPath[1]).toBe(vertex2);
|
|
568
|
-
|
|
569
|
-
expect(paths).toBeInstanceOf(Array);
|
|
570
|
-
expect(paths.length).toBe(9);
|
|
571
|
-
expect(paths[0]).toBeInstanceOf(Array);
|
|
572
|
-
expect(paths[0][0]).toBe(vertex1);
|
|
573
|
-
|
|
574
|
-
expect(paths[1]).toBeInstanceOf(Array);
|
|
575
|
-
expect(paths[1][0]).toBe(vertex1);
|
|
576
|
-
expect(paths[1][1]).toBe(vertex2);
|
|
577
|
-
|
|
578
|
-
expect(paths[2]).toBeInstanceOf(Array);
|
|
579
|
-
expect(paths[2][0]).toBe(vertex3);
|
|
580
|
-
expect(paths[3]).toBeInstanceOf(Array);
|
|
581
|
-
expect(paths[3][0]).toBe(vertex1);
|
|
582
|
-
expect(paths[3][1]).toBe(vertex4);
|
|
583
|
-
expect(paths[4]).toBeInstanceOf(Array);
|
|
584
|
-
expect(paths[4][0]).toBe(vertex5);
|
|
585
|
-
|
|
586
|
-
expect(paths[5]).toBeInstanceOf(Array);
|
|
587
|
-
expect(paths[5][0]).toBe(vertex6);
|
|
588
|
-
expect(paths[6]).toBeInstanceOf(Array);
|
|
589
|
-
expect(paths[6][0]).toBe(vertex7);
|
|
590
|
-
expect(paths[7]).toBeInstanceOf(Array);
|
|
591
|
-
expect(paths[7][0]).toBe(vertex8);
|
|
592
|
-
expect(paths[8]).toBeInstanceOf(Array);
|
|
593
|
-
expect(paths[8][0]).toBe(vertex1);
|
|
594
|
-
expect(paths[8][1]).toBe(vertex9);
|
|
595
|
-
}
|
|
596
|
-
});
|
|
597
|
-
});
|
|
598
|
-
```
|
|
599
376
|
|
|
600
377
|
## API docs
|
|
601
378
|
|
|
@@ -875,29 +652,40 @@ describe('DirectedGraph Test3', () => {
|
|
|
875
652
|
|
|
876
653
|

|
|
877
654
|
|
|
878
|
-
![]
|
|
655
|
+
[//]: # ()
|
|
879
656
|
|
|
880
|
-
|
|
657
|
+
[//]: # ()
|
|
658
|
+
[//]: # ()
|
|
881
659
|
|
|
882
|
-
|
|
660
|
+
[//]: # ()
|
|
661
|
+
[//]: # ()
|
|
883
662
|
|
|
884
|
-
|
|
663
|
+
[//]: # ()
|
|
664
|
+
[//]: # ()
|
|
885
665
|
|
|
886
|
-
|
|
666
|
+
[//]: # ()
|
|
667
|
+
[//]: # ()
|
|
887
668
|
|
|
888
|
-
|
|
669
|
+
[//]: # ()
|
|
670
|
+
[//]: # ()
|
|
889
671
|
|
|
890
|
-
|
|
672
|
+
[//]: # ()
|
|
673
|
+
[//]: # ()
|
|
891
674
|
|
|
892
|
-
|
|
675
|
+
[//]: # ()
|
|
676
|
+
[//]: # ()
|
|
893
677
|
|
|
894
|
-
|
|
678
|
+
[//]: # ()
|
|
679
|
+
[//]: # ()
|
|
895
680
|
|
|
896
|
-
|
|
681
|
+
[//]: # ()
|
|
682
|
+
[//]: # ()
|
|
897
683
|
|
|
898
|
-
|
|
684
|
+
[//]: # ()
|
|
685
|
+
[//]: # ()
|
|
899
686
|
|
|
900
|
-
|
|
687
|
+
[//]: # ()
|
|
688
|
+
[//]: # ()
|
|
901
689
|
|
|
902
690
|
[//]: # ()
|
|
903
691
|
|