The Number of Strings That Appear as Substrings in Word problem gives you a list of patterns and a target string word. Count how many patterns from the list appear as substrings in word. This easy coding problem tests straightforward substring containment checking.
Uber asks this easy problem as a quick screening to verify Python/Java/C++ substring operations and basic iteration. It tests whether candidates use built-in in operator (Python) or contains/indexOf methods cleanly. The array and string interview pattern is demonstrated at its simplest.
Linear scan with substring check. For each pattern p in patterns, check if p is a substring of word using p in word (Python) or word.contains(p) (Java). Count True results.
patterns=["a","abc","bc","d"], word="abc".
Easy problems test implementation speed and familiarity with standard library functions. Know your language's substring check: Python s in t, Java t.contains(s), C++ t.find(s) != string::npos. For interviews, using the most readable, correct built-in demonstrates language mastery. If the interviewer asks for a custom implementation, describe KMP or Rabin-Karp as efficient alternatives without building them for this trivially-sized problem.