The Vocabulary Test
A medium Python interview practice problem on DataDriven. Write and execute real python code with instant grading.
- Domain
- Python
- Difficulty
- medium
- Seniority
- L4
Problem
A search-indexing step normalizes raw queries by checking whether a string `s` can be rebuilt as a gapless, back-to-back run of terms drawn from an approved vocabulary `word_dict`, reusing any term as many times as needed. Return whether at least one such full reconstruction exists with no characters left over; an empty `s` qualifies trivially.
Summary
Every character has to come from a word you already know.
Practice This Problem
Solve this Python problem with real code execution. DataDriven runs your Python code in a real environment and grades it automatically.