Dropbox的online coding exercise# JobHunting - 待字闺中
g*a
1 楼
Glassdoor上有人贴,不过上面没有详细的题目描述,不知道pattern是不是general的,
请教有没有什么好的思路?
Given a pattern and a string input - find if the string follows the same
pattern and return 0 or 1.
Examples:
1) Pattern : "abab", input: "redblueredblue" should return 1.
2) Pattern: "aaaa", input: "asdasdasdasd" should return 1.
3) Pattern: "aabb", input: "xyzabcxzyabc" should return 0.
请教有没有什么好的思路?
Given a pattern and a string input - find if the string follows the same
pattern and return 0 or 1.
Examples:
1) Pattern : "abab", input: "redblueredblue" should return 1.
2) Pattern: "aaaa", input: "asdasdasdasd" should return 1.
3) Pattern: "aabb", input: "xyzabcxzyabc" should return 0.