We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3e887a6 commit be4a420Copy full SHA for be4a420
07_dijkstras_algorithm/javascript/01_dijkstras_algorithm.js
@@ -1,23 +1,23 @@
1
'use strict';
2
3
// the graph
4
-const graph = {}
5
-graph["start"] = {}
6
-graph["start"]["a"] = 6
7
-graph["start"]["b"] = 2
+const graph = {};
+graph["start"] = {};
+graph["start"]["a"] = 6;
+graph["start"]["b"] = 2;
8
9
-graph["a"] = {}
10
-graph["a"]["fin"] = 1
+graph["a"] = {};
+graph["a"]["fin"] = 1;
11
12
-graph["b"] = {}
13
-graph["b"]["a"] = 3
14
-graph["b"]["fin"] = 5
+graph["b"] = {};
+graph["b"]["a"] = 3;
+graph["b"]["fin"] = 5;
15
16
-graph["fin"] = {}
+graph["fin"] = {};
17
18
// The costs table
19
const costs = {};
20
-costs['a'] = 6
+costs['a'] = 6;
21
costs['b'] = 2;
22
costs['fin'] = Infinity;
23
0 commit comments