Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

red-black-tree-typed

Package Overview
Dependencies
Maintainers
1
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

red-black-tree-typed - npm Package Compare versions

Comparing version 1.49.3 to 1.49.4

2

dist/data-structures/binary-tree/binary-tree.d.ts

@@ -528,3 +528,3 @@ /**

protected _displayAux(node: N | null | undefined, options: BinaryTreePrintOptions): NodeDisplayLayout;
protected _defaultOneParamCallback: (node: N) => K;
protected _defaultOneParamCallback: (node: N | null | undefined) => K | undefined;
/**

@@ -531,0 +531,0 @@ * Swap the data of two nodes in the binary tree.

@@ -102,13 +102,4 @@ /**

*/
abstract deleteVertex(vertexOrKey: VO | VertexKey): boolean;
/**
* Time Complexity: O(1) - Constant time for Map operations.
* Space Complexity: O(1) - Constant space, as it creates only a few variables.
*
* The `deleteVertex` function removes a vertex from a graph by its ID or by the vertex object itself.
* @param {VO | VertexKey} vertexOrKey - The parameter `vertexOrKey` can be either a vertex object (`VO`) or a vertex ID
* (`VertexKey`).
* @returns The method is returning a boolean value.
*/
deleteVertex(vertexOrKey: VO | VertexKey): boolean;
/**
* Time Complexity: O(K), where K is the number of vertexMap to be removed.

@@ -115,0 +106,0 @@ * Space Complexity: O(1) - Constant space, as it creates only a few variables.

@@ -101,19 +101,2 @@ "use strict";

/**
* Time Complexity: O(1) - Constant time for Map operations.
* Space Complexity: O(1) - Constant space, as it creates only a few variables.
*/
/**
* Time Complexity: O(1) - Constant time for Map operations.
* Space Complexity: O(1) - Constant space, as it creates only a few variables.
*
* The `deleteVertex` function removes a vertex from a graph by its ID or by the vertex object itself.
* @param {VO | VertexKey} vertexOrKey - The parameter `vertexOrKey` can be either a vertex object (`VO`) or a vertex ID
* (`VertexKey`).
* @returns The method is returning a boolean value.
*/
deleteVertex(vertexOrKey) {
const vertexKey = this._getVertexKey(vertexOrKey);
return this._vertexMap.delete(vertexKey);
}
/**
* Time Complexity: O(K), where K is the number of vertexMap to be removed.

@@ -120,0 +103,0 @@ * Space Complexity: O(1) - Constant space, as it creates only a few variables.

@@ -215,2 +215,6 @@ "use strict";

if (vertex) {
const neighbors = this.getNeighbors(vertex);
for (const neighbor of neighbors) {
this._inEdgeMap.delete(neighbor);
}
this._outEdgeMap.delete(vertex);

@@ -217,0 +221,0 @@ this._inEdgeMap.delete(vertex);

{
"name": "red-black-tree-typed",
"version": "1.49.3",
"version": "1.49.4",
"description": "RedBlackTree. Javascript & Typescript Data Structure.",

@@ -145,4 +145,4 @@ "main": "dist/index.js",

"dependencies": {
"data-structure-typed": "^1.49.3"
"data-structure-typed": "^1.49.4"
}
}

@@ -176,15 +176,3 @@ /**

/**
* Time Complexity: O(1) - Constant time for Map operations.
* Space Complexity: O(1) - Constant space, as it creates only a few variables.
*
* The `deleteVertex` function removes a vertex from a graph by its ID or by the vertex object itself.
* @param {VO | VertexKey} vertexOrKey - The parameter `vertexOrKey` can be either a vertex object (`VO`) or a vertex ID
* (`VertexKey`).
* @returns The method is returning a boolean value.
*/
deleteVertex(vertexOrKey: VO | VertexKey): boolean {
const vertexKey = this._getVertexKey(vertexOrKey);
return this._vertexMap.delete(vertexKey);
}
abstract deleteVertex(vertexOrKey: VO | VertexKey): boolean;

@@ -191,0 +179,0 @@ /**

@@ -243,3 +243,3 @@ /**

*/
override deleteVertex(vertexOrKey: VO | VertexKey): boolean {
deleteVertex(vertexOrKey: VO | VertexKey): boolean {
let vertexKey: VertexKey;

@@ -256,4 +256,8 @@ let vertex: VO | undefined;

if (vertex) {
this._outEdgeMap.delete(vertex)
this._inEdgeMap.delete(vertex)
const neighbors = this.getNeighbors(vertex);
for (const neighbor of neighbors) {
this._inEdgeMap.delete(neighbor);
}
this._outEdgeMap.delete(vertex);
this._inEdgeMap.delete(vertex);
}

@@ -260,0 +264,0 @@

@@ -215,3 +215,3 @@ /**

*/
override deleteVertex(vertexOrKey: VO | VertexKey): boolean {
deleteVertex(vertexOrKey: VO | VertexKey): boolean {
let vertexKey: VertexKey;

@@ -218,0 +218,0 @@ let vertex: VO | undefined;

@@ -36,4 +36,3 @@ /**

if (elements) {
for (const el of elements)
this.push(el);
for (const el of elements) this.push(el);
}

@@ -40,0 +39,0 @@ }

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc