mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-07 02:05:08 +08:00
Data Structures/Graph
This commit is contained in:
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
class Graph {
|
class Graph {
|
||||||
constructor () {
|
constructor () {
|
||||||
this.adjacencyMap = {}
|
this.adjacencyMap = {}
|
||||||
@ -42,3 +41,4 @@ const example = () => {
|
|||||||
g.addEdge(1, 3)
|
g.addEdge(1, 3)
|
||||||
g.printGraph()
|
g.printGraph()
|
||||||
}
|
}
|
||||||
|
example()
|
||||||
|
Reference in New Issue
Block a user