Given an unsorted array. Your task is to find the maximum difference between the successive elements in its sorted form.
The first line of input contains an integer T, number of test cases. Following T lines contains an integer N denoting the size of array and next line followed contains the array elements.
Print the maximum gap between the successive elements.
1 ≤ T ≤ 100
1 ≤ N ≤ 106
1 ≤ A[i] ≤ 106
1 10 5
Testcase 1: The maximum difference between successive elements of array is 5(abs(5-10)).
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.