|All-time Popular Problems|
|Inorder Successor in BST|
|Maximum Product Subarray|
|Is Binary Number Multiple of 3|
|Pairwise swap elements of a linked list by swapping data|
|Largest Number formed from an Array|
|Reverse an Array|
|Boundary Traversal of binary tree|
|Leaders in an array|
Given an array and a number k, find the largest sum of the subarray containing at least k numbers. It may be assumed that the size of array is at-least k.
The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. Each test case contains an integer n denoting the size of the array. Then the following line contains n space separated integers. The last line of the input contains the number k.
Print the value of the largest sum of the subarray containing at least k numbers.
-4 -2 1 -3
1 1 1 1 1 1