Skip to content

Commit 57fbbcd

Browse files
authored
Updated the format of brackets
1 parent 66c6353 commit 57fbbcd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Others/Dijkstra.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public Edge(String v1, String v2, int dist) {
5757
}
5858

5959
/** One vertex of the graph, complete with mappings to neighbouring vertices */
60-
public static class Vertex implements Comparable<Vertex>{
60+
public static class Vertex implements Comparable<Vertex> {
6161
public final String name;
6262
public int dist = Integer.MAX_VALUE; // MAX_VALUE assumed to be infinity
6363
public Vertex previous = null;
@@ -67,7 +67,7 @@ public Vertex(String name){
6767
this.name = name;
6868
}
6969

70-
private void printPath(){
70+
private void printPath() {
7171
if (this == this.previous)
7272
{
7373
System.out.printf("%s", this.name);
@@ -83,14 +83,14 @@ else if (this.previous == null)
8383
}
8484
}
8585

86-
public int compareTo(Vertex other){
86+
public int compareTo(Vertex other) {
8787
if (dist == other.dist)
8888
return name.compareTo(other.name);
8989

9090
return Integer.compare(dist, other.dist);
9191
}
9292

93-
@Override public String toString(){
93+
@Override public String toString() {
9494
return "(" + name + ", " + dist + ")";
9595
}
9696
}

0 commit comments

Comments
 (0)