Skip to content

Commit

Permalink
Add facebook interview problem
Browse files Browse the repository at this point in the history
  • Loading branch information
vinnyoodles committed Jun 20, 2017
1 parent 2bb2bba commit 6f6e017
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions java/interview/bipartition-pattern-matching.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/**
* @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) { }

0 comments on commit 6f6e017

Please sign in to comment.