Given an array A of n integers, the task is to find a subsequence of size k whose product is maximum among all possible k sized subsequences of given array.
First line consists of T test cases. First line of every test cases consists of N, denoting the number of elements in an array. Second line consists of elements of array.
Single line output, print the maximum possible product.
8 6 4 6
10 2 3 8 1 10 4
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.