Skip to content

Commit

Permalink
Update DFS.java
Browse files Browse the repository at this point in the history
  • Loading branch information
DBasu2610 authored Oct 1, 2024
1 parent ff60a3b commit 2db196a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Solved-Problems/GraphTheory/DFS.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ public class DFS {

public static void main(String[] args) {

Check warning on line 10 in Solved-Problems/GraphTheory/DFS.java

View workflow job for this annotation

GitHub Actions / java-linter / java-linter

[reviewdog] reported by reviewdog 🐶 Missing a Javadoc comment. Raw Output: /github/workspace/./Solved-Problems/GraphTheory/DFS.java:10:3: warning: Missing a Javadoc comment. (com.puppycrawl.tools.checkstyle.checks.javadoc.MissingJavadocMethodCheck)
int vertex = 7;
@SuppressWarnings("unchecked") ArrayList<Edge> graph[] = new ArrayList[vertex];
boolean vis[] = new boolean[vertex];
@SuppressWarnings("unchecked") ArrayList<Edge> [] graph = new ArrayList[vertex];
boolean [] vis = new boolean[vertex];

createGraph(graph);

Expand All @@ -28,7 +28,7 @@ public Edge(int s, int d) {
}
}

public static void createGraph(ArrayList<Edge> graph[]) {
public static void createGraph(ArrayList<Edge> [] graph) {

Check warning on line 31 in Solved-Problems/GraphTheory/DFS.java

View workflow job for this annotation

GitHub Actions / java-linter / java-linter

[reviewdog] reported by reviewdog 🐶 'method def modifier' has incorrect indentation level 3, expected level should be 2. Raw Output: /github/workspace/./Solved-Problems/GraphTheory/DFS.java:31:4: warning: 'method def modifier' has incorrect indentation level 3, expected level should be 2. (com.puppycrawl.tools.checkstyle.checks.indentation.IndentationCheck)

Check warning on line 31 in Solved-Problems/GraphTheory/DFS.java

View workflow job for this annotation

GitHub Actions / java-linter / java-linter

[reviewdog] reported by reviewdog 🐶 Missing a Javadoc comment. Raw Output: /github/workspace/./Solved-Problems/GraphTheory/DFS.java:31:4: warning: Missing a Javadoc comment. (com.puppycrawl.tools.checkstyle.checks.javadoc.MissingJavadocMethodCheck)
for (int i = 0; i < graph.length; i++) {
graph[i] = new ArrayList<Edge>();
}
Expand Down Expand Up @@ -56,7 +56,7 @@ public static void createGraph(ArrayList<Edge> graph[]) {
graph[6].add(new Edge(6, 5));
}

public static void depthFirst(ArrayList<Edge> graph[], int curr, boolean vis[]) {
public static void depthFirst(ArrayList<Edge> [] graph, int curr, boolean [] vis) {

Check warning on line 59 in Solved-Problems/GraphTheory/DFS.java

View workflow job for this annotation

GitHub Actions / java-linter / java-linter

[reviewdog] reported by reviewdog 🐶 Missing a Javadoc comment. Raw Output: /github/workspace/./Solved-Problems/GraphTheory/DFS.java:59:3: warning: Missing a Javadoc comment. (com.puppycrawl.tools.checkstyle.checks.javadoc.MissingJavadocMethodCheck)
System.out.println(curr);
vis[curr] = true;
for (int i = 0; i < graph[curr].size(); i++) {
Expand Down

0 comments on commit 2db196a

Please sign in to comment.