Say we have a machine which scans a printed word and assigns a probablity to each character of the word.
For example, if we scan LBC, the machine produces the following map for the word (first list will be for the first char, second list for the second char etc.) :
{
['L': 90, 'I': 50, 'N': 10], // for first character (L)
['B': 95, '8': 80, 'S': 15], // for secodn character (B)
['C': 90, 'O': 90, 'D': 70] // for third character (C)
}Meaning for the first character there is a 90 percent chance that it is L, 50 percent that it is I etc.
Given a list of Strings, return the word with the highest probablity based on this map. For example, if the list is {LBD, IBC, LSD}, LBD should be returned (with the probablity of 90 + 95 + 70).