Input: arr[] = {9, 8, 7, 6, 5}
Output: 4
Explanation: As each element is lesser than the other,
only consider the sequence of length 2, four times: [9, 8], [8, 7], [7, 6], [6, 5]
Input: arr[] = {1, 2, 1, 2, 1}
Output: 10
Explanation: All possible sequences are: [1, 2, 1, 2, 1], [1, 2, 1, 2], [2, 1, 2, 1], [1, 2, 1],
[2, 1, 2], [1, 2, 1], [1, 2], [2, 1], [1, 2], [2, 1]