Company: Amazon_july
Difficulty: medium
Maximize Unique Remainders in Hash Array Problem Description The developers at AWS IAM are designing a new checksum logic for an authentication module. The checksum is calculated as an array hash, where hash[i] = secretKey[i] % param[i] . There are n parameters for the checksum, where the i th parameter is represented by param[i] . The secret key consists of n values, with the i th value denoted as secretKey[i] . A good secret key is one that results in more distinct values in the hash array. Given the array param of size n , determine the maximum number of possible distinct values in the hash array by selecting an appropriate secretKey . Function Description Complete the function findHash in the editor below. findHash has the following parameter: int param[n] : the different parameters needed for the checksum logic Returns int : the maximum number of distinct elements possible in hash. Examples Example 1: Input: 3 1 1 1 Output: 1 Explanation: If we set secretKey = [1, 2, 3] , we get h