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)?
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)?