title: Find Minimum Difference Pair
signature: fun findMinimumDifferencePair(arr: ArrayList<Int>, n: Int): Int {
test_code: package main
  
  import kotlin.text.*
  import kotlin.math.*
  
  
  // SOLUTION CODE
  // ===================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE
  // ===================================
  fun validateSolution(actual:Int, expected:Int):Boolean{
    return actual.equals(expected)
  }
  fun driver(arr: ArrayList<Int>, n: Int, expected:Int):String {
      try{
        if (validateSolution(PLACEHOLDER_FN_NAME(arr, n), expected)) {
                return "PASSED"
        }
        return "FAILED"
      } catch (e: Exception){
        return e::class.simpleName as String
      }
  
  }
  
  fun main() {
      var result: String = ""
      result = driver(arrayListOf(1, 1, 2, 3, 5, 8, 10, 11, 15, 15, 16, 20, 26, 28, 30, 30, 33, 33, 39, 50, 50, 50, 54, 62, 66, 68, 69, 69, 74, 74, 75, 75, 76, 78, 82, 83, 85, 86, 86, 89, 89, 91, 91, 92, 92, 92, 93, 94, 98), 32, 0)
      println("TEST-0...${result}")
      
      result = driver(arrayListOf(6, 6, -20, 88, -78, -18, 74, 72, 80, 76, -62, 38), 11, 0)
      println("TEST-1...${result}")
      
      result = driver(arrayListOf(0, 1, 1, 1, 1), 3, 0)
      println("TEST-2...${result}")
      
      result = driver(arrayListOf(75, 85, 49, 66, 44, 89, 80, 39, 64, 70, 25, 21, 81, 33, 90, 68, 51), 16, 1)
      println("TEST-3...${result}")
      
      result = driver(arrayListOf(-96, -10, 0, 4, 54, 64), 3, 10)
      println("TEST-4...${result}")
      
      result = driver(arrayListOf(1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0), 41, 0)
      println("TEST-5...${result}")
      
      result = driver(arrayListOf(3, 3, 5, 5, 7, 7, 9, 11, 11, 18, 18, 18, 20, 29, 29, 31, 31, 32, 37, 43, 44, 46, 48, 50, 52, 52, 53, 63, 63, 65, 69, 72, 76, 76, 81, 84, 85, 86, 87, 87, 90, 94, 97, 97), 27, 0)
      println("TEST-6...${result}")
      
      result = driver(arrayListOf(40, -46, 72, -28, 8, 90, 86, -90, 8, -66, -98, 6, 42, 86, 88, 42, -50, 74, -34, -16, -94, -56, -18, -18, 84, -44, 34, 80, 96, 42, -50, -92, 70, 80, 62, -38, -4, 68, 54, -14, 30, -18, -58), 33, 0)
      println("TEST-7...${result}")
      
      result = driver(arrayListOf(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1), 26, 0)
      println("TEST-8...${result}")
      
      result = driver(arrayListOf(15, 41, 32, 19, 68, 36, 61, 59, 5, 91, 53, 95, 10, 64, 15, 32, 14, 64, 48, 70, 85, 19, 83, 2, 33, 58, 93, 88, 21, 88, 45, 45, 18, 8), 24, 0)
      println("TEST-9...${result}")
      
          
  }
  
  main()
source_py: def find_minimum_difference_pair(arr, n):
      diff = (10 ** 20)
      for i in range((n - 1)):
          for j in range((i + 1), n):
              if (abs((arr[i] - arr[j])) < diff):
                  diff = abs((arr[i] - arr[j]))
      return diff
source_cpp: int find_minimum_difference_pair(vector<int> arr, int n) {
    int diff = INT_MAX;
    for ( int i = 0;
    i < n - 1;
    i ++ ) for ( int j = i + 1;
    j < n;
    j ++ ) if ( abs ( arr [ i ] - arr [ j ] ) < diff ) diff = abs ( arr [ i ] - arr [ j ] );
    return diff;
  }