We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6c76f70 commit 2371ab6Copy full SHA for 2371ab6
Medium/ThreeSum.java
@@ -34,7 +34,7 @@ public static void main(String[] args) {
34
* Traverse the array with 1 pointer
35
* Use 2 more pointers from both start(i + 1) and end to find target
36
*/
37
- public static List<List<Integer>> threeSum(int[] num) {
+ public List<List<Integer>> threeSum(int[] num) {
38
List<List<Integer>> res = new ArrayList<List<Integer>>();
39
Arrays.sort(num);
40
@@ -68,7 +68,7 @@ public static List<List<Integer>> threeSum(int[] num) {
68
return res;
69
}
70
71
- private static void printResult(List<List<Integer>> result) {
+ private void printResult(List<List<Integer>> result) {
72
for (List<Integer> l : result) {
73
System.out.print("{");
74
for (Integer i : l) {
0 commit comments