P*******b 发帖数: 1001 | 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)? | M********5 发帖数: 715 | 2 这个题确实挺难的,不过leetcode上有个题目跟这个是差不多的,有个人propose的算
法是线性的。。。 | g******z 发帖数: 893 | 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)?
| f*******t 发帖数: 7549 | 4 yes
【在 g******z 的大作中提到】 : 跟leetcode上的minimum window substring差不多的做法吧? : : t : the : a : algo
|
|