Document Target Words: Coverage, Counts and Shortest Passage
Asked at Snowflake · Coding Questions · Difficulty: Hard
You are given a text `document` and a list of `targets` (words to look for). Build three small tools on top of one shared word-matching rule. The first checks that the document contains every target word. The second counts how often each target appears. The third finds the shortest passage of the original text that contains all of them. Matching ignores case and punctuation, so the target `"isnt"` matches the word `"isn't"`.
Loading the problem…
More Snowflake interview questions
- Design a Distributed Job Scheduler with Cron, Pause, Resume
- Design an ACL Authorization Service
- Design an S3-Style Blob Store with Deduplication
- SQL: Project Duration & Budget per Employee
- Cross-Platform Client Logging Library
- Design a Quota System