Company: Optiver_4th june_on campus _iit guwahti
Difficulty: medium
A cryptarithm is a mathematical puzzle where the goal is to find the correspondence between letters and digits such that the given arithmetic equation consisting of letters holds true. Given a cryptarithm as an array of strings crypt, count the number of its valid solutions. The solution is valid if each letter represents a different digit, and the leading digit of any multi-digit number is not zero. crypt has the following structure: [word1, word2, word3], which stands for the word1 + word2 = word3 cryptarithm. Example For crypt = ["SEND", "MORE", "MONEY"], the output should be solution(crypt) = 1, because there is only one solution to this cryptarithm: O = 0, M = 1, Y = 2, E = 5, N = 6, D = 7, R = 8, and S = 9 (9567 + 1085 = 10652). For crypt = ["GREEN", "BLUE", [unclear]