Give you n integers a1, a2, … , an. Please find two integers ai and aj (i < j), such that ai – aj is maximum.
Give you n integers a1, a2, … , an. Please find two integers ai and aj (i < j), such that ai – aj is maximum.
The first line of input is the number of test cases T (1 <= T <= 10)
For each test case, the first line will be an integer n (2 <= n <= 200000). Then there are n integers. |ai| <= 100000.
For each test case, print the maximum difference.
2
5
1 2 3 4 5
5
1 2 3 4 5
-1
-1