With those methods, we've built a simple graph class.
xxxxxxxxxx91
"Removing `A` should return [ 'B: C', 'C: B D E', 'D: C E G', 'E: D F C', 'F: E', 'G: D' ]"var assert = require('assert');class Graph { constructor() { // fill in this method } addVertex(nodeVal) { // fill in this method } addEdge(src, dest) { // fill in this method } removeVertex(val) { // fill in this method } removeEdge(src, dest) { // fill in this method } printNeighbors() { const result = []; for (let vertex of this.adjacencyList.keys()) {OUTPUT
Results will appear here.