title: Distributing Items Person Cannot Take Two Items Type
signature: def distributingItemsPersonCannotTakeTwoItemsType(arr: List[Int], n: Int, k: Int) = {
source_py: def distributing_items_person_cannot_take_two_items_type(arr, n, k):
      for i in range(n):
          count = 0
          for j in range(n):
              if (arr[j] == arr[i]):
                  count += 1
              if (count > (2 * k)):
                  return False
      return True
source_cpp: bool distributing_items_person_cannot_take_two_items_type(vector<int> arr, int n, int k) {
    int count;
    for ( int i = 0;
    i < n;
    i ++ ) {
      count = 0;
      for ( int j = 0;
      j < n;
      j ++ ) {
        if ( arr [ j ] == arr [ i ] ) count ++;
        if ( count > 2 * k ) return false;
      }
    }
    return true;
  }