mirror of
https://github.com/zrwusa/data-structure-typed.git
synced 2024-11-23 12:54:04 +00:00
release: 1.48.4
This commit is contained in:
parent
6cc250606b
commit
ce99f7988e
|
@ -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
|
||||
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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<number,{ key: number; keyA: number }>();
|
||||
expect(objBST).toBeInstanceOf(BST);
|
||||
objBST.add([11, { key: 11, keyA: 11 }]);
|
||||
objBST.add([3, { key: 3, keyA: 3 }]);
|
||||
|
|
Loading…
Reference in a new issue