|All-time Popular Problems|
|Transform to Sum Tree|
|Delete N nodes after M nodes of a linked list|
|The Celebrity Problem|
|Consecutive 1's not allowed|
|Pairwise swap elements of a linked list by swapping data|
|Boundary Traversal of binary tree|
|n'th node from end of linked list|
|Longest Common Subsequence|
Given an array containing both negative and positive integers. Find the contiguous sub-array with maximum sum.
The first line of input contains an integer T denoting the number of test cases. The description of T test cases follows. The first line of each test case contains a single integer N denoting the size of array. The second line contains N space-separated integers A1, A2, ..., AN denoting the elements of the array.
Print the maximum sum of the contiguous sub-array in a separate line for each test case.
1 ≤ T ≤ 200
1 ≤ N ≤ 1000
-100 ≤ A[i] <= 100
1 2 3
-1 -2 -3 -4