mburst / dijkstras-algorithm

Implementations of Dijkstra's shortest path algorithm in different languages
524 stars 203 forks source link

How to addVertex from array #8

Closed nabrih closed 8 years ago

nabrih commented 8 years ago

Hi, please help me to insert value from an array to Graph

mburst commented 8 years ago

What language file are you looking at?

nabrih commented 8 years ago

I use JavaScript for this

mburst commented 8 years ago

You just need to call add vertex https://github.com/mburst/dijkstras-algorithm/blob/master/dijkstras.js#L33

nabrih commented 8 years ago

thanks its done.

and can this algorithm get top 3 possibility of shortest way?

mburst commented 8 years ago

Definitely a tougher problem but I'll leave that as an exercise for the user. Marking as close since you were able to get your issue resolved.

Cheers!