Enter array of nums: Find the maximal difference among all possible pairs.
Find the maximal difference among all possible pairs of a given array of integers.