mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-24 04:54:21 +08:00
Code cleanup (#4246)
This commit is contained in:
@ -21,6 +21,7 @@ public class Sort012D {
|
||||
a[i] = np.nextInt();
|
||||
}
|
||||
sort012(a);
|
||||
np.close();
|
||||
}
|
||||
|
||||
public static void sort012(int[] a) {
|
||||
|
@ -49,5 +49,6 @@ class Sparcity {
|
||||
}
|
||||
}
|
||||
System.out.println("Sparcity of matrix is: " + sparcity(mat));
|
||||
in.close();
|
||||
}
|
||||
}
|
||||
|
@ -19,6 +19,7 @@ public class ThreeSumProblem {
|
||||
System.out.println("Brute Force Approach\n" + (th.BruteForce(arr, ts)) + "\n");
|
||||
System.out.println("Two Pointer Approach\n" + (th.TwoPointer(arr, ts)) + "\n");
|
||||
System.out.println("Hashmap Approach\n" + (th.Hashmap(arr, ts)));
|
||||
scan.close();
|
||||
}
|
||||
|
||||
public List<List<Integer>> BruteForce(int[] nums, int target) {
|
||||
|
Reference in New Issue
Block a user