public static Set<String> getPairs(int[] nums, int diff) {
        Set<String> results = new HashSet<>();
        if(null == nums || nums.length == 0) {
            return results;
        }
        boolean hasPair;
        int numIdx, tmp;
        for(int idx=0; idx < nums.length; idx++) {
            hasPair = false;
            if(idx+3 < nums.length) {
                tmp = diff+nums[idx];
                numIdx = search(nums, tmp, 0, nums.length-1);
                if(numIdx > -1) {
                    results.add("("+nums[idx] + ", " + tmp+")");
                    hasPair = true;
                }
            }
            if(!hasPair && idx-3 > -1) {
                tmp = nums[idx]-diff;
                numIdx = search(nums, tmp, 0, nums.length-1);
                if(numIdx > -1) {
                    results.add("("+tmp + ", " + nums[idx]+")");
                }
            }
        }
        return results;
    }