Skip to content

Commit ce41e1a

Browse files
committed
fix: fixed simple bug
1 parent 72788cc commit ce41e1a

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,6 @@ public int[] findOrder(int numCourses, int[][] prerequisites) {
9292
}
9393
}
9494

95-
// Reverse post-order result to obtain topological order
96-
Collections.reverse(output);
9795
return output.stream().mapToInt(Integer::intValue).toArray();
9896
}
9997

0 commit comments

Comments
 (0)