Company: Yahoo
Difficulty: medium
Duodigit Numbers We call an integer a \"duodigit\" if its decimal representation uses no more than two different digits. For example, 12 is a duodigit, but 102 is not. Implement the function isDuoDigit(number) which returns a string: \'y\' if number is a duodigit \'n\' otherwise Parameters number (int): an integer Return Value result (string): a string, \'y\' if the number is a duodigit, \'n\' if it is not. Constraints -200,000 ≤ number ≤ 200,000 Available RAM: 512MB Timeout: 1 second Examples These numbers are duodigits: 12 110 -37333 1 2020 These numbers are not duodigits: 102 -2021 Sample Input/Output Input: 12 Output: \"y\" Function Signature string isDuoDigit(int number)