m******a 发帖数: 84 | 1 来自主题: JobHunting版 - 请教一道题 Design an algorithm to find the shortest substring in a synopsis such that
it contains all the words in a provided list.
比如list 是: ["aaa", "aab"]
synopsis是: "aaabaaab"
应该返回 "aabaaa"
这个因为word 之前有可能overlap, 请教各位有什么好办法么? |
|