S*d
1 楼
在Glassdoor看到的,条件不是特别清楚:
"Given a list of words with the same size and a big string that contains one
of the permutation of all the words combined (say p), find the startindex
of the string p in the big string."
大概用Trie可以做出来,不过有很多小edge case不知道怎么处理得好,比较说如果其
中一个string 的后缀是另一个的前缀好像会出现些问题。
还请各位大牛说说思路!
"Given a list of words with the same size and a big string that contains one
of the permutation of all the words combined (say p), find the startindex
of the string p in the big string."
大概用Trie可以做出来,不过有很多小edge case不知道怎么处理得好,比较说如果其
中一个string 的后缀是另一个的前缀好像会出现些问题。
还请各位大牛说说思路!