int closestSum(int currNum, int[] nums) {
    int currDiff = Integer.MAX_VALUE;
    int currClosest = -1;

    for (int i = 0; i < nums.length; i++) {
      for (int j = 0; j < nums.length; j++) {
        if (i == j)
          continue;

        int sum = nums[i] + nums[j];
        int n = Math.abs(currNum - sum);
        if(n <= currDiff){
          currDiff = n;
          currClosest = sum;
        }
      }
    }
    return currClosest;
  }