MCPcopy Index your code
hub / github.com/TheAlgorithms/JavaScript / removeEdge

Method removeEdge

Data-Structures/Graph/Graph3.js:15–22  ·  view source on GitHub ↗
(vertex1, vertex2)

Source from the content-addressed store, hash-verified

13 }
14
15 removeEdge(vertex1, vertex2) {
16 this.adjacencyObject[vertex1] = this.adjacencyObject[vertex1].filter(
17 (v) => v !== vertex2
18 )
19 this.adjacencyObject[vertex2] = this.adjacencyObject[vertex2].filter(
20 (v) => v !== vertex1
21 )
22 }
23
24 removeVertex(vertex) {
25 while (this.adjacencyObject[vertex].length) {

Callers 1

removeVertexMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected