Updated brackets

This commit is contained in:
rmakynen 2018-10-09 09:16:00 +03:00 committed by GitHub
parent f98e3c06bd
commit efae9fb317
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -68,16 +68,13 @@ class Graph {
} }
private void printPath() { private void printPath() {
if (this == this.previous) if (this == this.previous) {
{
System.out.printf("%s", this.name); System.out.printf("%s", this.name);
} }
else if (this.previous == null) else if (this.previous == null) {
{
System.out.printf("%s(unreached)", this.name); System.out.printf("%s(unreached)", this.name);
} }
else else {
{
this.previous.printPath(); this.previous.printPath();
System.out.printf(" -> %s(%d)", this.name, this.dist); System.out.printf(" -> %s(%d)", this.name, this.dist);
} }