Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (Vertex v : graph.values()) {
- v.previous = v == source ? source : null;
- v.dist = v == source ? 0 : Integer.MAX_VALUE;
- q.add(v);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement