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
Hello Interview Premium
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Early April, 2026
Meta
Manager
Late February, 2026
Meta
Staff
Mid February, 2026
Meta
Senior
Your account is free and you can post anonymously if you choose.