Given an array, the task is to find maximum triplet sum in the array.
The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. Each test case consists of two lines. First line of each test case contains an Integer N denoting size of array and the second line contains N space separated elements.
For each test case, print the maximum triplet sum in new line.
1 0 8 6 4 2
1 2 3 0 -1 8 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.