← Questions

Insert documents and check them against boolean predicates

0
SnowflakeCodingLast asked Apr 2026

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.

Write and test your solution herePython in your browser, the question's tests level by level, saved for you.Sign in to start coding