/**
 * @Company Facebook
 *
 * Given two strings, str and pattern, return true if the str has a valid mapping between the words in str and the characters in the pattern.
 * The str will be whitespace separated and the pattern will be depicted using characters.
 *
 * Problem Ex.
 *   Input: 'cat dog dog cat', 'abba'
 *   Output: true because cat = a and dog = b.
 *
 *   Input: 'cat dog dog foo', 'abba'
 *   Output: false because cat = a so foo cannot == a
 */
public boolean isValidPattern(String str, String pattern) { }

Add facebook interview problem