Find Words That Contain Other Words as Substrings
Given a list of words, implement a function that returns all words containing other words from the list as substrings. For example, given ['apple', 'app', 'banana', 'nana'], return ['apple', 'banana'] since 'apple' contains 'app' and 'banana' contains 'nana'.
Asked at:
Meta
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Mid January, 2026
Meta
Senior
Give a list of words, implement a solver that return a list of words that contain other words. [apple, app, banana, nana] -> [apple, banana] [work, work, worker] -> [worker]
Mid January, 2026
Meta
Senior
Your account is free and you can post anonymously if you choose.