avatar
P*b
1
Given a document and a query of K words, how do u find the smallest window t
hat covers all the words at least once in that document? (given you know the
inverted lists of all K words, that is, for each word, you have a list of a
ll its occurrrences). This one is really hard. Could someone propose an algo
rithm in O(n)?
avatar
M*5
2
这个题确实挺难的,不过leetcode上有个题目跟这个是差不多的,有个人propose的算
法是线性的。。。
avatar
g*z
3
跟leetcode上的minimum window substring差不多的做法吧?

t
the
a
algo

【在 P*******b 的大作中提到】
: Given a document and a query of K words, how do u find the smallest window t
: hat covers all the words at least once in that document? (given you know the
: inverted lists of all K words, that is, for each word, you have a list of a
: ll its occurrrences). This one is really hard. Could someone propose an algo
: rithm in O(n)?

avatar
f*t
4
yes

【在 g******z 的大作中提到】
: 跟leetcode上的minimum window substring差不多的做法吧?
:
: t
: the
: a
: algo

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。