diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b47004..a44e251 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ All notable changes to this project will be documented in this file. - [Semantic Versioning](https://semver.org/spec/v2.0.0.html) - [`auto-changelog`](https://github.com/CookPete/auto-changelog) -## [v1.48.3](https://github.com/zrwusa/data-structure-typed/compare/v1.35.0...main) (upcoming) +## [v1.48.4](https://github.com/zrwusa/data-structure-typed/compare/v1.35.0...main) (upcoming) ### Changes diff --git a/package.json b/package.json index 13c2dfc..8b6d5a7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "data-structure-typed", - "version": "1.48.3", + "version": "1.48.4", "description": "Data Structures of Javascript & TypeScript. Heap, Binary Tree, RedBlack Tree, Linked List, Deque, Trie, HashMap, Directed Graph, Undirected Graph, Binary Search Tree(BST), AVL Tree, Priority Queue, Graph, Queue, Tree Multiset, Singly Linked List, Doubly Linked List, Max Heap, Max Priority Queue, Min Heap, Min Priority Queue, Stack.", "main": "dist/cjs/index.js", "module": "dist/mjs/index.js", diff --git a/src/data-structures/graph/undirected-graph.ts b/src/data-structures/graph/undirected-graph.ts index 8246a2d..3d9addd 100644 --- a/src/data-structures/graph/undirected-graph.ts +++ b/src/data-structures/graph/undirected-graph.ts @@ -158,17 +158,23 @@ export class UndirectedGraph< } /** - * Time Complexity: O(|E|), where |E| is the number of edges incident to the given vertex. + * Time Complexity: O(E), where E is the number of edges incident to the given vertex. * Space Complexity: O(1) */ + /** - * Time Complexity: O(|E|), where |E| is the number of edges incident to the given vertex. + * Time Complexity: O(E), where E is the number of edges incident to the given vertex. * Space Complexity: O(1) * - * The deleteEdge function removes an edge between two vertices in a graph. - * @param {EO} edge - The parameter "edge" is of type EO, which represents an edge in a graph. - * @returns The method is returning either the removed edge (of type EO) or undefined if the edge was not found. + * The function `deleteEdge` deletes an edge between two vertices in a graph. + * @param {EO | VertexKey} edgeOrOneSideVertexKey - The parameter `edgeOrOneSideVertexKey` can be + * either an edge object or a vertex key. + * @param {VertexKey} [otherSideVertexKey] - The parameter `otherSideVertexKey` is an optional + * parameter that represents the key of the vertex on the other side of the edge. It is used when the + * `edgeOrOneSideVertexKey` parameter is a vertex key, and it specifies the key of the vertex on the + * other side of the + * @returns The `deleteEdge` function returns either the deleted edge object (EO) or `undefined`. */ deleteEdge(edgeOrOneSideVertexKey: EO | VertexKey, otherSideVertexKey?: VertexKey): EO | undefined { let oneSide: VO | undefined, otherSide: VO | undefined; diff --git a/test/integration/bst.test.ts b/test/integration/bst.test.ts index f1fdc05..4cb8517 100644 --- a/test/integration/bst.test.ts +++ b/test/integration/bst.test.ts @@ -183,7 +183,7 @@ describe('Individual package BST operations test', () => { }); it('should perform various operations on a Binary Search Tree with object values', () => { - const objBST = new BST<{ key: number; keyA: number }>(); + const objBST = new BST(); expect(objBST).toBeInstanceOf(BST); objBST.add([11, { key: 11, keyA: 11 }]); objBST.add([3, { key: 3, keyA: 3 }]);