A girl would like to go out with one of her favorite boys, but she does not know which one to choose. Fortunately, she has a Love Calculator which can calculate the probability of love between two people. Love Calculator takes two people's names and uses the following algorithm to calculate the probability of love between them:
L := the total number of occurrences of the letter 'L' in both names.
O := the total number of occurrences of the letter 'O' in both names.
V := the total number of occurrences of the letter 'V' in both names.
E := the total number of occurrences of the letter 'E' in both names.
The percent probability of love is equal to ((L+O)*(L+V)*(L+E)*(O+V)*(O+E)*(V+E))%100, where % is the modulo operator.
You are given a String girl containing the girl's name, and a String[] boys containing her favorite boys' names. Return the name of the boy with which the girl has the highest probability of love. If there is more than one such boy, return the one among them that comes earliest alphabetically. |