Skip to content

Commit 2371ab6

Browse files
committed
Updated three sum
1 parent 6c76f70 commit 2371ab6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Medium/ThreeSum.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public static void main(String[] args) {
3434
* Traverse the array with 1 pointer
3535
* Use 2 more pointers from both start(i + 1) and end to find target
3636
*/
37-
public static List<List<Integer>> threeSum(int[] num) {
37+
public List<List<Integer>> threeSum(int[] num) {
3838
List<List<Integer>> res = new ArrayList<List<Integer>>();
3939
Arrays.sort(num);
4040

@@ -68,7 +68,7 @@ public static List<List<Integer>> threeSum(int[] num) {
6868
return res;
6969
}
7070

71-
private static void printResult(List<List<Integer>> result) {
71+
private void printResult(List<List<Integer>> result) {
7272
for (List<Integer> l : result) {
7373
System.out.print("{");
7474
for (Integer i : l) {

0 commit comments

Comments
 (0)