Anonymous user
Dijkstra's algorithm: Difference between revisions
→{{header|Ruby}}
(add Ruby) |
|||
Line 360:
=={{header|Ruby}}==
{{works with|Ruby|1.9.2+}} (for INFINITY)
Notes for this solution:
* At every iteration, the next minimum distance node found by linear traversal of all nodes, which is inefficient.
<lang ruby>class Graph
class Vertex
|