Given an unsorted array, find the minimum difference between any pair in given array.
Input: nums = [2, 4, 5, 9, 7]
Explanation: Difference between 5 and 4 is 1.
Input: nums = [3, 10, 8, 6]
Explanation:Difference between 8 and 6 is 2.
You don't need to read or print anything. Your task is to complete the function minimum_difference() which takes the array as input parameter and returns the minimum difference between any pair in given array.
Expected Time Compelxity: O(N* log(N)) where N is length of array. Expected Space Complexity: O(1)