Back to problems

Check if all substrings are dictionary words

Algorithm · Google · Hard

All tasks below use a lowercase string s and a set of valid words dictionary. You may query the dictionary directly or preprocess it into a more convenient structure. If s has fewer than 3 characters, return true for every task. Contiguous Substring Validation Return true if every contiguous substring of s whose length is at least 3 appears in dictionary. Otherwise return false. Example 1: Explanation: The contiguous substrings of length at least 3 are "pot", "ots", and…

Checking your access…