Minimum sum of absolute differences of pairs in a triplet from three arrays

  #include #include using namespace std;  int closestValue(vector A, int k){            int close = A.back();          auto it = lower_bound(A.begin(),                          A.end(), k);          if (it != A.end()) {          close = *it;                          if (it != A.begin()) {                          if ((k – *(it – 1))                < (close - k)) {                close = *(it - 1);            }        }    }          return close;}  void minPossible(vector arr,                 vector brr,                 vector crr){        sort(arr.begin(), arr.end());    sort(crr.begin(), crr.end());          int minimum = INT_MAX;          for (int val : brr) {                          int arr_close = closestValue(arr, val);                          int crr_close = closestValue(crr, val);                  if (abs(val - arr_close)                + abs(val - crr_close)            < minimum)                          minimum = abs(val - arr_close)                      + abs(val - crr_close);    }              cout