Input: arr[] = {2, 4, 6, 7, 5}, X = 2, Y = 5
Output: 2
Explanation: Subsequences in which the minimum element is X and the maximum element is Y are {2, 5}, {2, 4, 5}.
Input: arr[] = {2, 4, 6, 7, 5, 1, 9, 10, 11}, X = 2, Y = 7
Output: 8
Explanation: subsequences in which the minimum element is X and the maximum element is Y are {2, 4, 6, 7, 5}, {2, 4, 7, 5}, {2, 4, 6, 7}, {2, 4, 7}, {2, 6, 7, 5}, {2, 7, 5}, {2, 6, 7}, {2, 7}