import java.util.*;
public class Main {
public static List<List<Integer>> threeSum(int[] nums) {
// TODO: find all unique triplets that sum to zero
return new ArrayList<>();
}
public static void main(String[] args) {
System.out.println(threeSum(new int[]{-1, 0, 1, 2, -1, -4}));
System.out.println(threeSum(new int[]{0, 0, 0}));
}
}
Click Run to execute, or Submit to grade (all languages).