Find all words that appear as a substring of another word in the same list.
Given an array of strings, return every word that occurs as a contiguous substring of at least one other word in the array. Each matching word should appear once in the answer, regardless of how many superstrings contain it.
A word is considered a substring of another word if its characters appear consecutively inside that other word.
words.words[i] is a non-empty lowercase string.words that are substrings of another string in words.Premium problem context
Premium adds guided hints, editorial links, similar variants, discussion resources, and concept maps so you can understand why a problem matters, not just solve it once.