Build a trie, and marked the end of each word. To verify whether a word W is a combined word, do the following bool verifyComineWord(word W) { \\Assume the length of the word in trie is n for every position i(except n) marked in the path of the word W if (W[i+1:n] is a word || verifCombineWord(W[i+1:n])) return true; return false; } Then,we can record the longest word up to now and find the result we want. Of courese, if we start from the longest word, maybe it will take