Input: arr[] = {1, 8, 3, 7, 5, 6, 7}
Output: 126
Explanation:
Bitonic subsequences of size 3 are
{1, 8, 3}, {1, 8, 7}, {1, 8, 5}, {1, 8, 6}, {1, 7, 6}, {3, 7, 6}, {1, 7, 5}, {3, 7, 5}.
Hence the maximum product of bitonic subsequence is 3*7*6 = 126
Input: arr[] = {1, 8, 3, 7}
Output: 56
Explanation:
Bitonic subsequences of size 3 are
{1, 8, 3}, {1, 8, 7}, {1, 7, 3}.
Hence the maximum product of bitonic subsequence is 1*8*7 = 56