private void twoSum(int[] num, int a, int b, int start, int target,
                ArrayList<ArrayList<Integer>> quadruplets) {
            int low = start;
            int high = num.length - 1;
            while (low < high) {
                int sum = num[low] + num[high];
                if (sum < target) {
                    low++;
                } else if (sum > target) {
                    high--;
                } else {
                    quadruplets.add(list(a, b, num[low], num[high]));
                    do {
                        low++;
                    } while (low < high && num[low] == num[low - 1]);
                    do {
                        high--;
                    } while (low < high && num[high] == num[high + 1]);
                }
            }
        }