#include using namespace std; // Returns minimum difference between any pair int findMinDiff(int arr[], int n) { // Sort array in non-decreasing order sort(arr, arr+n); // Initialize difference as infinite int diff = INT_MAX; // Find the min diff by comparing adjacent // pairs in sorted array for (int i=0; i> t; int arr[t - 1]; for(int i = 0; i < t; ++i){ cin >> arr[i]; } cout << findMinDiff(arr, t); return 0; }