title: Count Pairs Difference Equal K
signature: count_pairs_difference_equal_k <- function(arr, n, k) {
source_py: def count_pairs_difference_equal_k(arr, n, k):
      count = 0
      for i in range(0, n):
          for j in range((i + 1), n):
              if (((arr[i] - arr[j]) == k) or ((arr[j] - arr[i]) == k)):
                  count += 1
      return count
source_cpp: int count_pairs_difference_equal_k(vector<int> arr, int n, int k) {
    int count = 0;
    for ( int i = 0;
    i < n;
    i ++ ) {
      for ( int j = i + 1;
      j < n;
      j ++ ) if ( arr [ i ] - arr [ j ] == k || arr [ j ] - arr [ i ] == k ) count ++;
    }
    return count;
  }