private ArrayList<ArrayList<Integer>> find(int[] num, int i) {
        ArrayList<ArrayList<Integer>> result = new ArrayList<ArrayList<Integer>>();
        int first = num[i - 1];
        int sum = -first;
        int left = i, right = num.length - 1;
        while (left < right) {
            if (num[left] + num[right] > sum) {
                right--;
            } else if (num[left] + num[right] < sum) {
                left++;

            } else {
                ArrayList<Integer> list = new ArrayList<Integer>();
                list.add(first);
                list.add(num[left]);
                list.add(num[right]);
                left++;
                right--;
                result.add(list);
            }
            while (left != i && num[left] == num[left - 1] && left < right) {
                left++;
            }
            while (right != num.length - 1 && num[right] == num[right + 1] && left < right) {
                right--;
            }
        }
        return result;
    }