Skip to content

Commit bff81e6

Browse files
committed
fix: Change isDAG() to package-private for test access
1 parent 8e70767 commit bff81e6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/com/thealgorithms/graphs/TopologicalSortDFS.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Replace the entire file with the fixed version
2+
cat > src/main/java/com/thealgorithms/graphs/TopologicalSortDFS.java << 'EOF'
13
package com.thealgorithms.graphs;
24

35
import java.util.ArrayList;
@@ -94,7 +96,7 @@ private void dfs(int vertex, boolean[] visited, Stack<Integer> stack) {
9496
*
9597
* @return true if graph is DAG, false otherwise
9698
*/
97-
private boolean isDAG() {
99+
boolean isDAG() {
98100
boolean[] visited = new boolean[vertices];
99101
boolean[] recStack = new boolean[vertices];
100102

0 commit comments

Comments
 (0)