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

Method removeVertex

Data-Structures/Graph/Graph3.js:24–29  ·  view source on GitHub ↗
(vertex)

Source from the content-addressed store, hash-verified

22 }
23
24 removeVertex(vertex) {
25 while (this.adjacencyObject[vertex].length) {
26 const adjacentVertex = this.adjacencyObject[vertex].pop()
27 this.removeEdge(vertex, adjacentVertex)
28 }
29 }
30
31 /**
32 * Return DFS (Depth First Search) List Using Recursive Method

Callers 1

Graph3.test.jsFile · 0.80

Calls 2

removeEdgeMethod · 0.95
popMethod · 0.45

Tested by

no test coverage detected