Skip to content

Commit

Permalink
Update DFS.java
Browse files Browse the repository at this point in the history
  • Loading branch information
paiganesh authored Mar 22, 2021
1 parent a20942d commit 5990fa1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion DFS.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ public void dfs(int startVertex)
} /* end dfs */

public static void main(String[] args) {
DFS graph = new DFS();
System.out.println("\nEnter start vertex :");
int startVertex = new Scanner(System.in).nextInt();
new DFS().dfs(startVertex);
graph.dfs(startVertex);
}
}

0 comments on commit 5990fa1

Please sign in to comment.