Find word occurrences from string A in string B
Filed under Groupon
The question
Given a string STRA containing a number of words and another string STRB, find the occurrence of each word from STRA in STRB with O(n) complexity.
No write-up yet. Related questions below have one.
Related Groupon questions
Collected from public candidate posts and coding forums. Updated Nov 2026.