File tree 1 file changed +0
-16
lines changed
src/main/java/com/fishercoder/solutions
1 file changed +0
-16
lines changed Original file line number Diff line number Diff line change 3
3
import java .util .HashMap ;
4
4
import java .util .Map ;
5
5
6
- /**
7
- * 290. Word Pattern
8
- *
9
- * Given a pattern and a string str, find if str follows the same pattern.
10
- * Here follow means a full match, such that there is a bijection between a letter in pattern and a non-empty word in str.
11
-
12
- Examples:
13
- pattern = "abba", str = "dog cat cat dog" should return true.
14
- pattern = "abba", str = "dog cat cat fish" should return false.
15
- pattern = "aaaa", str = "dog cat cat dog" should return false.
16
- pattern = "abba", str = "dog dog dog dog" should return false.
17
-
18
- Notes:
19
- You may assume pattern contains only lowercase letters, and str contains lowercase letters separated by a single space.
20
- */
21
-
22
6
public class _290 {
23
7
24
8
public static class Solution1 {
You can’t perform that action at this time.
0 commit comments