


You are given an array 'ARR' of the 'N' element. Your task is to find the maximum difference between any of the two elements from 'ARR'.
If the maximum difference is even print “EVEN” without quotes. If the maximum difference is odd print “ODD” without quotes.
For example:
Given 'ARR' = [1, 10, 5, 2, 8, 1 ] , answer is "ODD".
Here the maximum difference is between 10 and 1, 10 - 1 = 9
The first line of input contains an integer T’ denoting the number of test cases to run. Then the test case follows.
The first line of each test case contains ‘N’, the length of the array 'ARR'.
The second line of each test case contains ‘N’ space-separated elements of 'ARR'.
Output Format:
For each test case, print a single line containing “ODD” without quotes if the maximum difference is odd else print “EVEN” without quotes.
The output for each test case is printed in a separate line.
Note:
You don’t need to print anything. It has already been taken care of. Just implement the given function.
1 <= T <= 100
1 <= N <= 5000
1 <= ARR[i] <= 10 ^ 9
where ‘N’ is the length of the array 'ARR', and 'ARR[i]' is an element of the 'ARR' respectively.
Time limit: 1 sec.
2
4
2 9 3 4
6
1 1 1 1 1 1
ODD
EVEN
For the first test case, the maximum difference is 7, between 9 and 2.
For the second test case, all elements are the same, the maximum difference is 0.
2
2
567 11
1
28
EVEN
EVEN
The maximum difference is obtained when two elements are the maximum and minimum of the ARR respectively.
We will iterate over ARR and find the MAX and MIN of the ARR. And if the MAX - MIN is odd the return “ODD” else return "EVEN".
The algorithm will be-
O(N), where N is the size of ‘ARR’.
We will iterate over ARR to find MAX and MIN of the ARR.
O(1).
Since constant space is used.