Company: amdocs_31oct
Difficulty: medium
Count Minimum Product Triples Problem Description After returning from the army, Bobby received a gift - an array a consisting of n positive integer numbers. He hadn't been solving problems for a long time, so he became interested in answering a particular question: how many triples of indices (i, j, k) such that a[i] * a[j] * a[k] is minimum possible, are there in the array? Help him with it! Examples Example 1: Input: a = [1,1,1,1] Output: 4 Explanation: In this example, Bobby always chooses three ones out of four, and the number of ways to choose them is 4, so the function should return 4. Example 2: Input: a = [1,3,2,3,4] Output: 2 Explanation: In the second example, a triple of numbers (1, 2, 3) is chosen (numbers, not indices). Since there are two ways to choose these numbers (e.g., indices (0, 2, 1) and (0, 2, 3) for values 1, 2, 3 respectively), the function should return 2.