Add automatic linter (#4214)

This commit is contained in:
acbin
2023-06-09 20:05:14 +08:00
committed by GitHub
parent 00282efd8b
commit 415a04ea7f
188 changed files with 661 additions and 1133 deletions

View File

@ -58,8 +58,7 @@ public class AllPathsFromSourceToTarget {
// A recursive function to print all paths from 'u' to 'd'.
// isVisited[] keeps track of vertices in current path.
// localPathList<> stores actual vertices in the current path
private void storeAllPathsUtil(
Integer u, Integer d, boolean[] isVisited, List<Integer> localPathList) {
private void storeAllPathsUtil(Integer u, Integer d, boolean[] isVisited, List<Integer> localPathList) {
if (u.equals(d)) {
nm.add(new ArrayList<>(localPathList));
@ -87,8 +86,7 @@ public class AllPathsFromSourceToTarget {
}
// Driver program
public static List<List<Integer>> allPathsFromSourceToTarget(
int vertices, int[][] a, int source, int destination) {
public static List<List<Integer>> allPathsFromSourceToTarget(int vertices, int[][] a, int source, int destination) {
// Create a sample graph
AllPathsFromSourceToTarget g = new AllPathsFromSourceToTarget(vertices);
for (int i = 0; i < a.length; i++) {