Document Search with Exact Words, Ordered Phrases, and Boolean Queries

Problem

Given multiple documents, implement these queries and return matching document IDs:

  1. Word query: Match a complete word, not a substring.
  2. Phrase query: Match all words in the p...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: