← Questions
Insert documents and check them against boolean predicates
0
I was asked this
No reports yet. Sign in to say where you were asked it.
Build a small server with two calls: insert_doc(filename) stores a document, and check_contains(filename, predicate) answers whether the document satisfies a predicate over terms, such as a || b || c or a && b || c.
Parse the predicate with the usual precedence, evaluate it against the document's terms, and discuss how you would index documents so that checks stay fast.
No official answer yet. Write yours on the right and run it.
Nothing published yet.
Write and test your solution herePython in your browser, the question's tests level by level, saved for you.Sign in to start coding
