Input: a list of unique words, output: find all words that can be formed by two other words from the list. Follow up: find all words that can be formed by k other words from the list.
Any idea to solve it?