Skip to content

Commit

Permalink
(fix) Queue import
Browse files Browse the repository at this point in the history
  • Loading branch information
brunolnetto committed Jan 10, 2022
1 parent 3c16eff commit 34da35e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/algorithms/breadth-first-search/breadthFirstSearch.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Queue from '../../../data-structures/queue/Queue';
import Queue from '../../data-structures/queue/Queue';

/**
* @typedef {Object} Callbacks
Expand Down
8 changes: 8 additions & 0 deletions src/data-structures/graph/Graph.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ export default class Graph {
return this
}

/**
* @param {GraphVertex[]} vertices
* @returns {Graph}
*/
addVertices(newVertices) {
newVertices.forEach((vertex) => this.addVertex(vertex));
}

/**
* @param {string} vertexKey
* @returns GraphVertex
Expand Down

0 comments on commit 34da35e

Please sign in to comment.