

Input:
'N' = 5
‘ARR’ = [1, 2, 3, 4, 5]
Output: 9
The optimal subset would be [1, 3, 5], in which no two elements are adjacent to each other and the sum of the subset is 9. We cannot make the sum greater than 9.
The first line will contain the integer 'T', the number of test cases. For each test case
In the first line of each test case, an integer ‘N’ denotes the length of the array ‘ARR’.
The second line of each test case contains ‘N’ integers denoting the elements of array ‘ARR’.
For each test case, print the maximum sum of the subset.
You don't need to print anything. It has already been taken care of. Just implement the given function.
1 <= 'T' <= 10
4 <= 'N' <= 10^5
1 <= ‘ARR[i]’ <= 10^5
Time Limit: 1 sec
Approach:
Algorithm :