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
Practice This Problem
Try Word Container in our AI-enabled coding sandbox
Practice This Problem
Try Word Container in our AI-enabled coding sandbox
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Late February, 2026
Meta
Staff
Mid February, 2026
Meta
Senior
Mid February, 2026
Meta
Senior
Your account is free and you can post anonymously if you choose.